List drafts
GET/v1/drafts
- Scope
messages:read - Pages with
before
Drafts written by draft-only keys, newest first.
Parameters
Query
limitintegerItems per page, 1–200 (default 50).
beforestringThe
next_beforeof the previous page.profile_idstringOnly this line's drafts.
status"pending" | "approved" | "rejected"pending,approvedorrejected.
Response
200 OKA page of drafts.
dataarray of DraftrequiredFields of
dataidstringrequireddrf_…object"draft"requiredprofile_idstringrequiredprf_…chat_idstring or nullrequiredtostringrequiredtextstring or nullrequiredattachmentsarray of objectrequiredreply_tostring or nullrequiredservicestring or nullrequiredeffectstring or nullrequiredstatus"pending" | "approved" | "rejected"requiredreasonstring or nullrequiredWhy it was rejected, if the person said.
message_idstring or nullrequiredOnce approved: the message it became.
created_bystringrequiredapi_key:key_…(the draft-only key that wrote it).decided_bystring or nullrequireduser:usr_…orapi_key:key_….decided_attimestamp or nullrequiredcreated_attimestamprequired
has_morebooleanrequiredMore items exist after this page.
next_beforestring or nullrequiredPass as
beforefor the next page; null on the last one.
Errors
| Status | Code | Means |
|---|---|---|
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.