POST
/
contact
/
create
curl --request POST \
  --url https://api.thoughtly.com/contact/create \
  --header 'Content-Type: application/json' \
  --header 'team_id: <api-key>' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "phone_number": "<string>",
  "name": "<string>",
  "email": "<string>",
  "country_code": "<string>",
  "tags": [
    "<string>"
  ],
  "attributes": {}
}'
{
  "error": {},
  "data": {}
}

Authorizations

x-api-token
string
header
required

API key for the user making the request. This can be found via the Developer Settings page in the dashboard.

team_id
string
header
required

Team identifier, used to scope requests to a specific team. This can be found via the Developer Settings page in the dashboard.

Body

application/json
phone_number
string
required

The phone number of the Contact. This is required to initiate calls.

name
string

The name of the Contact.

email
string

The email address associated with the Contact (optional).

country_code
string

The country code for the Contact's phone number.

tags
string[]

Tags associated with the Contact to help categorize or segment them.

attributes
object

Custom attributes you can assign to the Contact. These can be referenced in the Agent script.

Response

200 - application/json
Successful response

The generic response format for all API requests. This structure ensures consistency in how success and error information is returned to the caller.

data
object
required

Contains the response data for the successful request. This field will vary based on the specific API endpoint being called and contains the main data returned from the API. For example, it may include information about a created contact, agent, or webhook subscription.

error
object | null

An object containing error details, if any. This field will be populated if the API request fails or encounters an error. If the request is successful, this field will be null or omitted.