Contacts
Update a contact
Updates an existing contact's information
patch/chatbots/{chatbotId}/contacts/{contactId}
Request
- Base URLhttps://www.chatbase.co/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
chatbotIdstring required
ID of the chatbot
contactIdstring required
External ID or internal ID of the contact. If both match different contacts, the external ID match wins.
Request body
Example request
{
"data": {
"external_id": "user_123",
"name": "John Doe",
"email": "john@example.com",
"phonenumber": "+1234567890",
"stripe_accounts": [
{
"label": "main",
"stripe_id": "cus_123abc456",
"stripe_email": "john@example.com"
}
],
"custom_attributes": {
"department": "Engineering",
"subscription_tier": "Enterprise"
}
}
}Response
Contact updated successfully
Example response
{
"message": "Success",
"data": {
"id": "contact_internal_123",
"external_id": "user_123",
"name": "John Doe",
"email": "john@example.com",
"phonenumber": "+1234567890",
"stripe_accounts": [
{
"label": "main",
"stripe_id": "cus_123abc456",
"stripe_email": "john@example.com"
}
],
"custom_attributes": {
"department": "Sales",
"subscription_tier": "Premium"
},
"created_at": 1704067200,
"updated_at": 1704153600
}
}Changes
No recorded changes to this operation across all 5 revisions of this API.