import requests
url = "https://platform.ankra.app/api/v1/org/ai-tickets/{ticket_id}/assign"
payload = {
"assignee_agent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assignee_agent_task_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assignee_user_id: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-tickets/{ticket_id}/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-tickets/{ticket_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assignee_agent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ticket_number": 123,
"title": "<string>",
"body": "<string>",
"kind": "<string>",
"status": "<string>",
"priority": "<string>",
"assignee_agent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_agent_name": "<string>",
"assignee_user_id": "<string>",
"assignee_user_email": "<string>",
"assignee_user_name": "<string>",
"parent_ticket_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_ticket_number": 123,
"sub_ticket_count": 123,
"open_sub_ticket_count": 123,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"cluster_archived": true,
"alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_kind": "<string>",
"source_id": "<string>",
"plan_document": "<string>",
"plan_status": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slack_channel_id": "<string>",
"slack_thread_ts": "<string>",
"teams_conversation_id": "<string>",
"labels": [
"<string>"
],
"staffing": "auto",
"due_at": "2023-11-07T05:31:56Z",
"created_by_kind": "<string>",
"created_by": "<string>",
"resolution": "<string>",
"recurrence_count": 123,
"last_event_sequence": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"status_changed_at": "2023-11-07T05:31:56Z",
"decision_request": {
"prompt": "<string>",
"options": [
{
"key": "<string>",
"title": "<string>",
"summary": "<string>",
"recommended": true,
"action_class": "none"
}
]
},
"condition_check": {
"state": "present",
"basis": "alert",
"reason": "cluster_retired",
"observed_at": "2023-11-07T05:31:56Z",
"cluster_state": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Assign an AI ticket
Assigns a ticket to an agent (assignee_agent_task_id) or an organisation member (assignee_user_id), never both; send both as null to unassign. Answers 404 when the agent or member is not in the organisation.
import requests
url = "https://platform.ankra.app/api/v1/org/ai-tickets/{ticket_id}/assign"
payload = {
"assignee_agent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assignee_agent_task_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assignee_user_id: '<string>'
})
};
fetch('https://platform.ankra.app/api/v1/org/ai-tickets/{ticket_id}/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-tickets/{ticket_id}/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assignee_agent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_user_id": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ticket_number": 123,
"title": "<string>",
"body": "<string>",
"kind": "<string>",
"status": "<string>",
"priority": "<string>",
"assignee_agent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assignee_agent_name": "<string>",
"assignee_user_id": "<string>",
"assignee_user_email": "<string>",
"assignee_user_name": "<string>",
"parent_ticket_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_ticket_number": 123,
"sub_ticket_count": 123,
"open_sub_ticket_count": 123,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"cluster_archived": true,
"alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_kind": "<string>",
"source_id": "<string>",
"plan_document": "<string>",
"plan_status": "<string>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slack_channel_id": "<string>",
"slack_thread_ts": "<string>",
"teams_conversation_id": "<string>",
"labels": [
"<string>"
],
"staffing": "auto",
"due_at": "2023-11-07T05:31:56Z",
"created_by_kind": "<string>",
"created_by": "<string>",
"resolution": "<string>",
"recurrence_count": 123,
"last_event_sequence": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"status_changed_at": "2023-11-07T05:31:56Z",
"decision_request": {
"prompt": "<string>",
"options": [
{
"key": "<string>",
"title": "<string>",
"summary": "<string>",
"recommended": true,
"action_class": "none"
}
]
},
"condition_check": {
"state": "present",
"basis": "alert",
"reason": "cluster_retired",
"observed_at": "2023-11-07T05:31:56Z",
"cluster_state": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Who works this ticket: 'auto' (the AI team may staff it, mirror it into the organisation's bound Slack/Teams thread, and escalate it when stale) or 'manual' (a human owns it; all three automatic lanes skip it).
auto, manual Advisory due date. No loop reads it; it is metadata for the humans on the board.
Set while the ticket is blocked on a choice the agent offered; null otherwise. Answer it with POST /ai-tickets/{ticket_id}/decision.
Show child attributes
Show child attributes
Whether what the ticket is about still holds, derived when the ticket is read from the bound cluster, the linked alert and the newest observation of its condition. Never null.
Show child attributes
Show child attributes