curl --request POST \
--url https://api.craftcx.com/v1/assess \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"author": {
"external_id": "cus_123",
"name": "Jane Customer",
"type": "contact"
},
"content": "Why was I charged twice?",
"external_id": "msg_1",
"kind": "message",
"timestamp": 1783088291730
},
{
"ai_tool": "custom",
"author": {
"external_id": "billing-agent",
"name": "Billing Bot",
"type": "ai"
},
"content": "I can help with billing.",
"external_id": "msg_2",
"kind": "message",
"timestamp": 1783088440817
},
{
"author": {
"external_id": "tea_123",
"name": "Jason",
"type": "teammate"
},
"content": "Escalated to billing for license review.",
"external_id": "note_1",
"kind": "comment",
"timestamp": 1783089090110
}
],
"ticket_id": "ticket_123"
}
'import requests
url = "https://api.craftcx.com/v1/assess"
payload = {
"messages": [
{
"author": {
"external_id": "cus_123",
"name": "Jane Customer",
"type": "contact"
},
"content": "Why was I charged twice?",
"external_id": "msg_1",
"kind": "message",
"timestamp": 1783088291730
},
{
"ai_tool": "custom",
"author": {
"external_id": "billing-agent",
"name": "Billing Bot",
"type": "ai"
},
"content": "I can help with billing.",
"external_id": "msg_2",
"kind": "message",
"timestamp": 1783088440817
},
{
"author": {
"external_id": "tea_123",
"name": "Jason",
"type": "teammate"
},
"content": "Escalated to billing for license review.",
"external_id": "note_1",
"kind": "comment",
"timestamp": 1783089090110
}
],
"ticket_id": "ticket_123"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
messages: [
{
author: {external_id: 'cus_123', name: 'Jane Customer', type: 'contact'},
content: 'Why was I charged twice?',
external_id: 'msg_1',
kind: 'message',
timestamp: 1783088291730
},
{
ai_tool: 'custom',
author: {external_id: 'billing-agent', name: 'Billing Bot', type: 'ai'},
content: 'I can help with billing.',
external_id: 'msg_2',
kind: 'message',
timestamp: 1783088440817
},
{
author: {external_id: 'tea_123', name: 'Jason', type: 'teammate'},
content: 'Escalated to billing for license review.',
external_id: 'note_1',
kind: 'comment',
timestamp: 1783089090110
}
],
ticket_id: 'ticket_123'
})
};
fetch('https://api.craftcx.com/v1/assess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"external_ticket_id": "ticket_123",
"id": "pfh0haxfpzowht3oi213cqos",
"source": "zendesk",
"status": "accepted"
}{
"status": 400,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 401,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 404,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 409,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 413,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 500,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}Score conversation
Send conversational message data from any source for AXIS scoring and analysis
curl --request POST \
--url https://api.craftcx.com/v1/assess \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"author": {
"external_id": "cus_123",
"name": "Jane Customer",
"type": "contact"
},
"content": "Why was I charged twice?",
"external_id": "msg_1",
"kind": "message",
"timestamp": 1783088291730
},
{
"ai_tool": "custom",
"author": {
"external_id": "billing-agent",
"name": "Billing Bot",
"type": "ai"
},
"content": "I can help with billing.",
"external_id": "msg_2",
"kind": "message",
"timestamp": 1783088440817
},
{
"author": {
"external_id": "tea_123",
"name": "Jason",
"type": "teammate"
},
"content": "Escalated to billing for license review.",
"external_id": "note_1",
"kind": "comment",
"timestamp": 1783089090110
}
],
"ticket_id": "ticket_123"
}
'import requests
url = "https://api.craftcx.com/v1/assess"
payload = {
"messages": [
{
"author": {
"external_id": "cus_123",
"name": "Jane Customer",
"type": "contact"
},
"content": "Why was I charged twice?",
"external_id": "msg_1",
"kind": "message",
"timestamp": 1783088291730
},
{
"ai_tool": "custom",
"author": {
"external_id": "billing-agent",
"name": "Billing Bot",
"type": "ai"
},
"content": "I can help with billing.",
"external_id": "msg_2",
"kind": "message",
"timestamp": 1783088440817
},
{
"author": {
"external_id": "tea_123",
"name": "Jason",
"type": "teammate"
},
"content": "Escalated to billing for license review.",
"external_id": "note_1",
"kind": "comment",
"timestamp": 1783089090110
}
],
"ticket_id": "ticket_123"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
messages: [
{
author: {external_id: 'cus_123', name: 'Jane Customer', type: 'contact'},
content: 'Why was I charged twice?',
external_id: 'msg_1',
kind: 'message',
timestamp: 1783088291730
},
{
ai_tool: 'custom',
author: {external_id: 'billing-agent', name: 'Billing Bot', type: 'ai'},
content: 'I can help with billing.',
external_id: 'msg_2',
kind: 'message',
timestamp: 1783088440817
},
{
author: {external_id: 'tea_123', name: 'Jason', type: 'teammate'},
content: 'Escalated to billing for license review.',
external_id: 'note_1',
kind: 'comment',
timestamp: 1783089090110
}
],
ticket_id: 'ticket_123'
})
};
fetch('https://api.craftcx.com/v1/assess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"external_ticket_id": "ticket_123",
"id": "pfh0haxfpzowht3oi213cqos",
"source": "zendesk",
"status": "accepted"
}{
"status": 400,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 401,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 404,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 409,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 413,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 500,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}Body
Conversation transcript items in chronological order. Each item requires external_id, kind, content, author, and timestamp. Use kind=comment for internal notes.
1 - 50 elementsShow child attributes
Show child attributes
[
{
"author": {
"external_id": "cus_123",
"name": "Jane Customer",
"type": "contact"
},
"content": "Why was I charged twice?",
"external_id": "msg_1",
"kind": "message",
"timestamp": 1783088291730
},
{
"ai_tool": "custom",
"author": {
"external_id": "billing-agent",
"name": "Billing Bot",
"type": "ai"
},
"content": "I can help with billing.",
"external_id": "msg_2",
"kind": "message",
"timestamp": 1783088440817
},
{
"author": {
"external_id": "tea_123",
"name": "Jason",
"type": "teammate"
},
"content": "Escalated to billing for license review.",
"external_id": "note_1",
"kind": "comment",
"timestamp": 1783089090110
}
]
Stable ticket or conversation ID from the source system. CraftCX rejects duplicate imports for the same source_account_id and ticket_id, falling back to source when source_account_id is omitted.
1"ticket_123"
Source system for this import. Defaults to custom. CraftCX uses source to namespace message external_id values. Ticket imports use source_account_id when supplied, otherwise source.
1"zendesk"
Stable account ID within the source system, such as a Zendesk subdomain or HubSpot Hub ID. When supplied, CraftCX uses it with ticket_id to identify imports and reject duplicates. Adding or changing source_account_id later creates a separate import namespace from earlier requests.
1"acme-support"
Optional ticket or conversation subject from the source system.
"Billing question"
Response
The ingested event receipt. Note; we aim to
respond as quickly as possible, so we return a 202 Accepted
status code, and process the event asynchronously.
The ticket ID from the source system.
"ticket_123"
The CraftCX ticket ID for the accepted import.
"pfh0haxfpzowht3oi213cqos"
The source namespace used for import identity.
"zendesk"
The import receipt status.
accepted "accepted"