Request

URL

GET https://www.chatbase.co/api/v1/chatbots/{chatbotId}/contacts/{contactId}

Path Parameters

chatbotId
string
required

The ID of the chatbot the contact belongs to

contactId
string
required

The ID of the contact to retrieve

Headers

Authorization
string
required

Bearer <YOUR_API_KEY>

Response

Success Response

  • Status: 200 OK
  • Content-Type: application/json
message
string

Success message

data
Contact Object
{
  "message": "Success",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "external_id": "kX2b8YpI-jRmN3vQ5",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "phonenumber": "+1234567890",
    "custom_attributes": {
      "age": 30,
      "location": "New York"
    },
    "created_at": 1571672154,
    "updated_at": 1571672154
  }
}

Error Responses

401 Unauthorized

  • Invalid or missing API key
{
  "message": "Unauthorized access"
}

404 Not Found

  • Chatbot or contact not found
{
  "message": "Contact not found"
}

429 Too Many Requests

  • Rate limit exceeded
{
  "message": "Rate limit exceeded"
}

Code Examples