BookbagBookbag

List & get contacts (v1)

GET /api/v1/chatbots/:chatbotId/contacts to list (paged) and GET /api/v1/chatbots/:chatbotId/contacts/:contactId to fetch one by external id.

View as Markdown

GET /api/v1/chatbots/:chatbotId/contacts

List contacts for an agent. Page-based pagination, returned in a pages object alongside the total. contactId in the single-get path is the contact's external_id.

ParamInTypeNotes
chatbotIdpathintegerThe agent id.
pagequeryintegerPage number (default 1).
per_pagequeryintegerItems per page. Clamped to 10–1000, default 100.
curl "https://app.bookbag.ai/api/v1/chatbots/123/contacts?page=1&per_page=50" \
  -H "Authorization: Bearer $BOOKBAG_API_KEY"

GET /api/v1/chatbots/:chatbotId/contacts/:contactId

Fetch a single contact by its external_id.

ParamInTypeNotes
chatbotIdpathintegerThe agent id.
contactIdpathstringThe contact's external_id.
curl https://app.bookbag.ai/api/v1/chatbots/123/contacts/user_8821 \
  -H "Authorization: Bearer $BOOKBAG_API_KEY"

Status codes

StatusMeaning
200Success.
401Missing or invalid key.
404Unknown chatbot/contact, or out of scope. Body: { message: "Resource not found" }.

See Errors.