Identity: threads
Message threads, newest first, with unread counts; every thread held is listed, a removed contact’s too, with what its contact is now
Section titled “Message threads, newest first, with unread counts; every thread held is listed, a removed contact’s too, with what its contact is now”GET /v1/identities/{slug}/threads · operation listThreads
Requires the batondeck:messages:read permission (action message:read).
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
slug |
path | string | yes | |
limit |
query | integer | yes | min 1, max 200, default 50 |
cursor |
query | string |
Responses
| Status | Meaning |
|---|---|
| 200 | Message threads, newest first, with unread counts; every thread held is listed, a removed contact’s too, with what its contact is now |
| 400 | The arguments did not validate. |
| 401 | No portal session, and no live API key. |
| 403 | The policy refused, or the request was cross-site. |
| 404 | No such resource, or none this session may see. |
200 response schema
{ "type": "object", "properties": { "threads": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "contact_fpr": { "type": "string" }, "topic": { "type": "string" }, "last_at": { "type": "number" }, "unread": { "type": "number" }, "preview": { "type": "string" }, "trust": { "type": "string" }, "contact_status": { "type": "string", "enum": [ "active", "pending_in", "pending_out", "blocked", "removed" ] }, "removed_contact": { "anyOf": [ { "type": "object", "properties": { "display_name": { "type": "string" }, "petname": { "type": "string" } }, "required": [ "display_name", "petname" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "id", "contact_fpr", "topic", "last_at", "unread", "preview", "trust", "contact_status", "removed_contact" ], "additionalProperties": false } }, "cursor": { "type": "string" } }, "required": [ "threads" ], "additionalProperties": false}curl -X GET 'https://api.batondeck.com/v1/identities/:slug/threads?limit=:limit' \ -H "Authorization: Bearer $BATONDECK_API_KEY"