import requests
url = "https://platform.ankra.app/api/v1/org/support/tickets/{ticket_id}/attachments"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://platform.ankra.app/api/v1/org/support/tickets/{ticket_id}/attachments', 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/support/tickets/{ticket_id}/attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file{
"ai_review_status": "pending",
"category": "technical",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "portal",
"status": "pending_review",
"subject": "<string>",
"ticket_number": 123,
"updated_at": "2023-11-07T05:31:56Z",
"ai_summary": "<string>",
"attachments": [
{
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"filename": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"size_bytes": 123
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"comments": [
{
"author_label": "<string>",
"author_type": "customer",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"author_name": "<string>"
}
],
"is_tracked_by_team": false,
"last_comment_at": "2023-11-07T05:31:56Z",
"last_comment_by": "customer",
"reported_by": "<string>",
"severity": "low"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Add an attachment to a support ticket
Uploads a file, sent as the multipart field file, to the ticket and returns the updated ticket. Answers 415 for an unsupported file type, 413 for a file that is too large, and 409 when the ticket already has the maximum number of attachments.
import requests
url = "https://platform.ankra.app/api/v1/org/support/tickets/{ticket_id}/attachments"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://platform.ankra.app/api/v1/org/support/tickets/{ticket_id}/attachments', 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/support/tickets/{ticket_id}/attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file{
"ai_review_status": "pending",
"category": "technical",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "portal",
"status": "pending_review",
"subject": "<string>",
"ticket_number": 123,
"updated_at": "2023-11-07T05:31:56Z",
"ai_summary": "<string>",
"attachments": [
{
"content_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"filename": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"size_bytes": 123
}
],
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"comments": [
{
"author_label": "<string>",
"author_type": "customer",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"author_name": "<string>"
}
],
"is_tracked_by_team": false,
"last_comment_at": "2023-11-07T05:31:56Z",
"last_comment_by": "customer",
"reported_by": "<string>",
"severity": "low"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Response
Successful Response
pending, passed, flagged technical, account, billing, bug, feature_request, other portal, api, cli, agent pending_review, open, triaging, in_progress, waiting_customer, resolved, closed Show child attributes
Show child attributes
Show child attributes
Show child attributes
When the latest customer-visible reply on the ticket was written, by the customer or by Ankra support. Null when nobody has replied yet. A reply also moves updated_at; this field names the reply itself, since updated_at moves on status changes too.
Which side wrote the latest customer-visible reply: customer (your organisation) or team (Ankra support). Null when nobody has replied yet.
customer, team low, medium, high, critical