Overview
This endpoint allows you to update an existing contact’s information in your Setter AI account. You can update contact details like name, email, phone number, timezone, and custom metadata fields.Contact Identification: You must provide at least one identifier (ID, WhatsApp ID, or SMS phone number) to locate the contact.
Contact Identification
You can identify a contact using any of these methods:By Contact ID
Use the internal contact ID for direct lookup:By WhatsApp ID
Use the WhatsApp ID for contacts from WhatsApp integrations:By SMS Phone Number
Use the SMS phone number for contacts from SMS integrations:Updatable Fields
All contact fields are optional in the update request. Only provided fields will be updated:- firstName - Contact’s first name
- lastName - Contact’s last name
- fullName - Contact’s full name
- phoneNumber - Contact’s phone number
- email - Contact’s email address (must be valid format)
- defaultTimeZone - Contact’s default timezone (IANA format)
- metadata - Custom key-value pairs for additional contact data
Important Notes
- Authentication: All requests require a Bearer token in the Authorization header
- Unique Contact: If multiple contacts match the identifier, the operation fails with a 409 error
- Access Control: Only contacts that your organization has access to can be updated
- Validation: Email addresses are validated for proper format
- Metadata: The metadata field supports custom key-value pairs for storing additional contact information
Error Handling
The endpoint provides specific error responses for different scenarios:- 400: Missing identifier or invalid field format
- 404: No contacts found with the provided identifier
- 409: Multiple contacts matched the identifier
- 401/403: Authentication or authorization errors
Getting Your API Key
API keys can be generated from your Setter AI dashboard under Settings > API Keys. Keep your API key secure and never expose it in client-side code.Example Usage
Update Contact Name and Email
Update Contact Metadata
Authorizations
Bearer token authentication using your API key
Body
application/json
Contact ID for direct lookup
Example:
123
WhatsApp ID for contact lookup
Example:
"1234567890"
SMS phone number for contact lookup
Example:
"1234567890"
Contact's first name
Example:
"John"
Contact's last name
Example:
"Doe"
Contact's full name
Example:
"John Doe"
Contact's phone number
Example:
"1234567890"
Contact's email address
Example:
"john@example.com"
Contact's default timezone
Example:
"America/New_York"
Custom key-value pairs to store with the contact
Example:
{
"source": "website",
"campaign": "summer2024"
}