Campañas
Campañas salientes y sus intentos de llamada.
GET /v1/caller-ids
Caller IDs of my organization
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Any signed-in member (not an API key). The numbers the organization may show when its campaigns call, oldest first. A campaign chooses among them with its `caller_id` strategy. This is configuration: routing a call over a real trunk with that number needs SIP, which is not live yet. 401 when the token is missing, expired or invalid; 503 until caller IDs are deployed.
Respuestas
200Successful Response · CallerIdListNombre Tipo Requerido Descripción itemsCallerIdResponse[]sí items[].created_atstring (date-time)sí items[].idstring (uuid)sí items[].labelstringsí items[].phone_e164stringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse503Caller IDs are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/caller-ids
Add a caller ID
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key) adds a number (`phone_e164`, E.164) with a `label` of 1 to 60 characters. An organization has at most 50. Audited as `caller_id.create` with the id and label only, never the number. 401 when the token is missing, expired or invalid; 403 below `admin`; 409 `caller_id_taken` when the organization has the number already, 409 `caller_id_limit` when it has 50; 422 when the body is invalid; 503 until caller IDs are deployed.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
label | string | sí | |
phone_e164 | string | sí |
Respuestas
201Successful Response · CallerIdResponseNombre Tipo Requerido Descripción created_atstring (date-time)sí idstring (uuid)sí labelstringsí phone_e164stringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse409`caller_id_taken` (the number exists), `caller_id_limit` (50 reached) or `caller_id_in_use` (a campaign uses it). · ErrorResponse503Caller IDs are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
DELETE /v1/caller-ids/{caller_id}
Remove a caller ID
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key). A number that a draft, running or paused campaign uses as its `fixed` caller ID is `409` `caller_id_in_use`: change or cancel the campaign first. Audited as `caller_id.delete`. 401 when the token is missing, expired or invalid; 403 below `admin`; 404 when the number is not the organization's; 503 until caller IDs are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
caller_id | path | string (uuid) | sí |
Respuestas
204Successful Response401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such caller ID in the caller's tenant. · ErrorResponse409`caller_id_taken` (the number exists), `caller_id_limit` (50 reached) or `caller_id_in_use` (a campaign uses it). · ErrorResponse503Caller IDs are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns
List the campaigns of my organization
API key con campaigns:read · Rol: viewer o superior
Any signed-in member of the tenant, or an API key with `campaigns:read`. Each item is a campaign with its configuration and `counters`, newest first. `status` keeps one status. Pass `next_cursor` of a page as `cursor` to get the next one; it is `null` on the last page and the cursor is opaque. `limit` is at most 200 (default 100). 401 when the token is missing, expired or invalid; 422 when a parameter is out of range or the cursor is not one we issued; 503 until campaigns are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
status | query | string | null | ||
limit | query | integer | ||
cursor | query | string | null |
Respuestas
200Successful Response · CampaignPageNombre Tipo Requerido Descripción itemsCampaignResponse[]sí items[].assistant_idstring (uuid)sí items[].caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. items[].caller_id.caller_id_idstring (uuid) | nullitems[].caller_id.strategystring(none, fixed, round_robin, area_code) items[].completed_atstring (date-time) | nullsí items[].contact_import_idstring (uuid)sí items[].contacts_totalintegersí items[].countersCampaignCounterssí items[].counters.attempts_by_outcomeOutcomeCountssí items[].counters.attempts_totalintegersí items[].counters.contacts_by_stateContactStateCountssí items[].counters.contacts_doneintegersí items[].counters.final_outcomesOutcomeCountssí items[].counters.progressnumbersí `contacts_done` over `contacts_total`. items[].cpsintegersí items[].created_atstring (date-time)sí items[].has_experimentbooleanitems[].idstring (uuid)sí items[].max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. items[].max_concurrencyintegersí items[].namestringsí items[].outbound_trunk_idstring (uuid) | nullitems[].priorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. items[].recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. items[].retryRetryPolicysí items[].retry.max_attemptsintegeritems[].retry.retry_delay_minutesintegeritems[].retry.retry_onstring[]items[].retry.rulesRetryRule[]items[].scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. items[].schedule.daily_call_capinteger | nullitems[].schedule.extra_windowsWindow[]items[].schedule.holiday_countrystringitems[].schedule.max_attempts_per_dayinteger | nullitems[].schedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) items[].schedule.skip_datesstring (date)[]items[].schedule.skip_holidaysbooleanitems[].schedule.weekdaysinteger[]sí items[].schedule.window_endstringsí items[].schedule.window_startstringsí items[].started_atstring (date-time) | nullsí items[].statusstringsí (draft, running, paused, completed, cancelled) items[].timezonestringsí next_cursorstring | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/campaigns
Create a campaign draft
API key con campaigns:write · Rol: editor o superior
An `editor` or above creates a campaign as a `draft` from a `completed` contact import of the tenant. `outbound_trunk_id` selects an owned Eco trunk UUID; null follows the organization default, and a foreign or unknown selection is 422 `invalid_outbound_trunk`. The import's accepted contacts (phone and variables) are copied into the campaign at this moment, so later changes to the import or the do-not-call list do not edit the list, although the do-not-call list is checked again before every call. `assistant_id` must identify a non-archived assistant in the tenant with a published version. `schedule` has the allowed `weekdays` (ISO, 1 Monday to 7 Sunday) and a daily window `window_start` to `window_end` (`HH:MM`, local, start before end) in which a call may start. `extra_windows` (up to 6) add ranges: each has its own `weekdays`, `start` and `end`, so a day can have two ranges (9 to 13 and 15 to 20) and another weekday its own; ranges on one weekday must not overlap. `skip_dates` (up to 100 dates, `YYYY-MM-DD`) are days without calls, and `skip_holidays` skips the national holidays of `holiday_country` (`AR`, calendar 2026 and 2027, default off). `max_attempts_per_day` (1 to 10) caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. The windows are read in the contact's own time zone when the import had a `timezone` variable with an IANA name (for example `America/Argentina/Cordoba`), and in the campaign's `timezone` otherwise (default `America/Argentina/Buenos_Aires`). `retry`: a contact is tried at most `max_attempts` times (1 to 10, default 3), waiting `retry_delay_minutes` (1 to 1440, default 60) after an attempt that ended in one of `retry_on` (`busy`, `no_answer`, `voicemail`, `failed`; default `busy` and `no_answer`). `retry.rules` (up to 4, one per outcome) override that per outcome: `delay_minutes` (1 to 10,080; 1440 is the next day) and an optional `max_attempts` for attempts that ended that way (busy every 15 minutes up to 3 times, no answer every 2 hours up to 4, voicemail the next day). A `failed` call that the dialer reports as `permanent` is never retried. `priority` (1 to 10, default 5) weights the share of the free call slots a campaign gets when several of the organization run at once. `caller_id` (default `{strategy: none}`) sets the number shown to the contact: `fixed` with `caller_id_id`, `round_robin` over the organization's caller IDs, or `area_code` (the number closest to the contact's area code). The selected caller ID is used for real SIP calls. `422` when `caller_id_id` is not one of the organization's. `recording` (default null) overrides the assistant version's audio recording setting for this campaign: true records, false does not, null follows the assistant. `cps` (1 to 50, default 1) is how many calls start per second and `max_concurrency` (1 to 200, default 10) how many calls are open at once. Calls go out through the organization's outbound trunk; without one, start answers 409 `no_outbound_trunk`. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 409 when the import does not exist in the tenant, is not `completed` or accepted no contact; 422 when the body is invalid, `timezone` is not a known IANA name (`invalid_timezone`) or the assistant does not exist in the tenant or has never been published (`assistant_not_published`) or is archived (`assistant_archived`); 503 until campaigns are deployed.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
assistant_id | string (uuid) | sí | |
caller_id | CallerIdPolicy | How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. | |
caller_id.caller_id_id | string (uuid) | null | ||
caller_id.strategy | string | (none, fixed, round_robin, area_code) | |
contact_import_id | string (uuid) | sí | |
cps | integer | ||
experiment | CampaignExperiment | null | ||
experiment.mode | "rules" | "agent" | sí | (rules, agent) |
experiment.objective | TrialObjective | null | ||
experiment.objective.expected_value | boolean | integer | number | string | sí | |
experiment.objective.field | string | sí | |
experiment.trial_contacts | integer | null | ||
experiment.trial_percentage | integer | null | ||
experiment.variants | TrialVariant[] | sí | |
experiment.variants[].version_id | string (uuid) | sí | |
experiment.variants[].weight | integer | sí | |
max_call_duration_seconds | integer | null | Maximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. | |
max_concurrency | integer | ||
name | string | sí | |
outbound_trunk_id | string (uuid) | null | ||
priority | integer | ||
recording | boolean | null | Overrides the assistant version's `behavior.recording.enabled` for this campaign: true records the audio of its calls, false does not, null (default) follows the assistant. | |
retry | RetryPolicy | ||
retry.max_attempts | integer | ||
retry.retry_delay_minutes | integer | ||
retry.retry_on | string[] | ||
retry.rules | RetryRule[] | ||
retry.rules[].delay_minutes | integer | sí | |
retry.rules[].max_attempts | integer | null | ||
retry.rules[].outcome | string | sí | The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) |
schedule | Schedule | sí | When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. |
schedule.daily_call_cap | integer | null | ||
schedule.extra_windows | Window[] | ||
schedule.extra_windows[].end | string | sí | |
schedule.extra_windows[].start | string | sí | |
schedule.extra_windows[].weekdays | integer[] | sí | |
schedule.holiday_country | string | ||
schedule.max_attempts_per_day | integer | null | ||
schedule.recurrence | "once" | "weekly" | Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) | |
schedule.skip_dates | string (date)[] | ||
schedule.skip_holidays | boolean | ||
schedule.weekdays | integer[] | sí | |
schedule.window_end | string | sí | |
schedule.window_start | string | sí | |
timezone | string |
Respuestas
201Successful Response · CampaignResponseNombre Tipo Requerido Descripción assistant_idstring (uuid)sí caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. caller_id.caller_id_idstring (uuid) | nullcaller_id.strategystring(none, fixed, round_robin, area_code) completed_atstring (date-time) | nullsí contact_import_idstring (uuid)sí contacts_totalintegersí countersCampaignCounterssí counters.attempts_by_outcomeOutcomeCountssí counters.attempts_by_outcome.answeredintegersí counters.attempts_by_outcome.busyintegersí counters.attempts_by_outcome.dncintegersí counters.attempts_by_outcome.failedintegersí counters.attempts_by_outcome.no_answerintegersí counters.attempts_by_outcome.voicemailintegersí counters.attempts_totalintegersí counters.contacts_by_stateContactStateCountssí counters.contacts_by_state.doneintegersí counters.contacts_by_state.in_progressintegersí counters.contacts_by_state.pendingintegersí counters.contacts_doneintegersí counters.final_outcomesOutcomeCountssí counters.final_outcomes.answeredintegersí counters.final_outcomes.busyintegersí counters.final_outcomes.dncintegersí counters.final_outcomes.failedintegersí counters.final_outcomes.no_answerintegersí counters.final_outcomes.voicemailintegersí counters.progressnumbersí `contacts_done` over `contacts_total`. cpsintegersí created_atstring (date-time)sí has_experimentbooleanidstring (uuid)sí max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. max_concurrencyintegersí namestringsí outbound_trunk_idstring (uuid) | nullpriorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. retryRetryPolicysí retry.max_attemptsintegerretry.retry_delay_minutesintegerretry.retry_onstring[]retry.rulesRetryRule[]retry.rules[].delay_minutesintegersí retry.rules[].max_attemptsinteger | nullretry.rules[].outcomestringsí The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. schedule.daily_call_capinteger | nullschedule.extra_windowsWindow[]schedule.extra_windows[].endstringsí schedule.extra_windows[].startstringsí schedule.extra_windows[].weekdaysinteger[]sí schedule.holiday_countrystringschedule.max_attempts_per_dayinteger | nullschedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) schedule.skip_datesstring (date)[]schedule.skip_holidaysbooleanschedule.weekdaysinteger[]sí schedule.window_endstringsí schedule.window_startstringsí started_atstring (date-time) | nullsí statusstringsí (draft, running, paused, completed, cancelled) timezonestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse409The campaign is not in a state for this. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns/{campaign_id}
One campaign with its counters
API key con campaigns:read · Rol: viewer o superior
Any signed-in member of the tenant, or an API key with `campaigns:read`. `counters` has the contacts by state (`pending`, `in_progress`, `done`), the done contacts by the outcome that closed them, the closed attempts by outcome and `progress`, `contacts_done` over `contacts_total`. A campaign is `completed` when every contact is done. 401 when the token is missing, expired or invalid; 404 when the campaign does not exist in the caller's tenant; 503 until campaigns are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · CampaignResponseNombre Tipo Requerido Descripción assistant_idstring (uuid)sí caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. caller_id.caller_id_idstring (uuid) | nullcaller_id.strategystring(none, fixed, round_robin, area_code) completed_atstring (date-time) | nullsí contact_import_idstring (uuid)sí contacts_totalintegersí countersCampaignCounterssí counters.attempts_by_outcomeOutcomeCountssí counters.attempts_by_outcome.answeredintegersí counters.attempts_by_outcome.busyintegersí counters.attempts_by_outcome.dncintegersí counters.attempts_by_outcome.failedintegersí counters.attempts_by_outcome.no_answerintegersí counters.attempts_by_outcome.voicemailintegersí counters.attempts_totalintegersí counters.contacts_by_stateContactStateCountssí counters.contacts_by_state.doneintegersí counters.contacts_by_state.in_progressintegersí counters.contacts_by_state.pendingintegersí counters.contacts_doneintegersí counters.final_outcomesOutcomeCountssí counters.final_outcomes.answeredintegersí counters.final_outcomes.busyintegersí counters.final_outcomes.dncintegersí counters.final_outcomes.failedintegersí counters.final_outcomes.no_answerintegersí counters.final_outcomes.voicemailintegersí counters.progressnumbersí `contacts_done` over `contacts_total`. cpsintegersí created_atstring (date-time)sí has_experimentbooleanidstring (uuid)sí max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. max_concurrencyintegersí namestringsí outbound_trunk_idstring (uuid) | nullpriorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. retryRetryPolicysí retry.max_attemptsintegerretry.retry_delay_minutesintegerretry.retry_onstring[]retry.rulesRetryRule[]retry.rules[].delay_minutesintegersí retry.rules[].max_attemptsinteger | nullretry.rules[].outcomestringsí The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. schedule.daily_call_capinteger | nullschedule.extra_windowsWindow[]schedule.extra_windows[].endstringsí schedule.extra_windows[].startstringsí schedule.extra_windows[].weekdaysinteger[]sí schedule.holiday_countrystringschedule.max_attempts_per_dayinteger | nullschedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) schedule.skip_datesstring (date)[]schedule.skip_holidaysbooleanschedule.weekdaysinteger[]sí schedule.window_endstringsí schedule.window_startstringsí started_atstring (date-time) | nullsí statusstringsí (draft, running, paused, completed, cancelled) timezonestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns/{campaign_id}/attempts
Call attempts of a campaign
API key con campaigns:read · Rol: viewer o superior
Any signed-in member of the tenant, or an API key with `campaigns:read`. Attempts are newest first. `outcome` keeps the attempts that ended with it (`answered`, `busy`, `no_answer`, `voicemail`, `failed`, `dnc`). An attempt still on the line has `status` `in_progress` and no `outcome`. Released dispatches remain visible without an outcome filter. `dispatch_sequence` counts every dispatch per contact; `attempt_number` is the retry-budget position. `failure_kind` preserves the recorded failure classification. `assistant_version` and `assistant_version_id` identify the assigned snapshot when known. `phone_last4` is the end of the number; the number itself is not returned. Paging as in `GET /v1/campaigns`. 401 when the token is missing, expired or invalid; 404 when the campaign does not exist in the caller's tenant; 422 when a parameter is invalid; 503 until campaigns are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
outcome | query | string | null | ||
limit | query | integer | ||
cursor | query | string | null |
Respuestas
200Successful Response · AttemptPageNombre Tipo Requerido Descripción itemsAttemptResponse[]sí items[].assistant_versioninteger | nullitems[].assistant_version_idstring (uuid) | nullitems[].attempt_numberintegersí items[].contact_idstring (uuid)sí items[].dispatch_sequenceintegersí Dispatch order for this contact, including released leases. items[].duration_secondsinteger | nullsí items[].ended_atstring (date-time) | nullsí items[].failure_kindstring | null(transient, permanent) items[].idstring (uuid)sí items[].outcomestring | nullsí (answered, busy, no_answer, voicemail, failed, dnc) items[].phone_last4stringsí Last four digits of the number: the phone is personal data. items[].started_atstring (date-time)sí items[].statusstringsí (in_progress, completed, released) next_cursorstring | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/campaigns/{campaign_id}/cancel
Cancel a campaign
API key con campaigns:write · Rol: editor o superior
An `editor` or above cancels a `draft`, `running` or `paused` campaign for good: no new call starts, calls in progress finish and are not retried. Answers the campaign. Statuses move `draft` to `running`, `running` to `paused` and back, and any of those to `cancelled`; `completed` is reached when the last contact is done. Every change is written to the audit log. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 404 when the campaign does not exist in the caller's tenant; 409 when the campaign is not in a status that allows it, or, to start or resume, `no_outbound_trunk` (the campaign has no usable owned outbound trunk on the media server) or `no_caller_id` (the organization has no caller ID); 503 until campaigns are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · CampaignResponseNombre Tipo Requerido Descripción assistant_idstring (uuid)sí caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. caller_id.caller_id_idstring (uuid) | nullcaller_id.strategystring(none, fixed, round_robin, area_code) completed_atstring (date-time) | nullsí contact_import_idstring (uuid)sí contacts_totalintegersí countersCampaignCounterssí counters.attempts_by_outcomeOutcomeCountssí counters.attempts_by_outcome.answeredintegersí counters.attempts_by_outcome.busyintegersí counters.attempts_by_outcome.dncintegersí counters.attempts_by_outcome.failedintegersí counters.attempts_by_outcome.no_answerintegersí counters.attempts_by_outcome.voicemailintegersí counters.attempts_totalintegersí counters.contacts_by_stateContactStateCountssí counters.contacts_by_state.doneintegersí counters.contacts_by_state.in_progressintegersí counters.contacts_by_state.pendingintegersí counters.contacts_doneintegersí counters.final_outcomesOutcomeCountssí counters.final_outcomes.answeredintegersí counters.final_outcomes.busyintegersí counters.final_outcomes.dncintegersí counters.final_outcomes.failedintegersí counters.final_outcomes.no_answerintegersí counters.final_outcomes.voicemailintegersí counters.progressnumbersí `contacts_done` over `contacts_total`. cpsintegersí created_atstring (date-time)sí has_experimentbooleanidstring (uuid)sí max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. max_concurrencyintegersí namestringsí outbound_trunk_idstring (uuid) | nullpriorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. retryRetryPolicysí retry.max_attemptsintegerretry.retry_delay_minutesintegerretry.retry_onstring[]retry.rulesRetryRule[]retry.rules[].delay_minutesintegersí retry.rules[].max_attemptsinteger | nullretry.rules[].outcomestringsí The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. schedule.daily_call_capinteger | nullschedule.extra_windowsWindow[]schedule.extra_windows[].endstringsí schedule.extra_windows[].startstringsí schedule.extra_windows[].weekdaysinteger[]sí schedule.holiday_countrystringschedule.max_attempts_per_dayinteger | nullschedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) schedule.skip_datesstring (date)[]schedule.skip_holidaysbooleanschedule.weekdaysinteger[]sí schedule.window_endstringsí schedule.window_startstringsí started_atstring (date-time) | nullsí statusstringsí (draft, running, paused, completed, cancelled) timezonestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse409The campaign is not in a state for this. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns/{campaign_id}/experiment
Compare the variants of a campaign version trial
API key con campaigns:read · Rol: viewer o superior
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · CampaignTrialResponseNombre Tipo Requerido Descripción mode"rules" | "agent"sí (rules, agent) objective_fieldstring | nullsí phase"trial" | "evaluating" | "winner" | "cancelled"sí (trial, evaluating, winner, cancelled) reasonstring | nullsí variantsCampaignTrialVariant[]sí variants[].assignedintegersí variants[].completedintegersí variants[].duration_countintegersí variants[].mean_conversation_secondsnumber | nullsí variants[].objective_observedintegersí variants[].objective_ratenumber | nullsí variants[].outcomesobjectsí variants[].response_ratenumber | nullsí variants[].responsesintegersí variants[].successesintegersí variants[].versionintegersí variants[].version_idstring (uuid)sí winner_version_idstring (uuid) | nullsí 403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse429The API key went over its requests per minute. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns/{campaign_id}/optimizer
The campaign optimizer's settings
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Signed-in users only (an API key cannot call it yet). Any signed-in member. The optimizer is a scheduled agent that reads the campaign's calls and its assistant's A/B experiments and proposes (or, in `auto` mode, applies within `guardrails`) starting, stopping or promoting an experiment, and writes a report each run. Off until an `editor` turns it on; `available` is false when the platform has it off. 401, 404 when the campaign is not in the tenant, 503.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · OptimizerResponseNombre Tipo Requerido Descripción availablebooleansí False when the platform has the optimizer off: it cannot be turned on. cadence_minutesintegersí campaign_idstring (uuid)sí enabledbooleansí guardrailsGuardrailssí What the agent may do in `auto` mode, and what a proposal must respect in any mode. `max_variants` caps the arms of an experiment it starts; every arm gets at least `min_variant_weight` percent and the challengers (every arm but the first, the control) at most `max_challenger_weight` percent together. A version is promoted only when each arm has `min_calls_per_variant` calls and the z-test of the experiments says the winner is significantly better than the control (or, to keep the control, no challenger is). At most `max_actions_per_run` actions per run, only the `allowed_actions`; in auto mode it only stops or promotes experiments it started itself. guardrails.allowed_actionsstring[]guardrails.max_actions_per_runintegerguardrails.max_challenger_weightintegerguardrails.max_variantsintegerguardrails.min_calls_per_variantintegerguardrails.min_variant_weightintegerlast_run_atstring (date-time) | nullsí modestringsí (propose, auto) next_run_atstring (date-time) | nullsí updated_atstring (date-time) | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such campaign, run or proposal. · ErrorResponse503The optimizer is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
PUT /v1/campaigns/{campaign_id}/optimizer
Turn the campaign optimizer on or off and set its mode and guardrails
Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior
Signed-in users only (an API key cannot call it yet). An `editor` or above. Turned on, the first run is due at once and the next ones every `cadence_minutes`. In `auto` mode the optimizer acts on its own within the `guardrails`, and only stops or promotes experiments it started; every action is audited (actor kind `optimizer`). Audited as `optimizer.settings.update`. 401, 403 below `editor`, 404, 409 `optimizer_unavailable` when turning it on while the platform has it off, 422 for a cadence out of range or guardrails that do not hold together, 503.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
cadence_minutes | integer | null | Minutes between two runs; null is the platform's default. The platform may ask for more than the minimum here (422 when below it). | |
enabled | boolean | sí | Turn the campaign's optimizer on or off. |
guardrails | Guardrails | What the agent may do in `auto` mode, and what a proposal must respect in any mode. `max_variants` caps the arms of an experiment it starts; every arm gets at least `min_variant_weight` percent and the challengers (every arm but the first, the control) at most `max_challenger_weight` percent together. A version is promoted only when each arm has `min_calls_per_variant` calls and the z-test of the experiments says the winner is significantly better than the control (or, to keep the control, no challenger is). At most `max_actions_per_run` actions per run, only the `allowed_actions`; in auto mode it only stops or promotes experiments it started itself. | |
guardrails.allowed_actions | string[] | ||
guardrails.max_actions_per_run | integer | ||
guardrails.max_challenger_weight | integer | ||
guardrails.max_variants | integer | ||
guardrails.min_calls_per_variant | integer | ||
guardrails.min_variant_weight | integer | ||
mode | string | (propose, auto) |
Respuestas
200Successful Response · OptimizerResponseNombre Tipo Requerido Descripción availablebooleansí False when the platform has the optimizer off: it cannot be turned on. cadence_minutesintegersí campaign_idstring (uuid)sí enabledbooleansí guardrailsGuardrailssí What the agent may do in `auto` mode, and what a proposal must respect in any mode. `max_variants` caps the arms of an experiment it starts; every arm gets at least `min_variant_weight` percent and the challengers (every arm but the first, the control) at most `max_challenger_weight` percent together. A version is promoted only when each arm has `min_calls_per_variant` calls and the z-test of the experiments says the winner is significantly better than the control (or, to keep the control, no challenger is). At most `max_actions_per_run` actions per run, only the `allowed_actions`; in auto mode it only stops or promotes experiments it started itself. guardrails.allowed_actionsstring[]guardrails.max_actions_per_runintegerguardrails.max_challenger_weightintegerguardrails.max_variantsintegerguardrails.min_calls_per_variantintegerguardrails.min_variant_weightintegerlast_run_atstring (date-time) | nullsí modestringsí (propose, auto) next_run_atstring (date-time) | nullsí updated_atstring (date-time) | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this needs. · ErrorResponse404No such campaign, run or proposal. · ErrorResponse409Off for the platform, or already decided. · ErrorResponse503The optimizer is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns/{campaign_id}/optimizer/proposals
The optimizer's proposals of a campaign, newest first
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Signed-in users only (an API key cannot call it yet). Any signed-in member; `status` filters (e.g. `pending`). 401, 404, 503.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
status | query | string | null |
Respuestas
200Successful Response · ProposalListNombre Tipo Requerido Descripción itemsProposalResponse[]sí items[].created_atstring (date-time)sí items[].decided_atstring (date-time) | nullsí items[].decided_bystring | nullsí items[].errorstring | nullsí items[].experiment_idstring (uuid) | nullsí items[].experiment_namestring | nullsí items[].idstring (uuid)sí items[].kindstringsí (start_experiment, stop_experiment, promote_version, keep_measuring, strategy_note) items[].knobstring | nullsí What a strategy note may be about: the campaign settings a person can change. (call_window, retry_delay, max_attempts, max_attempts_per_day, daily_call_cap, pacing) items[].rationalestringsí items[].run_idstring (uuid)sí items[].statusstringsí (pending, applied, rejected, failed, superseded, noted) items[].suggestionstring | nullsí items[].variantsOptimizerVariant[]sí items[].variants[].versionintegersí items[].variants[].weightintegersí items[].versioninteger | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such campaign, run or proposal. · ErrorResponse503The optimizer is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/campaigns/{campaign_id}/optimizer/proposals/{proposal_id}/approve
Approve a pending proposal: it is applied as the caller
Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior
Signed-in users only (an API key cannot call it yet). An `editor` or above. Starts, stops or promotes the experiment as the caller would from the experiments endpoints, with their rules and audit entries. When the experiments changed since it was proposed the answer is the proposal with status `failed` and the reason in `error` (`experiment_running`, `experiment_closed`, `experiment_not_found` or a validation code). Audited as `optimizer.proposal.approve`. 401, 403, 404, 409 `proposal_closed` when it was already decided, 503.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
proposal_id | path | string (uuid) | sí |
Respuestas
200Successful Response · ProposalResponseNombre Tipo Requerido Descripción created_atstring (date-time)sí decided_atstring (date-time) | nullsí decided_bystring | nullsí errorstring | nullsí experiment_idstring (uuid) | nullsí experiment_namestring | nullsí idstring (uuid)sí kindstringsí (start_experiment, stop_experiment, promote_version, keep_measuring, strategy_note) knobstring | nullsí What a strategy note may be about: the campaign settings a person can change. (call_window, retry_delay, max_attempts, max_attempts_per_day, daily_call_cap, pacing) rationalestringsí run_idstring (uuid)sí statusstringsí (pending, applied, rejected, failed, superseded, noted) suggestionstring | nullsí variantsOptimizerVariant[]sí variants[].versionintegersí variants[].weightintegersí versioninteger | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this needs. · ErrorResponse404No such campaign, run or proposal. · ErrorResponse409Off for the platform, or already decided. · ErrorResponse503The optimizer is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/campaigns/{campaign_id}/optimizer/proposals/{proposal_id}/reject
Reject a pending proposal
Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior
Signed-in users only (an API key cannot call it yet). An `editor` or above. Nothing changes. Audited as `optimizer.proposal.reject`. 401, 403, 404, 409 `proposal_closed`, 503.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
proposal_id | path | string (uuid) | sí |
Respuestas
200Successful Response · ProposalResponseNombre Tipo Requerido Descripción created_atstring (date-time)sí decided_atstring (date-time) | nullsí decided_bystring | nullsí errorstring | nullsí experiment_idstring (uuid) | nullsí experiment_namestring | nullsí idstring (uuid)sí kindstringsí (start_experiment, stop_experiment, promote_version, keep_measuring, strategy_note) knobstring | nullsí What a strategy note may be about: the campaign settings a person can change. (call_window, retry_delay, max_attempts, max_attempts_per_day, daily_call_cap, pacing) rationalestringsí run_idstring (uuid)sí statusstringsí (pending, applied, rejected, failed, superseded, noted) suggestionstring | nullsí variantsOptimizerVariant[]sí variants[].versionintegersí variants[].weightintegersí versioninteger | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this needs. · ErrorResponse404No such campaign, run or proposal. · ErrorResponse409Off for the platform, or already decided. · ErrorResponse503The optimizer is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns/{campaign_id}/optimizer/runs
The optimizer's runs of a campaign, newest first
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Signed-in users only (an API key cannot call it yet). Any signed-in member. At most `limit` (1 to 50). 401, 404, 503.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
limit | query | integer |
Respuestas
200Successful Response · OptimizerRunListNombre Tipo Requerido Descripción itemsOptimizerRunResponse[]sí items[].errorstring | nullsí Why a run failed: `not_configured` (no model key), `organization_suspended`, `provider_error`, `too_many_steps` or `agent_error`. items[].finished_atstring (date-time) | nullsí items[].idstring (uuid)sí items[].input_tokensintegersí items[].modestringsí (propose, auto) items[].modelstring | nullsí items[].model_callsintegersí items[].output_tokensintegersí items[].started_atstring (date-time)sí items[].statusstringsí (running, succeeded, failed) 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such campaign, run or proposal. · ErrorResponse503The optimizer is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/campaigns/{campaign_id}/optimizer/runs/{run_id}
One optimizer run with its report and what it proposed
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Signed-in users only (an API key cannot call it yet). Any signed-in member. 401, 404, 503.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
run_id | path | string (uuid) | sí |
Respuestas
200Successful Response · OptimizerRunDetailNombre Tipo Requerido Descripción errorstring | nullsí Why a run failed: `not_configured` (no model key), `organization_suspended`, `provider_error`, `too_many_steps` or `agent_error`. finished_atstring (date-time) | nullsí idstring (uuid)sí input_tokensintegersí modestringsí (propose, auto) modelstring | nullsí model_callsintegersí output_tokensintegersí proposalsProposalResponse[]sí proposals[].created_atstring (date-time)sí proposals[].decided_atstring (date-time) | nullsí proposals[].decided_bystring | nullsí proposals[].errorstring | nullsí proposals[].experiment_idstring (uuid) | nullsí proposals[].experiment_namestring | nullsí proposals[].idstring (uuid)sí proposals[].kindstringsí (start_experiment, stop_experiment, promote_version, keep_measuring, strategy_note) proposals[].knobstring | nullsí What a strategy note may be about: the campaign settings a person can change. (call_window, retry_delay, max_attempts, max_attempts_per_day, daily_call_cap, pacing) proposals[].rationalestringsí proposals[].run_idstring (uuid)sí proposals[].statusstringsí (pending, applied, rejected, failed, superseded, noted) proposals[].suggestionstring | nullsí proposals[].variantsOptimizerVariant[]sí proposals[].variants[].versionintegersí proposals[].variants[].weightintegersí proposals[].versioninteger | nullsí reportstring | nullsí The run's report, Markdown, in Spanish. started_atstring (date-time)sí statusstringsí (running, succeeded, failed) 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such campaign, run or proposal. · ErrorResponse503The optimizer is not available. · ErrorResponsedefaultDefault Response · ErrorResponse
PUT /v1/campaigns/{campaign_id}/outbound-trunk
Change the outbound trunk of a campaign
API key con campaigns:write · Rol: editor o superior
An editor or above selects an assigned organization trunk, or null to follow its default. Changes affect future leases only. Foreign or unusable selections return 422 invalid_outbound_trunk. 404 when the campaign is not in the caller's tenant; 503 when campaigns are not available or, `sip_unavailable`, SIP management is not.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
outbound_trunk_id | string (uuid) | null | sí |
Respuestas
200Successful Response · CampaignResponseNombre Tipo Requerido Descripción assistant_idstring (uuid)sí caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. caller_id.caller_id_idstring (uuid) | nullcaller_id.strategystring(none, fixed, round_robin, area_code) completed_atstring (date-time) | nullsí contact_import_idstring (uuid)sí contacts_totalintegersí countersCampaignCounterssí counters.attempts_by_outcomeOutcomeCountssí counters.attempts_by_outcome.answeredintegersí counters.attempts_by_outcome.busyintegersí counters.attempts_by_outcome.dncintegersí counters.attempts_by_outcome.failedintegersí counters.attempts_by_outcome.no_answerintegersí counters.attempts_by_outcome.voicemailintegersí counters.attempts_totalintegersí counters.contacts_by_stateContactStateCountssí counters.contacts_by_state.doneintegersí counters.contacts_by_state.in_progressintegersí counters.contacts_by_state.pendingintegersí counters.contacts_doneintegersí counters.final_outcomesOutcomeCountssí counters.final_outcomes.answeredintegersí counters.final_outcomes.busyintegersí counters.final_outcomes.dncintegersí counters.final_outcomes.failedintegersí counters.final_outcomes.no_answerintegersí counters.final_outcomes.voicemailintegersí counters.progressnumbersí `contacts_done` over `contacts_total`. cpsintegersí created_atstring (date-time)sí has_experimentbooleanidstring (uuid)sí max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. max_concurrencyintegersí namestringsí outbound_trunk_idstring (uuid) | nullpriorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. retryRetryPolicysí retry.max_attemptsintegerretry.retry_delay_minutesintegerretry.retry_onstring[]retry.rulesRetryRule[]retry.rules[].delay_minutesintegersí retry.rules[].max_attemptsinteger | nullretry.rules[].outcomestringsí The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. schedule.daily_call_capinteger | nullschedule.extra_windowsWindow[]schedule.extra_windows[].endstringsí schedule.extra_windows[].startstringsí schedule.extra_windows[].weekdaysinteger[]sí schedule.holiday_countrystringschedule.max_attempts_per_dayinteger | nullschedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) schedule.skip_datesstring (date)[]schedule.skip_holidaysbooleanschedule.weekdaysinteger[]sí schedule.window_endstringsí schedule.window_startstringsí started_atstring (date-time) | nullsí statusstringsí (draft, running, paused, completed, cancelled) timezonestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse422Code `invalid_outbound_trunk`, or the body is invalid. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet, or SIP management is not (`sip_unavailable`). · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/campaigns/{campaign_id}/pause
Pause a running campaign
API key con campaigns:write · Rol: editor o superior
An `editor` or above pauses a `running` campaign: no new call starts; calls in progress finish. Answers the campaign. Statuses move `draft` to `running`, `running` to `paused` and back, and any of those to `cancelled`; `completed` is reached when the last contact is done. Every change is written to the audit log. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 404 when the campaign does not exist in the caller's tenant; 409 when the campaign is not in a status that allows it, or, to start or resume, `no_outbound_trunk` (the campaign has no usable owned outbound trunk on the media server) or `no_caller_id` (the organization has no caller ID); 503 until campaigns are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · CampaignResponseNombre Tipo Requerido Descripción assistant_idstring (uuid)sí caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. caller_id.caller_id_idstring (uuid) | nullcaller_id.strategystring(none, fixed, round_robin, area_code) completed_atstring (date-time) | nullsí contact_import_idstring (uuid)sí contacts_totalintegersí countersCampaignCounterssí counters.attempts_by_outcomeOutcomeCountssí counters.attempts_by_outcome.answeredintegersí counters.attempts_by_outcome.busyintegersí counters.attempts_by_outcome.dncintegersí counters.attempts_by_outcome.failedintegersí counters.attempts_by_outcome.no_answerintegersí counters.attempts_by_outcome.voicemailintegersí counters.attempts_totalintegersí counters.contacts_by_stateContactStateCountssí counters.contacts_by_state.doneintegersí counters.contacts_by_state.in_progressintegersí counters.contacts_by_state.pendingintegersí counters.contacts_doneintegersí counters.final_outcomesOutcomeCountssí counters.final_outcomes.answeredintegersí counters.final_outcomes.busyintegersí counters.final_outcomes.dncintegersí counters.final_outcomes.failedintegersí counters.final_outcomes.no_answerintegersí counters.final_outcomes.voicemailintegersí counters.progressnumbersí `contacts_done` over `contacts_total`. cpsintegersí created_atstring (date-time)sí has_experimentbooleanidstring (uuid)sí max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. max_concurrencyintegersí namestringsí outbound_trunk_idstring (uuid) | nullpriorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. retryRetryPolicysí retry.max_attemptsintegerretry.retry_delay_minutesintegerretry.retry_onstring[]retry.rulesRetryRule[]retry.rules[].delay_minutesintegersí retry.rules[].max_attemptsinteger | nullretry.rules[].outcomestringsí The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. schedule.daily_call_capinteger | nullschedule.extra_windowsWindow[]schedule.extra_windows[].endstringsí schedule.extra_windows[].startstringsí schedule.extra_windows[].weekdaysinteger[]sí schedule.holiday_countrystringschedule.max_attempts_per_dayinteger | nullschedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) schedule.skip_datesstring (date)[]schedule.skip_holidaysbooleanschedule.weekdaysinteger[]sí schedule.window_endstringsí schedule.window_startstringsí started_atstring (date-time) | nullsí statusstringsí (draft, running, paused, completed, cancelled) timezonestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse409The campaign is not in a state for this. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/campaigns/{campaign_id}/resume
Resume a paused campaign
API key con campaigns:write · Rol: editor o superior
An `editor` or above resumes a `paused` campaign. Answers the campaign. Statuses move `draft` to `running`, `running` to `paused` and back, and any of those to `cancelled`; `completed` is reached when the last contact is done. Every change is written to the audit log. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 404 when the campaign does not exist in the caller's tenant; 409 when the campaign is not in a status that allows it, or, to start or resume, `no_outbound_trunk` (the campaign has no usable owned outbound trunk on the media server) or `no_caller_id` (the organization has no caller ID); 503 until campaigns are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · CampaignResponseNombre Tipo Requerido Descripción assistant_idstring (uuid)sí caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. caller_id.caller_id_idstring (uuid) | nullcaller_id.strategystring(none, fixed, round_robin, area_code) completed_atstring (date-time) | nullsí contact_import_idstring (uuid)sí contacts_totalintegersí countersCampaignCounterssí counters.attempts_by_outcomeOutcomeCountssí counters.attempts_by_outcome.answeredintegersí counters.attempts_by_outcome.busyintegersí counters.attempts_by_outcome.dncintegersí counters.attempts_by_outcome.failedintegersí counters.attempts_by_outcome.no_answerintegersí counters.attempts_by_outcome.voicemailintegersí counters.attempts_totalintegersí counters.contacts_by_stateContactStateCountssí counters.contacts_by_state.doneintegersí counters.contacts_by_state.in_progressintegersí counters.contacts_by_state.pendingintegersí counters.contacts_doneintegersí counters.final_outcomesOutcomeCountssí counters.final_outcomes.answeredintegersí counters.final_outcomes.busyintegersí counters.final_outcomes.dncintegersí counters.final_outcomes.failedintegersí counters.final_outcomes.no_answerintegersí counters.final_outcomes.voicemailintegersí counters.progressnumbersí `contacts_done` over `contacts_total`. cpsintegersí created_atstring (date-time)sí has_experimentbooleanidstring (uuid)sí max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. max_concurrencyintegersí namestringsí outbound_trunk_idstring (uuid) | nullpriorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. retryRetryPolicysí retry.max_attemptsintegerretry.retry_delay_minutesintegerretry.retry_onstring[]retry.rulesRetryRule[]retry.rules[].delay_minutesintegersí retry.rules[].max_attemptsinteger | nullretry.rules[].outcomestringsí The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. schedule.daily_call_capinteger | nullschedule.extra_windowsWindow[]schedule.extra_windows[].endstringsí schedule.extra_windows[].startstringsí schedule.extra_windows[].weekdaysinteger[]sí schedule.holiday_countrystringschedule.max_attempts_per_dayinteger | nullschedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) schedule.skip_datesstring (date)[]schedule.skip_holidaysbooleanschedule.weekdaysinteger[]sí schedule.window_endstringsí schedule.window_startstringsí started_atstring (date-time) | nullsí statusstringsí (draft, running, paused, completed, cancelled) timezonestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse409The campaign is not in a state for this. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/campaigns/{campaign_id}/start
Start a draft campaign
API key con campaigns:write · Rol: editor o superior
An `editor` or above starts a `draft` campaign: it becomes `running`, the `campaign.started` event is published in the same transaction, and calls begin inside the window. Answers the campaign. Statuses move `draft` to `running`, `running` to `paused` and back, and any of those to `cancelled`; `completed` is reached when the last contact is done. Every change is written to the audit log. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 404 when the campaign does not exist in the caller's tenant; 409 when the campaign is not in a status that allows it, or, to start or resume, `no_outbound_trunk` (the campaign has no usable owned outbound trunk on the media server) or `no_caller_id` (the organization has no caller ID); 503 until campaigns are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · CampaignResponseNombre Tipo Requerido Descripción assistant_idstring (uuid)sí caller_idCallerIdPolicysí How a campaign chooses the number it shows. `none` leaves it to the trunk. `fixed` always uses `caller_id_id`. `round_robin` takes the tenant's numbers in turn. `area_code` shows the number that shares the longest prefix with the one called (a Cordoba number for a Cordoba contact), and rotates when none matches. caller_id.caller_id_idstring (uuid) | nullcaller_id.strategystring(none, fixed, round_robin, area_code) completed_atstring (date-time) | nullsí contact_import_idstring (uuid)sí contacts_totalintegersí countersCampaignCounterssí counters.attempts_by_outcomeOutcomeCountssí counters.attempts_by_outcome.answeredintegersí counters.attempts_by_outcome.busyintegersí counters.attempts_by_outcome.dncintegersí counters.attempts_by_outcome.failedintegersí counters.attempts_by_outcome.no_answerintegersí counters.attempts_by_outcome.voicemailintegersí counters.attempts_totalintegersí counters.contacts_by_stateContactStateCountssí counters.contacts_by_state.doneintegersí counters.contacts_by_state.in_progressintegersí counters.contacts_by_state.pendingintegersí counters.contacts_doneintegersí counters.final_outcomesOutcomeCountssí counters.final_outcomes.answeredintegersí counters.final_outcomes.busyintegersí counters.final_outcomes.dncintegersí counters.final_outcomes.failedintegersí counters.final_outcomes.no_answerintegersí counters.final_outcomes.voicemailintegersí counters.progressnumbersí `contacts_done` over `contacts_total`. cpsintegersí created_atstring (date-time)sí has_experimentbooleanidstring (uuid)sí max_call_duration_secondsinteger | nullMaximum answered-call duration in seconds. Null or omitted inherits the platform CALL_MAX_DURATION (30 minutes by default). A campaign override applies to both the dialer's timer and the remote SIP duration limit. max_concurrencyintegersí namestringsí outbound_trunk_idstring (uuid) | nullpriorityintegersí 1 to 10. When several campaigns of the organization run at once, the free call slots are shared in proportion to it. recordingboolean | nullsí Audio recording of the campaign's calls: true records, false does not, null follows the assistant version's `behavior.recording.enabled`. retryRetryPolicysí retry.max_attemptsintegerretry.retry_delay_minutesintegerretry.retry_onstring[]retry.rulesRetryRule[]retry.rules[].delay_minutesintegersí retry.rules[].max_attemptsinteger | nullretry.rules[].outcomestringsí The outcomes a campaign may retry. `answered` ends a contact; `dnc` never retries. (busy, no_answer, voicemail, failed) scheduleSchedulesí When calls may start. The main range is `weekdays` with `window_start` to `window_end`; `extra_windows` add ranges on other weekdays or a second range on the same day (9 to 13 and 15 to 20). All times are local to the contact. A day in `skip_dates`, and a national holiday when `skip_holidays` is on, has no calls. `max_attempts_per_day` caps the attempts per contact in a local day and `daily_call_cap` the attempts of the whole campaign in a day of its time zone. schedule.daily_call_capinteger | nullschedule.extra_windowsWindow[]schedule.extra_windows[].endstringsí schedule.extra_windows[].startstringsí schedule.extra_windows[].weekdaysinteger[]sí schedule.holiday_countrystringschedule.max_attempts_per_dayinteger | nullschedule.recurrence"once" | "weekly"Run once or repeat weekly after the campaign is started. Weekly occurrences are due every seven calendar days from the initial start date in the campaign timezone. Calling windows still govern dialing. An occurrence uses a fresh attempt budget and retains earlier attempt history. Occurrences due while a run is active or the campaign is paused are skipped. Cancelling stops future occurrences. (once, weekly) schedule.skip_datesstring (date)[]schedule.skip_holidaysbooleanschedule.weekdaysinteger[]sí schedule.window_endstringsí schedule.window_startstringsí started_atstring (date-time) | nullsí statusstringsí (draft, running, paused, completed, cancelled) timezonestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse409The campaign is not in a state for this. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/dialer/settings
Dialer limits of my organization
API key con campaigns:read · Rol: viewer o superior
Any signed-in member of the tenant, or an API key with `campaigns:read`. `max_concurrency` is the number of calls that may be open at once across every running campaign of the organization, or `null` when only each campaign's own limit applies. 401 when the token is missing, expired or invalid; 503 until campaigns are deployed.
Respuestas
200Successful Response · DialerSettingsResponseNombre Tipo Requerido Descripción max_concurrencyinteger | nullsí Calls open at once across every running campaign of the organization; `null` means only each campaign's own limit applies. 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
PUT /v1/dialer/settings
Set the dialer limits of my organization
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key). `max_concurrency` (1 to 1,000, or `null` for no cap) limits the calls open at once across every running campaign of the organization; the free slots are shared between the running campaigns by their `priority`. The change is written to the audit log. 401 when the token is missing, expired or invalid; 403 below `admin`; 422 when the body is invalid; 503 until campaigns are deployed.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
max_concurrency | integer | null |
Respuestas
200Successful Response · DialerSettingsResponseNombre Tipo Requerido Descripción max_concurrencyinteger | nullsí Calls open at once across every running campaign of the organization; `null` means only each campaign's own limit applies. 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse503Campaigns are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/outbound-trunks
List the outbound trunks of the organization
API key con campaigns:read · Rol: viewer o superior
Any signed-in member, or an API key with `campaigns:read`. Lists the outbound trunks assigned to the organization and marks its default (`is_default`). 401 when the token is missing, expired or invalid; 503 `sip_unavailable` when SIP management is not available.
Respuestas
200Successful Response · OutboundTrunkOptionsNombre Tipo Requerido Descripción itemsOutboundTrunkOption[]sí items[].idstring (uuid)sí items[].is_defaultbooleansí items[].namestringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503SIP management is not available (`sip_unavailable`). · ErrorResponsedefaultDefault Response · ErrorResponse