A ticket: a picture

.md

The bytes of a picture a message of a ticket carries.

Scopesadmin:read
Permissionview_tickets
GET/v1/admin/tickets/{ticket}/messages/{message}/image

The picture itself, streamed back on your token. Take the path from the image_url of a message in the conversation rather than building it.

Not JSON: the body is the picture. A download that arrived base64 inside an envelope would cost a third more bandwidth and a full copy in memory on a phone.

Every picture is stored re-encoded as WebP, at most 1600 pixels on its longest side, whatever was sent. So Content-Type is what is stored, which is not always what the name in Content-Disposition suggests. Read the type from the header, never from the name.

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

Request

curl "https://api.proppertrading.com/v1/admin/tickets/tkt_zyy8t2dwma2nprbt/messages/tmsg_ebt6zayzphz6vras/image" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme" \
  -o picture.webp

Response

HTTP/1.1 200 OK
Content-Type: image/webp
Content-Length: 84
Content-Disposition: inline; filename=red.png
X-Content-Type-Options: nosniff

Errors

StatusCodeMeaning
400workspace_requiredAsked by our own staff without naming a firm
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:read
403workspace_not_permittedThe Propper-Workspace header names an environment this account cannot act in
403forbiddenWithout view_tickets
404resource_not_foundNo ticket with that id in this firm, a message of another ticket, a message without a picture, or a picture no longer stored