POST
/
job
/
create_job_by_contacts
curl --request POST \
  --url https://api.thoughtly.com/job/create_job_by_contacts \
  --header 'Content-Type: application/json' \
  --header 'team_id: <api-key>' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "interview_id": "<string>",
  "contact_ids": [
    "<string>"
  ],
  "phone_numbers": [
    "<string>"
  ],
  "country_code": "<string>"
}'
{
  "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
interview_id
string
required

The ID of the Agent (formerly Interview) that will be used to make the call. This ID can be found in the URL of the Agent page. The Agent is responsible for the conversation flow during the call.

contact_ids
string[]

A list of Contact IDs to call. You can pass multiple Contact IDs to call multiple contacts.

phone_numbers
string[]

A list of phone numbers to call directly if you don't want to use Contact IDs.

country_code
string

The country code for the phone numbers being dialed (e.g., '+1' for the USA).

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.