GET · Messages
Rédigé par Red Blue
Mis à jour le
GET /api/v1/inbox/conversations/{conversationId}/messages
operationId : inbox_messages_list
Accès | Permission | Consentements OAuth |
|---|---|---|
Clé API d’organisation | supportAutomation.read | Sans objet |
KHONY_ORIGIN est l’origine HTTPS de votre application Khony, sans chemin final. Remplacez les identifiants de l’exemple par ceux de vos ressources autorisées. Les données de réponse ci-dessous illustrent le format ; elles ne sont pas le résultat d’un appel à votre organisation.
Paramètres et en-têtes
Nom | Emplacement | Requis | Type et contraintes |
|---|---|---|---|
limit | query | Non | integer ; Défaut : 20 ; Minimum : 1 ; Maximum : 50 |
before | query | Non | string ; Longueur maximale : 300 |
productId | query | Oui | string |
conversationId | path | Oui | string |
Exemple de requête
curl --request GET "$KHONY_ORIGIN/api/v1/inbox/conversations/support_conversation_01k3w8d7vhe008000000000002/messages?productId=product_01k3w8d7vhe008000000000001&limit=20" \
--header "x-api-key: $KHONY_API_KEY"Réponse de succès · HTTP 200
{
"data": [
{
"id": "support_message_01k3w8d7vhe008000000000003",
"revision": "4242",
"audience": "customer",
"authorType": "agent",
"authorUserId": null,
"authorContactId": null,
"content": "Diagnostic",
"contentDocument": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Diagnostic",
"marks": [
{
"type": "bold"
}
]
}
]
},
{
"type": "callout",
"attrs": {
"variant": "info"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Keep the original source document."
}
]
}
]
},
{
"type": "table",
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Step"
}
]
}
]
},
{
"type": "tableHeader",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Result"
}
]
}
]
}
]
},
{
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Read"
}
]
}
]
},
{
"type": "tableCell",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Verified"
}
]
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Documentation",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://example.test/help"
}
}
]
}
]
}
]
},
"attachments": [],
"emailAttachments": [],
"delivery": null,
"createdAt": "2026-10-23T10:00:00.000Z",
"updatedAt": "2026-10-23T10:00:00.000Z"
}
],
"nextCursor": null
}Schéma complet de la réponse
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"maxItems": 50,
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"pattern": "^support_message_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"type": "object",
"properties": {
"revision": {
"type": "string",
"pattern": "^[0-9]+$"
},
"id": {
"type": "string",
"pattern": "^support_message_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"audience": {
"type": "string",
"enum": [
"customer",
"internal"
]
},
"authorType": {
"type": "string"
},
"authorUserId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"authorContactId": {
"anyOf": [
{
"type": "string",
"pattern": "^contact_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
{
"type": "null"
}
]
},
"content": {
"type": "string"
},
"contentDocument": {
"anyOf": [
{
"$ref": "#/$defs/__schema1"
},
{
"type": "null"
}
]
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^attachment_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"name": {
"type": "string"
},
"contentType": {
"type": "string"
},
"sizeBytes": {
"type": "number"
},
"url": {
"type": "string"
}
},
"required": [
"id",
"name",
"contentType",
"sizeBytes",
"url"
],
"additionalProperties": false
}
},
"emailAttachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"filename": {
"type": "string"
},
"contentType": {
"type": "string"
}
},
"required": [
"id",
"filename",
"contentType"
],
"additionalProperties": false
}
},
"delivery": {
"anyOf": [
{
"type": "object",
"properties": {
"emailMessageId": {
"type": "string",
"pattern": "^support_email_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"status": {
"type": "string"
},
"providerAccepted": {
"type": "boolean"
},
"canRetry": {
"type": "boolean"
}
},
"required": [
"emailMessageId",
"status",
"providerAccepted",
"canRetry"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"revision",
"id",
"audience",
"authorType",
"authorUserId",
"authorContactId",
"content",
"contentDocument",
"attachments",
"emailAttachments",
"delivery",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
"__schema1": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema1"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema1"
}
}
]
}
}
}Refus et reprise
Les statuts documentés pour cette opération sont 400, 401, 402, 403, 404, 429, 500, 503. Identifiez la cause avec error.code et, lorsqu’il est présent, error.reason. Une réponse 409 peut demander une relecture de révision ou signaler une commande incompatible ; une réponse 428 demande une confirmation humaine. Ne rejouez une écriture que selon son contrat.
Notes du contrat
{
"description": "Requires a new explicit support-reader/editor organization API key profile. Its supportAutomation grant authorizes all conversations of the selected organization product, including restricted conversations, customer identity and internal notes. Legacy support.read keys do not qualify. Private teammate drafts, preferences and Copilot chats remain human-only. Product entitlement and API request meter apply to every admission. At most 50 entries. Within a page entries are chronological; nextCursor is the oldest boundary for the next page toward older entries. Customer transcript only, native documents preserved and attachment URLs signed by the existing reader."
}