Referencia de la API

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

  • 200 Successful Response · CallerIdList
    NombreTipoRequeridoDescripción
    itemsCallerIdResponse[]sí
    items[].created_atstring (date-time)sí
    items[].idstring (uuid)sí
    items[].labelstringsí
    items[].phone_e164stringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 503 Caller IDs are not available yet. · ErrorResponse
  • default Default 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

NombreTipoRequeridoDescripción
labelstringsí
phone_e164stringsí

Respuestas

  • 201 Successful Response · CallerIdResponse
    NombreTipoRequeridoDescripción
    created_atstring (date-time)sí
    idstring (uuid)sí
    labelstringsí
    phone_e164stringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 409 `caller_id_taken` (the number exists), `caller_id_limit` (50 reached) or `caller_id_in_use` (a campaign uses it). · ErrorResponse
  • 503 Caller IDs are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
caller_idpathstring (uuid)sí

Respuestas

  • 204 Successful Response
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 404 No such caller ID in the caller's tenant. · ErrorResponse
  • 409 `caller_id_taken` (the number exists), `caller_id_limit` (50 reached) or `caller_id_in_use` (a campaign uses it). · ErrorResponse
  • 503 Caller IDs are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
statusquerystring | null
limitqueryinteger
cursorquerystring | null

Respuestas

  • 200 Successful Response · CampaignPage
    NombreTipoRequeridoDescripció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) | null
    items[].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_experimentboolean
    items[].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) | null
    items[].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_attemptsinteger
    items[].retry.retry_delay_minutesinteger
    items[].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 | null
    items[].schedule.extra_windowsWindow[]
    items[].schedule.holiday_countrystring
    items[].schedule.max_attempts_per_dayinteger | null
    items[].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_holidaysboolean
    items[].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í
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreTipoRequeridoDescripción
assistant_idstring (uuid)sí
caller_idCallerIdPolicyHow 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) | null
caller_id.strategystring (none, fixed, round_robin, area_code)
contact_import_idstring (uuid)sí
cpsinteger
experimentCampaignExperiment | null
experiment.mode"rules" | "agent"sí (rules, agent)
experiment.objectiveTrialObjective | null
experiment.objective.expected_valueboolean | integer | number | stringsí
experiment.objective.fieldstringsí
experiment.trial_contactsinteger | null
experiment.trial_percentageinteger | null
experiment.variantsTrialVariant[]sí
experiment.variants[].version_idstring (uuid)sí
experiment.variants[].weightintegersí
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_concurrencyinteger
namestringsí
outbound_trunk_idstring (uuid) | null
priorityinteger
recordingboolean | nullOverrides 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.
retryRetryPolicy
retry.max_attemptsinteger
retry.retry_delay_minutesinteger
retry.retry_onstring[]
retry.rulesRetryRule[]
retry.rules[].delay_minutesintegersí
retry.rules[].max_attemptsinteger | null
retry.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 | null
schedule.extra_windowsWindow[]
schedule.extra_windows[].endstringsí
schedule.extra_windows[].startstringsí
schedule.extra_windows[].weekdaysinteger[]sí
schedule.holiday_countrystring
schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
schedule.skip_holidaysboolean
schedule.weekdaysinteger[]sí
schedule.window_endstringsí
schedule.window_startstringsí
timezonestring

Respuestas

  • 201 Successful Response · CampaignResponse
    NombreTipoRequeridoDescripció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) | null
    caller_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_experimentboolean
    idstring (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) | null
    priorityintegersí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_attemptsinteger
    retry.retry_delay_minutesinteger
    retry.retry_onstring[]
    retry.rulesRetryRule[]
    retry.rules[].delay_minutesintegersí
    retry.rules[].max_attemptsinteger | null
    retry.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 | null
    schedule.extra_windowsWindow[]
    schedule.extra_windows[].endstringsí
    schedule.extra_windows[].startstringsí
    schedule.extra_windows[].weekdaysinteger[]sí
    schedule.holiday_countrystring
    schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
    schedule.skip_holidaysboolean
    schedule.weekdaysinteger[]sí
    schedule.window_endstringsí
    schedule.window_startstringsí
    started_atstring (date-time) | nullsí
    statusstringsí (draft, running, paused, completed, cancelled)
    timezonestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 409 The campaign is not in a state for this. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · CampaignResponse
    NombreTipoRequeridoDescripció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) | null
    caller_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_experimentboolean
    idstring (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) | null
    priorityintegersí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_attemptsinteger
    retry.retry_delay_minutesinteger
    retry.retry_onstring[]
    retry.rulesRetryRule[]
    retry.rules[].delay_minutesintegersí
    retry.rules[].max_attemptsinteger | null
    retry.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 | null
    schedule.extra_windowsWindow[]
    schedule.extra_windows[].endstringsí
    schedule.extra_windows[].startstringsí
    schedule.extra_windows[].weekdaysinteger[]sí
    schedule.holiday_countrystring
    schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
    schedule.skip_holidaysboolean
    schedule.weekdaysinteger[]sí
    schedule.window_endstringsí
    schedule.window_startstringsí
    started_atstring (date-time) | nullsí
    statusstringsí (draft, running, paused, completed, cancelled)
    timezonestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 404 No such campaign in the caller's tenant. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí
