Get all message of the conversation
GET/conversations/ {conversationId}/ messages/
v2
GET
conversation-list-messages-by-conversation
Request
- conversationIdstring (uuid)required
Responses
application/json
- Schema-Dokumentation
- Beispiel
- JSON Schema
- Array[
- *one of 3 alternatives
- Alternativeobject
- conversationIdstring (uuid)required
- createdAtstring (date-time)required
- createdByobject
- activeboolean
- avatarRefIdstring
- clearNamestring
- departmentstring (one of: development, mail, accounting, cloudHosting, customerService, generic)
- userIdstringrequired
- filesarray of one of 2 alternatives
- Array[
- *one of 2 alternatives
- Alternativeobject
- idstring (uuid)required
- status"requested"required
- Alternativeobject
- idstring (uuid)required
- namestringrequired
- status"uploaded"required
- typestringrequired
]
- internalboolean
- messageContentstring
- messageIdstring (uuid)required
- type"MESSAGE"required
- Alternativeobject
- conversationIdstringrequired
- createdAtstringrequired
- internalboolean
- messageContentstringrequired
- metaobject
- userobject
- activeboolean
- avatarRefIdstring
- clearNamestring
- departmentstring (one of: development, mail, accounting, cloudHosting, customerService, generic)
- userIdstringrequired
- type"STATUS_UPDATE"required
- Alternativeobject
- conversationIdstring (uuid)required
- createdAtstring (date-time)required
- filesarray of one of 2 alternatives
- Array[
- *one of 2 alternatives
- Alternativeobject
- idstring (uuid)required
- status"requested"required
- Alternativeobject
- idstring (uuid)required
- namestringrequired
- status"uploaded"required
- typestringrequired
]
- internalbooleanrequired
- messageContentstring (one of: relocation, call)required
- messageIdstring (uuid)required
- metaone of 1 alternativesrequired
- Alternativeobject
- contactobjectrequired
- emailstringrequired
- firstnamestringrequired
- lastnamestringrequired
- phonestring
- domainobject
- allDomainsboolean
- domainsarray of object
- Array[
- *object
- authCodestring
- domainNamestring
]
- notesstring
- preferredRelocationDatestring (date-time)
- redirectusKeynumberrequired
- sourceobjectrequired
- providerNamestringrequired
- providerPasswordstringrequired
- providerUrlstringrequired
- providerUsernamestringrequired
- sourceAccountstringrequired
- targetobjectrequired
- accountShortIdstringrequired
- applicationstring
- articleTypestringrequired
- organisationstringrequired
- pricesarray of object
- Array[
- *object
- namestring
- pricenumber
]
- productstringrequired
- withDataCompareboolean
- userIdstring (uuid)required
type"SERVICE_REQUEST"
required
]
[
{
"conversationId": "f0f86186-0a5a-45b2-aa33-502777496347",
"createdAt": "2025-01-18T00:30:54.081Z",
"createdBy": {
"active": true,
"avatarRefId": "string",
"clearName": "string",
"department": "development",
"userId": "string"
},
"files": [
{
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"status": "requested"
}
],
"internal": true,
"messageContent": "string",
"messageId": "f0f86186-0a5a-45b2-aa33-502777496347",
"type": "MESSAGE"
}
]
{
"items": {
"oneOf": [
{
"properties": {
"conversationId": {
"format": "uuid",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"createdBy": {
"properties": {
"active": {
"type": "boolean"
},
"avatarRefId": {
"type": "string"
},
"clearName": {
"type": "string"
},
"department": {
"enum": [
"development",
"mail",
"accounting",
"cloudHosting",
"customerService",
"generic"
],
"type": "string"
},
"userId": {
"type": "string"
}
},
"required": [
"userId"
],
"type": "object"
},
"files": {
"items": {
"oneOf": [
{
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"status": {
"enum": [
"requested"
],
"type": "string"
}
},
"required": [
"id",
"status"
],
"type": "object"
},
{
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"enum": [
"uploaded"
],
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"id",
"status",
"name",
"type"
],
"type": "object"
}
]
},
"type": "array"
},
"internal": {
"type": "boolean"
},
"messageContent": {
"type": "string"
},
"messageId": {
"format": "uuid",
"type": "string"
},
"type": {
"enum": [
"MESSAGE"
],
"type": "string"
}
},
"required": [
"messageId",
"conversationId",
"createdAt",
"type"
],
"type": "object"
},
{
"properties": {
"conversationId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"internal": {
"type": "boolean"
},
"messageContent": {
"type": "string"
},
"meta": {
"properties": {
"user": {
"properties": {
"active": {
"type": "boolean"
},
"avatarRefId": {
"type": "string"
},
"clearName": {
"type": "string"
},
"department": {
"enum": [
"development",
"mail",
"accounting",
"cloudHosting",
"customerService",
"generic"
],
"type": "string"
},
"userId": {
"type": "string"
}
},
"required": [
"userId"
],
"type": "object"
}
},
"type": "object"
},
"type": {
"enum": [
"STATUS_UPDATE"
],
"type": "string"
}
},
"required": [
"conversationId",
"messageContent",
"createdAt",
"type"
],
"type": "object"
},
{
"properties": {
"conversationId": {
"format": "uuid",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"files": {
"items": {
"oneOf": [
{
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"status": {
"enum": [
"requested"
],
"type": "string"
}
},
"required": [
"id",
"status"
],
"type": "object"
},
{
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"enum": [
"uploaded"
],
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"id",
"status",
"name",
"type"
],
"type": "object"
}
]
},
"maxItems": 0,
"type": "array"
},
"internal": {
"type": "boolean"
},
"messageContent": {
"enum": [
"relocation",
"call"
],
"type": "string"
},
"messageId": {
"format": "uuid",
"type": "string"
},
"meta": {
"oneOf": [
{
"properties": {
"contact": {
"properties": {
"email": {
"type": "string"
},
"firstname": {
"type": "string"
},
"lastname": {
"type": "string"
},
"phone": {
"type": "string"
}
},
"required": [
"firstname",
"lastname",
"email"
],
"type": "object"
},
"domain": {
"properties": {
"allDomains": {
"type": "boolean"
},
"domains": {
"items": {
"properties": {
"authCode": {
"type": "string"
},
"domainName": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"notes": {
"type": "string"
},
"preferredRelocationDate": {
"format": "date-time",
"type": "string"
},
"redirectusKey": {
"type": "number"
},
"source": {
"properties": {
"providerName": {
"type": "string"
},
"providerPassword": {
"type": "string"
},
"providerUrl": {
"type": "string"
},
"providerUsername": {
"type": "string"
},
"sourceAccount": {
"type": "string"
}
},
"required": [
"sourceAccount",
"providerName",
"providerUrl",
"providerUsername",
"providerPassword"
],
"type": "object"
},
"target": {
"properties": {
"accountShortId": {
"type": "string"
},
"application": {
"type": "string"
},
"articleType": {
"type": "string"
},
"organisation": {
"type": "string"
},
"prices": {
"items": {
"properties": {
"name": {
"type": "string"
},
"price": {
"type": "number"
}
},
"type": "object"
},
"type": "array"
},
"product": {
"type": "string"
},
"withDataCompare": {
"type": "boolean"
}
},
"required": [
"organisation",
"accountShortId",
"product",
"articleType"
],
"type": "object"
},
"userId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"redirectusKey",
"source",
"target",
"contact",
"userId"
],
"type": "object"
}
]
},
"type": {
"enum": [
"SERVICE_REQUEST"
],
"type": "string"
}
},
"required": [
"conversationId",
"messageId",
"messageContent",
"createdAt",
"type",
"internal",
"meta"
],
"type": "object"
}
]
},
"type": "array"
}
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/conversations/f0f86186-0a5a-45b2-aa33-502777496347/messages
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.conversation.listMessagesByConversation({
"conversationId": "f0f86186-0a5a-45b2-aa33-502777496347"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Conversation\ListMessagesByConversation\ListMessagesByConversationRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new ListMessagesByConversationRequest(
conversationId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->conversation()->listMessagesByConversation($request);
var_dump($response->getBody();