Referencia de la API de Comos (v1)
Operaciones para integrar conversaciones, contactos, tareas, llamadas, mensajes y campos personalizados. Usa una cuenta de prueba para ejecutar los ejemplos.
Crea una conversación
Permisos requeridos para la clave de API create:crm-funnel-conversation.
Crea una conversación en un embudo. Para vincular un contacto existente, envía contactId y omite contact. Si envías ambos, Comos actualiza el contacto indicado. Si envías contact sin contactId, Comos crea un contacto o actualiza el que coincida por teléfono o correo electrónico.
Al guardar la conversación, esta operación omite propertyId, createdAt y archivedAt.
Authorizations:
Request Body schema: application/jsonrequired
| createdAt | string <date-time> Fecha y hora de creación. |
| userId | number or null <double> Identificador de la persona asignada. |
| propertyId | number or null <double> Identificador de la propiedad de interés de la conversación. |
| funnelId required | number <double> Identificador del embudo. |
| funnelStatusId | number or null <double> Identificador de la etapa del embudo. |
| archivedAt | string or null <date-time> Fecha y hora de archivado. |
| customFields | object (Dictionary_unknown_) Diccionario de claves de texto compatible con la validación de TSOA. Equivale a |
| contactId | number <double> Identificador de un contacto existente. |
object (BulkConversationContactCreateParams) Datos del contacto para una solicitud de creación de conversaciones en lote. |
Respuestas
Ejemplos de solicitud
- Payload
{- "funnelId": 42,
- "contactId": 987
}Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "id": 0.1,
- "tenantId": "string",
- "contactId": 0.1,
- "userId": 0.1,
- "propertyId": 0.1,
- "funnelId": 0.1,
- "funnelStatusId": 0.1,
- "archivedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "channelSessions": [
- {
- "id": 0.1,
- "tenantId": "string",
- "funnelConversationId": 0.1,
- "funnelAddressId": 0.1,
- "contactAddressId": 0.1,
- "archivedAt": "2019-08-24T14:15:22Z",
- "startTime": "2019-08-24T14:15:22Z",
- "endTime": "2019-08-24T14:15:22Z",
- "channelType": "WHATSAPP",
- "messagingConversationId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "contacts": [
- {
- "id": 0.1,
- "tenantId": "string",
- "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "userId": 0.1,
- "contactCompanyId": 0.1,
- "companyPosition": "string",
- "metadata": null,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "addresses": [
- {
- "id": 0.1,
- "tenantId": "string",
- "contactId": 0.1,
- "channelType": "WHATSAPP",
- "address": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
], - "customFields": {
- "property1": null,
- "property2": null
}
}Crea conversaciones en lote
Permisos requeridos para la clave de API bulk-create:crm-funnel-conversation.
Envía varias conversaciones en una solicitud. Cada conversación requiere un embudo y un contacto.
Las filas con errores de validación se omiten y se detallan en report.itemsIssues. report.counts.successful cuenta las filas encoladas para su procesamiento en segundo plano.
Authorizations:
Request Body schema: application/jsonrequired
required | Lista de BulkSingleConversationCreateParams (object) or any Lista de conversaciones que se procesarán. Admite campos adicionales. | ||||||||||||||||||
Array Any of
| |||||||||||||||||||
Respuestas
Ejemplos de solicitud
- Payload
{- "conversations": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "userId": 0.1,
- "propertyId": 0.1,
- "funnelId": 0.1,
- "funnelStatusId": 0.1,
- "archivedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "contactId": 0.1,
- "contact": {
- "firstName": "string",
- "lastName": "string",
- "phones": [
- "string"
], - "emails": [
- "string"
], - "nationalId": "string",
- "companyPosition": "string",
- "customFields": {
- "property1": null,
- "property2": null
}, - "userId": 0.1
}
}
]
}Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "message": "string",
- "operationId": "string",
- "report": {
- "itemsIssues": [
- {
- "index": 0.1,
- "itemId": 0.1,
- "errors": [
- {
- "field": "string",
- "message": "string",
- "code": "REQUIRED_FIELD",
- "context": {
- "property1": null,
- "property2": null
}
}
], - "warnings": [
- {
- "field": "string",
- "message": "string",
- "code": "REQUIRED_FIELD",
- "context": {
- "property1": null,
- "property2": null
}
}
], - "existingEntities": {
- "property1": null,
- "property2": null
}
}
], - "batchErrors": [
- {
- "field": "string",
- "message": "string",
- "code": "REQUIRED_FIELD",
- "context": {
- "property1": null,
- "property2": null
}
}
], - "counts": {
- "successful": 0.1,
- "warnings": 0.1,
- "duplicates": 0.1,
- "errors": 0.1,
- "total": 0.1
}
}
}Actualiza conversaciones en lote
Permisos requeridos para la clave de API bulk-update:crm-funnel-conversation.
Envía los identificadores y los campos que quieres cambiar para varias conversaciones.
Las filas con errores de validación se omiten y se detallan en report.itemsIssues. report.counts.successful cuenta las filas encoladas para su procesamiento en segundo plano.
Authorizations:
Request Body schema: application/jsonrequired
required | Lista de BulkSingleConversationUpdateParams (object) or any Lista de conversaciones que se procesarán. Admite campos adicionales. | ||||||||||||||||
Array Any of
| |||||||||||||||||
Respuestas
Ejemplos de solicitud
- Payload
{- "conversations": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "userId": 0.1,
- "propertyId": 0.1,
- "funnelStatusId": 0.1,
- "archivedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "id": 0.1,
- "contact": {
- "firstName": "string",
- "lastName": "string",
- "phones": [
- "string"
], - "emails": [
- "string"
], - "nationalId": "string",
- "companyPosition": "string",
- "customFields": {
- "property1": null,
- "property2": null
}, - "userId": 0.1,
- "id": 0.1
}
}
]
}Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "message": "string",
- "operationId": "string",
- "report": {
- "itemsIssues": [
- {
- "index": 0.1,
- "itemId": 0.1,
- "errors": [
- {
- "field": "string",
- "message": "string",
- "code": "REQUIRED_FIELD",
- "context": {
- "property1": null,
- "property2": null
}
}
], - "warnings": [
- {
- "field": "string",
- "message": "string",
- "code": "REQUIRED_FIELD",
- "context": {
- "property1": null,
- "property2": null
}
}
], - "existingEntities": {
- "property1": null,
- "property2": null
}
}
], - "batchErrors": [
- {
- "field": "string",
- "message": "string",
- "code": "REQUIRED_FIELD",
- "context": {
- "property1": null,
- "property2": null
}
}
], - "counts": {
- "successful": 0.1,
- "warnings": 0.1,
- "duplicates": 0.1,
- "errors": 0.1,
- "total": 0.1
}
}
}Lista contactos
Permisos requeridos para la clave de API read:contact.
Devuelve una lista paginada de contactos. Usa los parámetros de consulta para filtrar y ordenar los resultados.
Los campos phone y email del contacto están en desuso y se eliminarán en el futuro. Usa la lista addresses para consultar todos los teléfonos y correos electrónicos.
Ejemplo
GET /api/v1/contacts?filterBy=firstName:John;email:john@example.com&sortBy=createdAt=desc&pageSize=20&pageToken=Xde34567890
Authorizations:
query Parameters
| filterBy | string |
| searchBy | string |
| sortBy | string |
| page | number <double> |
| pageSize | number <double> |
| pageToken | string |
Respuestas
Ejemplos de respuesta
- 200
- 401
- 403
- 500
{- "items": [
- {
- "id": 0.1,
- "tenantId": "string",
- "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "userId": 0.1,
- "contactCompanyId": 0.1,
- "companyPosition": "string",
- "metadata": null,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "addresses": [
- {
- "id": 0.1,
- "tenantId": "string",
- "contactId": 0.1,
- "channelType": "WHATSAPP",
- "address": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
], - "nextPageToken": "string",
- "totalCount": 0.1
}Crea un contacto
Permisos requeridos para la clave de API create:contact.
Puedes incluir campos personalizados y direcciones de contacto en el cuerpo de la solicitud.
Los campos phone y email del contacto están en desuso y se eliminarán en el futuro. Incluye todos los teléfonos y correos electrónicos en addresses.
Ejemplo de solicitud
{
"firstName": "Jane",
"lastName": "Doe",
"customFields": { "source": "web" },
"addresses": [{ "address": "+56912345678", "channelType": "PHONE" }]
}
Authorizations:
Request Body schema: application/jsonrequired
| userId | number or null <double> |
| customFields | object (Dictionary_unknown_) Diccionario de claves de texto compatible con la validación de TSOA. Equivale a |
| providerId | string or null |
| providerName | string or null |
| nationalId | string or null |
| firstName | string or null |
| lastName | string or null |
string or null En desuso | |
| phone | string or null En desuso |
| contactCompanyId | number or null <double> |
| companyPosition | string or null |
| metadata | any |
| createdAt | string <date-time> |
Lista de objects (Omit_NewContactAddress.contactId_) |
Respuestas
Ejemplos de solicitud
- Payload
{- "userId": 0.1,
- "customFields": {
- "property1": null,
- "property2": null
}, - "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "contactCompanyId": 0.1,
- "companyPosition": "string",
- "metadata": null,
- "createdAt": "2019-08-24T14:15:22Z",
- "addresses": [
- {
- "channelType": "WHATSAPP",
- "address": "string"
}
]
}Ejemplos de respuesta
- 200
- 401
- 403
- 500
{- "id": 0.1,
- "tenantId": "string",
- "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "userId": 0.1,
- "contactCompanyId": 0.1,
- "companyPosition": "string",
- "metadata": null,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "addresses": [
- {
- "id": 0.1,
- "tenantId": "string",
- "contactId": 0.1,
- "channelType": "WHATSAPP",
- "address": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Busca contactos
Permisos requeridos para la clave de API read:contact.
Busca en todos los contactos. Puedes combinar filtros avanzados, ordenar los resultados y paginarlos.
- El servicio puede limitar la frecuencia de las solicitudes.
- Los campos
phoneyemailestán en desuso y podrían eliminarse en el futuro. Usaaddressespara consultar todos los teléfonos y correos electrónicos.
Ejemplo de solicitud
{
"filters": [
{ "field": "addresses.address", "operator": "eq", "value": "+56912345678" },
{ "field": "addresses.address", "operator": "contains", "value": "example.com" }
],
"sort": [{ "field": "createdAt", "direction": "desc" }],
"size": 20,
"pageToken": "Xde34567890",
"includeTotalCount": true
}
Authorizations:
Request Body schema: application/jsonrequired
| search | string |
Lista de objects (SearcherDocumentSearchFilter) | |
Lista de objects (SearcherDocumentSearchFilterGroup) Deben coincidir los filtros generales y al menos una alternativa. | |
Lista de objects (SearcherDocumentSearchSort) | |
| size | number <double> |
| pageToken | string |
| includeArchived | boolean |
| includeTotalCount | boolean |
Respuestas
Ejemplos de solicitud
- Payload
{- "search": "string",
- "filters": [
- {
- "field": "string",
- "operator": "eq",
- "value": "string",
- "or": true
}
], - "anyOf": [
- {
- "filters": [
- {
- "field": "string",
- "operator": "eq",
- "value": "string",
- "or": true
}
]
}
], - "sort": [
- {
- "field": "string",
- "direction": "asc"
}
], - "size": 0.1,
- "pageToken": "string",
- "includeArchived": true,
- "includeTotalCount": true
}Ejemplos de respuesta
- 200
- 401
- 403
- 500
{- "items": [
- {
- "tenantId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "metadata": null,
- "addresses": [
- {
- "id": 0.1,
- "tenantId": "string",
- "contactId": 0.1,
- "channelType": "WHATSAPP",
- "address": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "companyPosition": "string",
- "id": "string",
- "modelType": "Contact",
- "archivedAt": "2019-08-24T14:15:22Z",
- "eventSequence": 0.1,
- "eventTimestamp": "2019-08-24T14:15:22Z",
- "userId": "string",
- "contactCompanyId": "string"
}
], - "nextPageToken": "string",
- "totalCount": 0.1
}Consulta un contacto
Permisos requeridos para la clave de API read:contact.
Busca el contacto por su identificador y devuelve sus campos personalizados y direcciones de contacto.
Los campos phone y email del contacto están en desuso y se eliminarán en el futuro. Usa la lista addresses para consultar todos los teléfonos y correos electrónicos.
Authorizations:
path Parameters
| id required | number <double> |
Respuestas
Ejemplos de respuesta
- 200
- 401
- 403
- 404
- 500
{- "id": 0.1,
- "tenantId": "string",
- "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "userId": 0.1,
- "contactCompanyId": 0.1,
- "companyPosition": "string",
- "metadata": null,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "addresses": [
- {
- "id": 0.1,
- "tenantId": "string",
- "contactId": 0.1,
- "channelType": "WHATSAPP",
- "address": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Actualiza un contacto
Permisos requeridos para la clave de API update:contact.
Actualiza los campos que envías en el cuerpo de la solicitud, incluidas las direcciones de contacto y los campos personalizados.
Los campos phone y email del contacto están en desuso y se eliminarán en el futuro. Incluye todos los teléfonos y correos electrónicos en addresses.
Ejemplo de solicitud para el contacto 123
{
"firstName": "Janet",
"customFields": { "priority": "high" }
}
Authorizations:
path Parameters
| id required | number <double> |
Request Body schema: application/jsonrequired
| tenantId | string |
| createdAt | string <date-time> |
| updatedAt | string <date-time> |
| id | number <double> |
| userId | number or null <double> |
| customFields | object (Dictionary_unknown_) Diccionario de claves de texto compatible con la validación de TSOA. Equivale a |
| metadata | any |
| providerId | string or null |
| providerName | string or null |
| nationalId | string or null |
| firstName | string or null |
| lastName | string or null |
string or null En desuso | |
| phone | string or null En desuso |
| contactCompanyId | number or null <double> |
| companyPosition | string or null |
Lista de objects (Omit_NewContactAddress.contactId_) |
Respuestas
Ejemplos de solicitud
- Payload
{- "tenantId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "id": 0.1,
- "userId": 0.1,
- "customFields": {
- "property1": null,
- "property2": null
}, - "metadata": null,
- "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "contactCompanyId": 0.1,
- "companyPosition": "string",
- "addresses": [
- {
- "channelType": "WHATSAPP",
- "address": "string"
}
]
}Ejemplos de respuesta
- 200
- 401
- 403
- 404
- 500
{- "id": 0.1,
- "tenantId": "string",
- "providerId": "string",
- "providerName": "string",
- "nationalId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string",
- "userId": 0.1,
- "contactCompanyId": 0.1,
- "companyPosition": "string",
- "metadata": null,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "customFields": {
- "property1": null,
- "property2": null
}, - "addresses": [
- {
- "id": 0.1,
- "tenantId": "string",
- "contactId": 0.1,
- "channelType": "WHATSAPP",
- "address": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Lista tareas
Permisos requeridos para la clave de API read:task.
Devuelve una lista paginada de tareas. Puedes ordenar los resultados y filtrar por estado, fecha de vencimiento, conversación y persona asignada, entre otros criterios.
Ejemplo
GET /api/v1/tasks?status=scheduled&limit=20&pageToken=Xde34567890
Authorizations:
query Parameters
| limit | number <double> |
| pageToken | string |
| dueBefore | string <date-time> Filtra las tareas que vencen antes de esta fecha. |
| dueAfter | string <date-time> Filtra las tareas que vencen después de esta fecha. |
| conversationId | number <double> Filtra por conversación. |
| assignedToType | string (TaskAssigneeType) Valores permitidos: "user" "ai_employee" Filtra por tipo de entidad asignada. |
| assignedToId | string Filtra por identificador de la entidad asignada. |
| status | string (TaskStatus) Valores permitidos: "scheduled" "overdue" "completed" "cancelled" Filtra por estado de la tarea. |
Respuestas
Ejemplos de respuesta
- 200
- 401
- 403
- 500
{- "items": [
- {
- "id": "string",
- "tenantId": "string",
- "context": {
- "conversationId": 0.1,
- "employeeFollowUp": {
- "executionId": "string"
}, - "employeeOperation": {
- "operationKind": "task-create",
- "operationKey": "string",
- "executionId": "string"
}
}, - "createdBy": {
- "type": "user",
- "id": "string"
}, - "assignedTo": {
- "type": "user",
- "id": "string"
}, - "objective": "string",
- "dueDate": "2019-08-24T14:15:22Z",
- "status": "scheduled",
- "publishedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "cancellationReason": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "nextPageToken": "string",
- "totalCount": 0.1
}Crea una tarea
Permisos requeridos para la clave de API create:task.
Indica el contexto, quién crea la tarea, a quién se asigna y su objetivo. Puedes incluir una fecha de vencimiento.
Ejemplo de solicitud
{
"context": { "conversationId": 42 },
"createdBy": { "type": "user", "id": "123" },
"assignedTo": { "type": "user", "id": "456" },
"objective": "Enviar la propuesta al cliente",
"dueDate": "2030-02-15T10:00:00Z"
}
Authorizations:
Request Body schema: application/jsonrequired
required | object (TaskContext) Contexto de la tarea. |
required | object (TaskAssignee) Datos de asignación de la tarea. |
required | object (TaskAssignee) Datos de asignación de la tarea. |
| objective required | string Descripción del resultado esperado de la tarea. |
| dueDate | string or null <date-time> Fecha de vencimiento, si está programada. |
| status | string (TaskStatus) Valores permitidos: "scheduled" "overdue" "completed" "cancelled" Estados de la tarea. |
| idempotencyKey | string Clave opaca para hacer idempotentes las solicitudes de creación equivalentes. |
Respuestas
Ejemplos de solicitud
- Payload
{- "context": {
- "conversationId": 0.1,
- "employeeFollowUp": {
- "executionId": "string"
}, - "employeeOperation": {
- "operationKind": "task-create",
- "operationKey": "string",
- "executionId": "string"
}
}, - "createdBy": {
- "type": "user",
- "id": "string"
}, - "assignedTo": {
- "type": "user",
- "id": "string"
}, - "objective": "string",
- "dueDate": "2019-08-24T14:15:22Z",
- "status": "scheduled",
- "idempotencyKey": "string"
}Ejemplos de respuesta
- 200
- 401
- 403
- 500
{- "id": "string",
- "tenantId": "string",
- "context": {
- "conversationId": 0.1,
- "employeeFollowUp": {
- "executionId": "string"
}, - "employeeOperation": {
- "operationKind": "task-create",
- "operationKey": "string",
- "executionId": "string"
}
}, - "createdBy": {
- "type": "user",
- "id": "string"
}, - "assignedTo": {
- "type": "user",
- "id": "string"
}, - "objective": "string",
- "dueDate": "2019-08-24T14:15:22Z",
- "status": "scheduled",
- "publishedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "cancellationReason": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "creationDisposition": "created"
}Consulta una tarea
Permisos requeridos para la clave de API read:task.
Busca la tarea por su identificador y devuelve sus datos, incluida la asignación.
Authorizations:
path Parameters
| taskId required | string |
Respuestas
Ejemplos de respuesta
- 200
- 401
- 403
- 404
- 500
{- "id": "string",
- "tenantId": "string",
- "context": {
- "conversationId": 0.1,
- "employeeFollowUp": {
- "executionId": "string"
}, - "employeeOperation": {
- "operationKind": "task-create",
- "operationKey": "string",
- "executionId": "string"
}
}, - "createdBy": {
- "type": "user",
- "id": "string"
}, - "assignedTo": {
- "type": "user",
- "id": "string"
}, - "objective": "string",
- "dueDate": "2019-08-24T14:15:22Z",
- "status": "scheduled",
- "publishedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "cancellationReason": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Actualiza una tarea
Permisos requeridos para la clave de API update:task.
Actualiza los campos que envías en el cuerpo de la solicitud. Puedes cambiar el estado, la asignación, la fecha de vencimiento y otros datos.
Ejemplo de solicitud para la tarea task_123
{
"status": "completed",
"objective": "Confirmar que el cliente recibió la propuesta"
}
Authorizations:
path Parameters
| taskId required | string |
Request Body schema: application/jsonrequired
object (TaskContext) Contexto de la tarea. | |
object (TaskAssignee) Datos de asignación de la tarea. | |
| objective | string Objetivo actualizado de la tarea. |
| dueDate | string or null <date-time> Nueva fecha de vencimiento. Usa |
| status | string (TaskStatus) Valores permitidos: "scheduled" "overdue" "completed" "cancelled" Estados de la tarea. |
| publishedAt | string or null <date-time> Fecha y hora de publicación actualizadas. |
| completedAt | string or null <date-time> Fecha y hora de finalización actualizadas. |
| cancelledAt | string or null <date-time> Fecha y hora de cancelación actualizadas. |
| cancellationReason | string or null Motivo de cancelación actualizado. |
Respuestas
Ejemplos de solicitud
- Payload
{- "context": {
- "conversationId": 0.1,
- "employeeFollowUp": {
- "executionId": "string"
}, - "employeeOperation": {
- "operationKind": "task-create",
- "operationKey": "string",
- "executionId": "string"
}
}, - "assignedTo": {
- "type": "user",
- "id": "string"
}, - "objective": "string",
- "dueDate": "2019-08-24T14:15:22Z",
- "status": "scheduled",
- "publishedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "cancellationReason": "string"
}Ejemplos de respuesta
- 200
- 401
- 403
- 404
- 500
{- "id": "string",
- "tenantId": "string",
- "context": {
- "conversationId": 0.1,
- "employeeFollowUp": {
- "executionId": "string"
}, - "employeeOperation": {
- "operationKind": "task-create",
- "operationKey": "string",
- "executionId": "string"
}
}, - "createdBy": {
- "type": "user",
- "id": "string"
}, - "assignedTo": {
- "type": "user",
- "id": "string"
}, - "objective": "string",
- "dueDate": "2019-08-24T14:15:22Z",
- "status": "scheduled",
- "publishedAt": "2019-08-24T14:15:22Z",
- "completedAt": "2019-08-24T14:15:22Z",
- "cancelledAt": "2019-08-24T14:15:22Z",
- "cancellationReason": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Consulta una llamada registrada
Permisos requeridos para la clave de API read:call.
Busca una llamada por su identificador en Comos.
Authorizations:
path Parameters
| id required | integer |
Respuestas
Ejemplos de respuesta
- 200
- 401
- 403
- 404
{- "id": 0.1,
- "tenantId": "string",
- "providerId": "string",
- "providerName": "string",
- "funnelConversationId": 0.1,
- "sessionId": 0.1,
- "userId": 0.1,
- "contactId": 0.1,
- "opportunityId": 0.1,
- "analysisConfigId": 0.1,
- "teamId": 0.1,
- "from": "string",
- "to": "string",
- "redirectedTo": "string",
- "duration": 0.1,
- "direction": "string",
- "status": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "metadata": null,
- "customData": null,
- "agentScore": 0.1,
- "category": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "lastUpdateSequence": 0.1
}Consulta las grabaciones de una llamada
Permisos requeridos para la clave de API read:recording.
Authorizations:
path Parameters
| callId required | number <double> |
Respuestas
Ejemplos de respuesta
- 200
- 401
- 403
- 404
{- "id": 0.1,
- "tenantId": "string",
- "callId": 0.1,
- "providerId": "string",
- "providerName": "string",
- "callProviderId": "string",
- "callProviderName": "string",
- "url": "string",
- "startTime": "2019-08-24T14:15:22Z",
- "duration": 0.1,
- "dualChannel": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Consulta la transcripción de una llamada
Permisos requeridos para la clave de API read:transcription.
Authorizations:
path Parameters
| callId required | number <double> |
Respuestas
Ejemplos de respuesta
- 200
- 401
- 403
- 404
{- "id": 0.1,
- "tenantId": "string",
- "providerId": "string",
- "providerName": "string",
- "recordingId": 0.1,
- "url": "string",
- "text": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Consulta un mensaje
Permisos requeridos para la clave de API read:message.
Busca el mensaje por su identificador. Devuelve el contenido, los datos de quien lo envió y de quien lo recibió, los enlaces firmados de sus adjuntos y los metadatos.
Authorizations:
path Parameters
| messageId required | string |
Respuestas
Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "id": "string",
- "tenantId": "string",
- "conversationId": "string",
- "funnelConversationId": 0.1,
- "sessionId": 0.1,
- "providerId": "string",
- "contactId": 0.1,
- "userId": "string",
- "content": "string",
- "status": "pending",
- "direction": "inbound",
- "channel": "whatsapp",
- "sender": {
- "providerId": "string",
- "address": "string",
- "role": "user",
- "displayName": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}, - "recipient": {
- "providerId": "string",
- "address": "string",
- "role": "user",
- "displayName": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}, - "attachments": [
- {
- "id": "string",
- "type": "image",
- "url": "string",
- "unsignedUrl": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "mediaProcessing": {
- "textRepresentation": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}, - "summary": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}
}, - "isCacheable": true
}
], - "createdAt": "string",
- "updatedAt": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "errors": [
- {
- "code": 0.1,
- "title": "string",
- "message": "string",
- "href": "string",
- "provider": "string"
}
], - "customFields": {
- "property1": null,
- "property2": null
}, - "mediaProcessing": {
- "textRepresentation": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}, - "summary": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}
}
}Obtén un enlace para un adjunto
Permisos requeridos para la clave de API read:message.
Devuelve los datos del adjunto y un enlace firmado nuevo. Usa download=true para descargar con el nombre original.
Authorizations:
path Parameters
| messageId required | string Identificador del mensaje que contiene el adjunto. |
| attachmentId required | string Identificador del adjunto dentro del mensaje. |
query Parameters
| download | boolean Firma el enlace para descargar el adjunto con su nombre de archivo original. |
Respuestas
Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 404
- 500
{- "id": "string",
- "type": "image",
- "url": "string",
- "unsignedUrl": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "mediaProcessing": {
- "textRepresentation": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}, - "summary": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}
}, - "isCacheable": true
}Envía una plantilla de WhatsApp
Permisos requeridos para la clave de API create:message.
Usa una plantilla aprobada para el número emisor y el idioma registrado. Indica los teléfonos en formato E.164. Para completar valores, elige variables para texto simple o components para el formato completo.
Authorizations:
Request Body schema: application/jsonrequired
| fromPhoneNumber required | string Número de WhatsApp conectado a tu cuenta. |
| toPhoneNumber required | string Número de destino en formato E.164. |
| userId | string |
| templateName required | string Nombre registrado de la plantilla. |
| languageCode required | string Código del idioma registrado para la plantilla. |
Lista de objects (WhatsAppTemplateMessageVariable) Valores de texto del cuerpo de la plantilla. | |
Lista de WhatsAppTemplateMessageHeaderComponent (object) or WhatsAppTemplateMessageBodyComponent (object) or WhatsAppTemplateMessageButtonComponent (object) (WhatsAppTemplateMessageComponent) Valores de los componentes de la plantilla. | |
| customFields | object (Dictionary_unknown_) Diccionario de claves de texto compatible con la validación de TSOA. Equivale a |
Respuestas
Ejemplos de solicitud
- Payload
{- "fromPhoneNumber": "+15555550100",
- "toPhoneNumber": "+15555550101",
- "templateName": "confirmar_visita",
- "languageCode": "es"
}Ejemplos de respuesta
- 200
- 401
- 403
{- "id": "string",
- "tenantId": "string",
- "conversationId": "string",
- "funnelConversationId": 0.1,
- "sessionId": 0.1,
- "providerId": "string",
- "contactId": 0.1,
- "userId": "string",
- "content": "string",
- "status": "pending",
- "direction": "inbound",
- "channel": "whatsapp",
- "sender": {
- "providerId": "string",
- "address": "string",
- "role": "user",
- "displayName": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}, - "recipient": {
- "providerId": "string",
- "address": "string",
- "role": "user",
- "displayName": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}, - "attachments": [
- {
- "id": "string",
- "type": "image",
- "url": "string",
- "unsignedUrl": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "mediaProcessing": {
- "textRepresentation": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}, - "summary": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}
}, - "isCacheable": true
}
], - "createdAt": "string",
- "updatedAt": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "errors": [
- {
- "code": 0.1,
- "title": "string",
- "message": "string",
- "href": "string",
- "provider": "string"
}
], - "customFields": {
- "property1": null,
- "property2": null
}, - "mediaProcessing": {
- "textRepresentation": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}, - "summary": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}
}
}Envía un mensaje de WhatsApp
Permisos requeridos para la clave de API create:message.
Envía un mensaje de WhatsApp de formato libre. Admite texto, imágenes, documentos y otros tipos de contenido. Para enviar un archivo, usa el fileId del servicio de archivos.
Indica los teléfonos en formato E.164, por ejemplo +14155552671.
Authorizations:
Request Body schema: application/jsonrequired
| fromPhoneNumber required | string |
| toPhoneNumber required | string |
| userId | string |
| content required | string |
| type required | string (WhatsAppMessageType) Valores permitidos: "text" "image" "audio" "video" "document" "sticker" "location" "contacts" "interactive" "reaction" "button" "order" "system" "unknown" "unsupported" "media_placeholder" Tipos de mensajes que se pueden recibir mediante webhooks de WhatsApp. Incluye los tipos estándar y los específicos del modo de coexistencia. |
| customFields | object (Dictionary_unknown_) Diccionario de claves de texto compatible con la validación de TSOA. Equivale a |
| fileId | string |
Respuestas
Ejemplos de solicitud
- Payload
{- "fromPhoneNumber": "string",
- "toPhoneNumber": "string",
- "userId": "string",
- "content": "string",
- "type": "text",
- "customFields": {
- "property1": null,
- "property2": null
}, - "fileId": "string"
}Ejemplos de respuesta
- 200
- 401
- 403
{- "id": "string",
- "tenantId": "string",
- "conversationId": "string",
- "funnelConversationId": 0.1,
- "sessionId": 0.1,
- "providerId": "string",
- "contactId": 0.1,
- "userId": "string",
- "content": "string",
- "status": "pending",
- "direction": "inbound",
- "channel": "whatsapp",
- "sender": {
- "providerId": "string",
- "address": "string",
- "role": "user",
- "displayName": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}, - "recipient": {
- "providerId": "string",
- "address": "string",
- "role": "user",
- "displayName": "string",
- "metadata": {
- "property1": null,
- "property2": null
}
}, - "attachments": [
- {
- "id": "string",
- "type": "image",
- "url": "string",
- "unsignedUrl": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "mediaProcessing": {
- "textRepresentation": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}, - "summary": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}
}, - "isCacheable": true
}
], - "createdAt": "string",
- "updatedAt": "string",
- "metadata": {
- "property1": null,
- "property2": null
}, - "errors": [
- {
- "code": 0.1,
- "title": "string",
- "message": "string",
- "href": "string",
- "provider": "string"
}
], - "customFields": {
- "property1": null,
- "property2": null
}, - "mediaProcessing": {
- "textRepresentation": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}, - "summary": {
- "errorMessage": "string",
- "processedAt": "string",
- "content": "string",
- "status": "pending"
}
}
}Sube un archivo a WhatsApp
Permisos requeridos para la clave de API create:message.
Sube un archivo a la API de WhatsApp Business de una de estas dos formas.
- Para usar un archivo del servicio de archivos, envía su
fileId. - Para subir un archivo directamente, envía
fileName,contentTypeycontent.
Indica los teléfonos en formato E.164, por ejemplo +14155552671.
Authorizations:
Request Body schema: application/jsonrequired
| fileId | string |
| fileName | string |
| contentType | string |
| fromPhoneNumber | string |
| content | string |
| tags | object (Dictionary_string_) Diccionario de claves de texto compatible con la validación de TSOA. Equivale a |
Respuestas
Ejemplos de solicitud
- Payload
{- "fileId": "string",
- "fileName": "string",
- "contentType": "string",
- "fromPhoneNumber": "string",
- "content": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}Ejemplos de respuesta
- 200
- 401
- 403
{- "url": "string",
- "mediaId": "string",
- "fileId": "string",
- "fileName": "string",
- "contentType": "string",
- "size": 0.1,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}Lista definiciones de campos
Permisos requeridos para la clave de API read:crm-custom-field.
Devuelve una lista paginada de definiciones de campos personalizados. Puedes filtrar por tipo de entidad y ordenar los resultados.
Authorizations:
query Parameters
| filterBy | string |
| searchBy | string |
| sortBy | string |
| page | number <double> |
| pageSize | number <double> |
| pageToken | string |
| tenantId | string |
Respuestas
Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "items": [
- {
- "id": 0.1,
- "tenantId": "string",
- "entityType": "CONTACT",
- "fieldKey": "string",
- "fieldLabel": "string",
- "fieldType": "STRING",
- "description": "string",
- "includeTime": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "nextPageToken": "string",
- "totalCount": 0.1
}Crea una definición de campo
Permisos requeridos para la clave de API create:crm-custom-field.
Indica el tipo de campo al crear la definición.
Authorizations:
Request Body schema: application/jsonrequired
| description | string or null Descripción opcional de para qué se utiliza el campo. |
| entityType required | string (CustomFieldEntityType) Valores permitidos: "CONTACT" "COMPANY" "FUNNEL_CONVERSATION" "FUNNEL_CHANNEL_SESSION" "PRODUCT" "PROPERTY" Tipos de entidades a las que se pueden aplicar los campos personalizados. |
| fieldKey required | string Clave única del campo. |
| fieldLabel | string or null Etiqueta opcional del campo. |
| fieldType required | string (CustomFieldType) Valores permitidos: "STRING" "NUMBER" "DATE" "BOOLEAN" "LIST" "FILE" Tipos de datos admitidos para los campos personalizados. |
| includeTime | boolean Opción para incluir la hora en nuevas definiciones de tipo |
Respuestas
Ejemplos de solicitud
- Payload
{- "description": "string",
- "entityType": "CONTACT",
- "fieldKey": "string",
- "fieldLabel": "string",
- "fieldType": "STRING",
- "includeTime": true
}Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "id": 0.1,
- "tenantId": "string",
- "entityType": "CONTACT",
- "fieldKey": "string",
- "fieldLabel": "string",
- "fieldType": "STRING",
- "description": "string",
- "includeTime": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Consulta una definición de campo
Permisos requeridos para la clave de API read:crm-custom-field.
Devuelve la definición del campo personalizado y sus propiedades.
Authorizations:
path Parameters
| id required | number <double> |
Respuestas
Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 404
- 500
{- "id": 0.1,
- "tenantId": "string",
- "entityType": "CONTACT",
- "fieldKey": "string",
- "fieldLabel": "string",
- "fieldType": "STRING",
- "description": "string",
- "includeTime": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Lista las opciones de un campo
Permisos requeridos para la clave de API read:crm-custom-field.
Devuelve una lista paginada de opciones para la definición indicada. Puedes ordenar los resultados.
Authorizations:
path Parameters
| definitionId required | number <double> |
query Parameters
| filterBy | string |
| searchBy | string |
| sortBy | string |
| page | number <double> |
| pageSize | number <double> |
| pageToken | string |
| tenantId | string |
Respuestas
Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "items": [
- {
- "id": 0.1,
- "tenantId": "string",
- "definitionId": 0.1,
- "value": "string",
- "label": "string",
- "description": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "nextPageToken": "string",
- "totalCount": 0.1
}Crea una opción para un campo
Permisos requeridos para la clave de API create:crm-custom-field.
Agrega una opción a la lista de valores del campo personalizado.
Authorizations:
path Parameters
| definitionId required | number <double> |
Request Body schema: application/jsonrequired
| definitionId required | number <double> Identificador de la definición del campo personalizado a la que pertenece la opción. |
| value required | string Valor que se almacena. |
| label | string or null Etiqueta opcional del valor. |
| description | string or null Descripción opcional del significado de la opción. |
Respuestas
Ejemplos de solicitud
- Payload
{- "definitionId": 0.1,
- "value": "string",
- "label": "string",
- "description": "string"
}Ejemplos de respuesta
- 200
- 400
- 401
- 403
- 500
{- "id": 0.1,
- "tenantId": "string",
- "definitionId": 0.1,
- "value": "string",
- "label": "string",
- "description": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}