Contactos
Importación de contactos y lista de no llamar.
POST /v1/contact-imports
Start importing a contact file
API key con contacts:write · Rol: editor o superior
An `editor` or above declares a CSV or XLSX file (`filename`, `format`, `size_bytes` up to 50 MiB) and which columns hold the phone and the call variables (`column_mapping`: `phone` is a header, `variables` maps a variable name to a header). The answer is the import in `awaiting_upload` and a presigned `upload_url`: send the file to it with an HTTP `PUT`, with exactly `size_bytes` bytes, before `upload_expires_at`. The URL grants one object, in the caller's own tenant, and nothing else; `filename` is a label and never part of the storage path. Then call `POST /v1/contact-imports/{id}/complete`. The tenant is the one in the caller's access token. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 422 when the body is invalid or `size_bytes` is over the limit; 503 until contact imports are deployed (clients must not be built against this operation before then).
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
column_mapping | ColumnMapping | sí | Which column of the file holds what. `phone` and the variable columns are header names. |
column_mapping.phone | string | sí | |
column_mapping.types | object | The type of a mapped variable; a variable not listed is `text`. `money_ars` and `money_usd` accept `20500`, `20.500,50`, `$ 20.500` or `20500.50`; `date` accepts `2026-11-10` or `10/11/2026` (day first). | |
column_mapping.variables | object | ||
filename | string | sí | |
format | string | sí | (csv, xlsx) |
size_bytes | integer | sí |
Respuestas
201Successful Response · ContactImportCreatedResponseNombre Tipo Requerido Descripción idstring (uuid)sí statusstringsí (awaiting_upload, processing, completed, failed) upload_expires_atstring (date-time)sí upload_urlstringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Contact imports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/contact-imports/{import_id}
Status and counts of one contact import
API key con contacts:read · Rol: viewer o superior
Any signed-in member of the tenant, or an API key with `contacts:read`. `status` is `awaiting_upload`, `processing`, `completed` or `failed`. `total_rows`, `accepted`, `rejected` and `rejected_by_reason` are `null` until the import is `completed`; `rejected` is the sum of `rejected_by_reason` and `total_rows` is `accepted` plus `rejected`. `failure` is set only when the status is `failed` (`unreadable_file`, `too_many_rows` over 1,000,000 rows, `mapping_mismatch` when a mapped header is not in the file, `internal_error`). A bad row never fails the import, it is a rejected row. 401 when the token is missing, expired or invalid; 404 when the import does not exist in the caller's tenant; 503 until contact imports are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
import_id | path | string (uuid) | sí |
Respuestas
200Successful Response · ContactImportResponseNombre Tipo Requerido Descripción acceptedinteger | nullsí created_atstring (date-time)sí failurestring | nullsí Why a whole import failed. A bad row is never a failure, it is a rejected row. (unreadable_file, too_many_rows, mapping_mismatch, internal_error) filenamestringsí formatstringsí (csv, xlsx) idstring (uuid)sí rejectedinteger | nullsí rejected_by_reasonRejectionCounts | nullsí Rejected rows by reason. The reasons are the closed set of `reason_code` in the report. rejected_by_reason.do_not_callintegerrejected_by_reason.duplicate_existingintegerNo longer emitted: each import keeps its own contacts, so a number from an earlier import is not a duplicate. Kept so the closed set does not change. rejected_by_reason.duplicate_in_fileintegerrejected_by_reason.invalid_phoneintegerrejected_by_reason.invalid_variableintegerrejected_by_reason.missing_phoneintegerrejected_by_reason.missing_variableintegerrejected_by_reason.not_ar_numberintegersize_bytesintegersí statusstringsí (awaiting_upload, processing, completed, failed) total_rowsinteger | 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 import in the caller's tenant. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Contact imports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/contact-imports/{import_id}/complete
Tell us the contact file is uploaded
API key con contacts:write · Rol: editor o superior
An `editor` or above says the file is uploaded. The control plane checks that the object exists and has the declared size, moves the import to `processing` and publishes the `contact_import.uploaded` event (`events/catalog.json`), in one transaction. 202 means accepted, not processed: poll `GET /v1/contact-imports/{id}`. Calling it again on an import that is already `processing`, `completed` or `failed` returns the import and publishes nothing. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 404 when the import does not exist in the caller's tenant; 409 when the file is not uploaded yet, has another size than declared, or the upload URL expired (upload it again, or start a new import if it expired); 503 until contact imports are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
import_id | path | string (uuid) | sí |
Respuestas
202Successful Response · ContactImportResponseNombre Tipo Requerido Descripción acceptedinteger | nullsí created_atstring (date-time)sí failurestring | nullsí Why a whole import failed. A bad row is never a failure, it is a rejected row. (unreadable_file, too_many_rows, mapping_mismatch, internal_error) filenamestringsí formatstringsí (csv, xlsx) idstring (uuid)sí rejectedinteger | nullsí rejected_by_reasonRejectionCounts | nullsí Rejected rows by reason. The reasons are the closed set of `reason_code` in the report. rejected_by_reason.do_not_callintegerrejected_by_reason.duplicate_existingintegerNo longer emitted: each import keeps its own contacts, so a number from an earlier import is not a duplicate. Kept so the closed set does not change. rejected_by_reason.duplicate_in_fileintegerrejected_by_reason.invalid_phoneintegerrejected_by_reason.invalid_variableintegerrejected_by_reason.missing_phoneintegerrejected_by_reason.missing_variableintegerrejected_by_reason.not_ar_numberintegersize_bytesintegersí statusstringsí (awaiting_upload, processing, completed, failed) total_rowsinteger | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such import in the caller's tenant. · ErrorResponse409The uploaded file is missing, has another size, or the URL expired. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Contact imports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/contact-imports/{import_id}/rejected-rows
Download the rows an import rejected
API key con contacts:write · Rol: editor o superior
An `editor` or above, the same roles that can upload the file: the report holds the raw rows of the file (names, phones, amounts). The answer is a presigned `download_url` (HTTP `GET`, valid until `download_expires_at`) of a CSV report. Columns: `row_number` (the row in the uploaded file, where the header row is row 1), `reason_code`, then the original columns of the row. `reason_code` is one of `missing_phone`, `invalid_phone`, `not_ar_number`, `duplicate_in_file` (the first row with a number is kept), `duplicate_existing` (no longer emitted: each import keeps its own contacts, so a number from an earlier import is not a duplicate), `do_not_call`, `missing_variable`, `invalid_variable`. A cell that starts with `=`, `+`, `-` or `@` is written with a leading `'`, so a spreadsheet does not run it as a formula. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 404 when the import does not exist in the caller's tenant; 409 until the import is `completed`, and when it rejected no row; 503 until contact imports are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
import_id | path | string (uuid) | sí |
Respuestas
200Successful Response · RejectedRowsResponseNombre Tipo Requerido Descripción download_expires_atstring (date-time)sí download_urlstringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such import in the caller's tenant. · ErrorResponse409The import is not completed, or it rejected no row. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503Contact imports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/do-not-call
List the do-not-call numbers of my organization
API key con contacts:read · Rol: viewer o superior
Any signed-in member of the tenant, or an API key with `contacts:read`. Pages are ordered by number; pass `next_cursor` of a page as `cursor` to get the next one. `next_cursor` is `null` on the last page. The cursor is opaque and never carries a number in clear; do not build or change it. `limit` is at most 500 (default 100). 401 when the token is missing, expired or invalid; 422 when `limit` is out of range or the cursor is not one we issued; 503 until the list is deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
limit | query | integer | ||
cursor | query | string | null |
Respuestas
200Successful Response · DoNotCallPageNombre Tipo Requerido Descripción itemsDoNotCallEntry[]sí items[].created_atstring (date-time)sí items[].phone_e164stringsí 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. · ErrorResponse503The do-not-call list is not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/do-not-call
Put a number on the do-not-call list
API key con contacts:write · Rol: editor o superior
An `editor` or above puts a number on the tenant's own do-not-call list. The number travels in the body, not the path, so it does not reach access logs. It is idempotent: a number already on the list returns its entry, with its original `created_at`. Contact imports reject rows with a number on this list (`do_not_call`). The list is per tenant and is not shared. 401 when the token is missing, expired or invalid; 403 when the caller is a `viewer`; 422 when the number is not E.164; 503 until the list is deployed.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
phone_e164 | string | sí |
Respuestas
200Successful Response · DoNotCallEntryNombre Tipo Requerido Descripción created_atstring (date-time)sí phone_e164stringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse429The API key went over its requests per minute. · ErrorResponse503The do-not-call list is not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/do-not-call/remove
Take a number off the do-not-call list
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above takes a number off the tenant's list; this is stricter than adding because the list is a compliance control. The number travels in the body, not the path, so it does not reach access logs. It is idempotent: 204 whether or not the number was on the list. 401 when the token is missing, expired or invalid; 403 when the caller is below `admin`; 422 when the number is not E.164; 503 until the list is deployed.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
phone_e164 | string | sí |
Respuestas
204Successful Response401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse503The do-not-call list is not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse