tebarDocs
GuideDevelopersAPI ReferenceChangelog
Inbox

Get a DM conversation

GET
/v1/inbox/conversations/{id}

Requires the read scope.

Authorization

bearer
headerAuthorizationBearer <token>

An API key (tb_live_...) from the dashboard, or an OAuth access token.

Path Parameters

id*string
Formatuuid

Header Parameters

Tebar-Profile?string

Limits an owner key to one profile (id or external_id). Unknown: 404 profile_not_found.

Response Body

The conversation.

application/json
  1. response
id*string
Formatuuid
profile_id*string
Formatuuid
account*
contact*
status*string
Value in"open""done"
unread_count*integer
last_message_at*string
Formatdate-time
last_message_preview*string|null
last_message_unsent*boolean

The newest message was unsent (preview is null).

last_message_direction*|null
window_expires_at*|

Until when a normal reply is allowed: 24 hours after the customer's last message.

human_agent_expires_at*|

The same for a HUMAN_AGENT reply (7 days).

held_by_other_app*boolean

Another app holds the conversation (conversation routing): replies are refused until it lets go.

Example Request
curl -X GET 'https://api.tebar.app/v1/inbox/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "profile_id": "bfcb6779-b1f9-41fc-92d7-88f8bc1d12e8",
  "account": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "platform": "threads",
    "username": "string",
    "display_name": "string"
  },
  "contact": {
    "platform_id": "string",
    "username": "string",
    "name": "string",
    "avatar_url": "string",
    "follower_count": 0,
    "follows_you": true,
    "verified": true
  },
  "status": "open",
  "unread_count": 0,
  "last_message_at": "2019-08-24T14:15:22Z",
  "last_message_preview": "string",
  "last_message_unsent": true,
  "last_message_direction": "in",
  "window_expires_at": "2019-08-24T14:15:22Z",
  "human_agent_expires_at": "2019-08-24T14:15:22Z",
  "held_by_other_app": true
}