Close a ticket

.md

End a ticket without counting it as answered.

Scopesadmin:write
Permissionview_ticketsmanage_tickets
POST/v1/admin/tickets/{ticket}/close

End the ticket without claiming the trader got their answer: a conversation that went nowhere, a duplicate, a question somebody else answered. No line goes into the thread. When the trader did get their answer, resolve it instead, because only resolved is counted as answered.

Closed is final, like resolved, and never reopens: a trader with a new question opens a new ticket. After it, the only change a ticket takes is its tags.

Answers with the ticket, now closed, with closed_at and closed_by set.

Needs a firm. Our own staff name one with the Propper-Workspace header.

Request

curl -X POST "https://api.proppertrading.com/v1/admin/tickets/tkt_wm9qfkgsnpfhtzfj/close" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme" \
  -H "Idempotency-Key: 5d7f9b1c-3e5a-4c7e-8b9d-1f3a5c7e9b0d"

Response

The ticket, now closed.

Errors

StatusCodeMeaning
400workspace_requiredAsked by our own staff without naming a firm
400missing_idempotency_keyA POST without an Idempotency-Key header
401invalid_tokenNot a token, or the secret does not match
401revoked_tokenSigned out here or from another device
401expired_tokenNinety days without use, or a set expiry passed
403admin_access_requiredThis account no longer helps run the environment
403insufficient_scopeThis device does not hold admin:write
403workspace_not_permittedThe Propper-Workspace header names an environment this account cannot act in
403forbiddenWithout view_tickets and manage_tickets
404resource_not_foundNo ticket with that id in this firm
409ticket_endedThe ticket was already resolved or closed