outcomequerystring | null
limitqueryinteger
cursorquerystring | null

Respuestas

  • 200 Successful Response · AttemptPage
    NombreTipoRequeridoDescripción
    itemsAttemptResponse[]sí
    items[].assistant_versioninteger | null
    items[].assistant_version_idstring (uuid) | null
    items[].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í
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 404 No such campaign in the caller's tenant. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · CampaignResponse
    NombreTipoRequeridoDescripció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) | null
    caller_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_experimentboolean
    idstring (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) | null
    priorityintegersí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_attemptsinteger
    retry.retry_delay_minutesinteger
    retry.retry_onstring[]
    retry.rulesRetryRule[]
    retry.rules[].delay_minutesintegersí
    retry.rules[].max_attemptsinteger | null
    retry.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 | null
    schedule.extra_windowsWindow[]
    schedule.extra_windows[].endstringsí
    schedule.extra_windows[].startstringsí
    schedule.extra_windows[].weekdaysinteger[]sí
    schedule.holiday_countrystring
    schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
    schedule.skip_holidaysboolean
    schedule.weekdaysinteger[]sí
    schedule.window_endstringsí
    schedule.window_startstringsí
    started_atstring (date-time) | nullsí
    statusstringsí (draft, running, paused, completed, cancelled)
    timezonestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 404 No such campaign in the caller's tenant. · ErrorResponse
  • 409 The campaign is not in a state for this. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · CampaignTrialResponse
    NombreTipoRequeridoDescripció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í
  • 403 Role 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). · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · OptimizerResponse
    NombreTipoRequeridoDescripció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_runinteger
    guardrails.max_challenger_weightinteger
    guardrails.max_variantsinteger
    guardrails.min_calls_per_variantinteger
    guardrails.min_variant_weightinteger
    last_run_atstring (date-time) | nullsí
    modestringsí (propose, auto)
    next_run_atstring (date-time) | nullsí
    updated_atstring (date-time) | nullsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 404 No such campaign, run or proposal. · ErrorResponse
  • 503 The optimizer is not available. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Cuerpo de la solicitud

NombreTipoRequeridoDescripción
cadence_minutesinteger | nullMinutes between two runs; null is the platform's default. The platform may ask for more than the minimum here (422 when below it).
enabledbooleansíTurn the campaign's optimizer on or off.
guardrailsGuardrailsWhat 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_runinteger
guardrails.max_challenger_weightinteger
guardrails.max_variantsinteger
guardrails.min_calls_per_variantinteger
guardrails.min_variant_weightinteger
modestring (propose, auto)

Respuestas

  • 200 Successful Response · OptimizerResponse
    NombreTipoRequeridoDescripció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_runinteger
    guardrails.max_challenger_weightinteger
    guardrails.max_variantsinteger
    guardrails.min_calls_per_variantinteger
    guardrails.min_variant_weightinteger
    last_run_atstring (date-time) | nullsí
    modestringsí (propose, auto)
    next_run_atstring (date-time) | nullsí
    updated_atstring (date-time) | nullsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this needs. · ErrorResponse
  • 404 No such campaign, run or proposal. · ErrorResponse
  • 409 Off for the platform, or already decided. · ErrorResponse
  • 503 The optimizer is not available. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí
statusquerystring | null

Respuestas

  • 200 Successful Response · ProposalList
    NombreTipoRequeridoDescripció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í
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 404 No such campaign, run or proposal. · ErrorResponse
  • 503 The optimizer is not available. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí
proposal_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · ProposalResponse
    NombreTipoRequeridoDescripció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í
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this needs. · ErrorResponse
  • 404 No such campaign, run or proposal. · ErrorResponse
  • 409 Off for the platform, or already decided. · ErrorResponse
  • 503 The optimizer is not available. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí
proposal_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · ProposalResponse
    NombreTipoRequeridoDescripció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í
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this needs. · ErrorResponse
  • 404 No such campaign, run or proposal. · ErrorResponse
  • 409 Off for the platform, or already decided. · ErrorResponse
  • 503 The optimizer is not available. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí
limitqueryinteger

Respuestas

  • 200 Successful Response · OptimizerRunList
    NombreTipoRequeridoDescripció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)
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 404 No such campaign, run or proposal. · ErrorResponse
  • 503 The optimizer is not available. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí
run_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · OptimizerRunDetail
    NombreTipoRequeridoDescripció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)
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 404 No such campaign, run or proposal. · ErrorResponse
  • 503 The optimizer is not available. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Cuerpo de la solicitud

NombreTipoRequeridoDescripción
outbound_trunk_idstring (uuid) | nullsí

Respuestas

  • 200 Successful Response · CampaignResponse
    NombreTipoRequeridoDescripció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) | null
    caller_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_experimentboolean
    idstring (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) | null
    priorityintegersí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_attemptsinteger
    retry.retry_delay_minutesinteger
    retry.retry_onstring[]
    retry.rulesRetryRule[]
    retry.rules[].delay_minutesintegersí
    retry.rules[].max_attemptsinteger | null
    retry.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 | null
    schedule.extra_windowsWindow[]
    schedule.extra_windows[].endstringsí
    schedule.extra_windows[].startstringsí
    schedule.extra_windows[].weekdaysinteger[]sí
    schedule.holiday_countrystring
    schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
    schedule.skip_holidaysboolean
    schedule.weekdaysinteger[]sí
    schedule.window_endstringsí
    schedule.window_startstringsí
    started_atstring (date-time) | nullsí
    statusstringsí (draft, running, paused, completed, cancelled)
    timezonestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 404 No such campaign in the caller's tenant. · ErrorResponse
  • 422 Code `invalid_outbound_trunk`, or the body is invalid. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet, or SIP management is not (`sip_unavailable`). · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · CampaignResponse
    NombreTipoRequeridoDescripció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) | null
    caller_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_experimentboolean
    idstring (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) | null
    priorityintegersí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_attemptsinteger
    retry.retry_delay_minutesinteger
    retry.retry_onstring[]
    retry.rulesRetryRule[]
    retry.rules[].delay_minutesintegersí
    retry.rules[].max_attemptsinteger | null
    retry.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 | null
    schedule.extra_windowsWindow[]
    schedule.extra_windows[].endstringsí
    schedule.extra_windows[].startstringsí
    schedule.extra_windows[].weekdaysinteger[]sí
    schedule.holiday_countrystring
    schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
    schedule.skip_holidaysboolean
    schedule.weekdaysinteger[]sí
    schedule.window_endstringsí
    schedule.window_startstringsí
    started_atstring (date-time) | nullsí
    statusstringsí (draft, running, paused, completed, cancelled)
    timezonestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 404 No such campaign in the caller's tenant. · ErrorResponse
  • 409 The campaign is not in a state for this. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · CampaignResponse
    NombreTipoRequeridoDescripció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) | null
    caller_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_experimentboolean
    idstring (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) | null
    priorityintegersí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_attemptsinteger
    retry.retry_delay_minutesinteger
    retry.retry_onstring[]
    retry.rulesRetryRule[]
    retry.rules[].delay_minutesintegersí
    retry.rules[].max_attemptsinteger | null
    retry.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 | null
    schedule.extra_windowsWindow[]
    schedule.extra_windows[].endstringsí
    schedule.extra_windows[].startstringsí
    schedule.extra_windows[].weekdaysinteger[]sí
    schedule.holiday_countrystring
    schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
    schedule.skip_holidaysboolean
    schedule.weekdaysinteger[]sí
    schedule.window_endstringsí
    schedule.window_startstringsí
    started_atstring (date-time) | nullsí
    statusstringsí (draft, running, paused, completed, cancelled)
    timezonestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 404 No such campaign in the caller's tenant. · ErrorResponse
  • 409 The campaign is not in a state for this. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreEnTipoRequeridoDescripción
campaign_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · CampaignResponse
    NombreTipoRequeridoDescripció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) | null
    caller_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_experimentboolean
    idstring (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) | null
    priorityintegersí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_attemptsinteger
    retry.retry_delay_minutesinteger
    retry.retry_onstring[]
    retry.rulesRetryRule[]
    retry.rules[].delay_minutesintegersí
    retry.rules[].max_attemptsinteger | null
    retry.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 | null
    schedule.extra_windowsWindow[]
    schedule.extra_windows[].endstringsí
    schedule.extra_windows[].startstringsí
    schedule.extra_windows[].weekdaysinteger[]sí
    schedule.holiday_countrystring
    schedule.max_attempts_per_dayinteger | 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_datesstring (date)[]
    schedule.skip_holidaysboolean
    schedule.weekdaysinteger[]sí
    schedule.window_endstringsí
    schedule.window_startstringsí
    started_atstring (date-time) | nullsí
    statusstringsí (draft, running, paused, completed, cancelled)
    timezonestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 404 No such campaign in the caller's tenant. · ErrorResponse
  • 409 The campaign is not in a state for this. · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

  • 200 Successful Response · DialerSettingsResponse
    NombreTipoRequeridoDescripción
    max_concurrencyinteger | nullsíCalls open at once across every running campaign of the organization; `null` means only each campaign's own limit applies.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

NombreTipoRequeridoDescripción
max_concurrencyinteger | null

Respuestas

  • 200 Successful Response · DialerSettingsResponse
    NombreTipoRequeridoDescripción
    max_concurrencyinteger | nullsíCalls open at once across every running campaign of the organization; `null` means only each campaign's own limit applies.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one this operation needs. · ErrorResponse
  • 503 Campaigns are not available yet. · ErrorResponse
  • default Default 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

  • 200 Successful Response · OutboundTrunkOptions
    NombreTipoRequeridoDescripción
    itemsOutboundTrunkOption[]sí
    items[].idstring (uuid)sí
    items[].is_defaultbooleansí
    items[].namestringsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 429 The API key went over its requests per minute. · ErrorResponse
  • 503 SIP management is not available (`sip_unavailable`). · ErrorResponse
  • default Default Response · ErrorResponse