Get Contact By Email
Get Contact By Email
Section titled “Get Contact By Email”Servicio para obtener un contacto filtrado por su dirección de correo electrónico.
Endpoint
Section titled “Endpoint”GET /api/contact/searchByEmail
Encabezados (Headers)
Section titled “Encabezados (Headers)”x-workspace-id: <x-workspace-id>(string, requerido)
Query Parameters
Section titled “Query Parameters”email(string, requerido) — Correo electrónico a buscar. Debe estar URL-encoded si contiene caracteres especiales (por ejemplo,@→%40).workspaceId(string, requerido) — Identificador del workspace.
Ejemplo: cURL
Section titled “Ejemplo: cURL”curl --request GET \ --url 'https://api.wabotify.com/api/contact/searchByEmail?email=user%40example.com&workspaceId=WORKSPACE_ID' \ --header 'x-workspace-id: YOUR_WORKSPACE_ID'Sustituye
user%40example.com,WORKSPACE_IDyYOUR_WORKSPACE_IDpor los valores reales de tu llamada.
Ejemplo: Respuesta (200 OK)
Section titled “Ejemplo: Respuesta (200 OK)”{ "success": true, "code": 200, "errorCode": null, "message": "Successfully obtained list.", "data": { "contactId": "string", "data": [ { "id": "string", "creationDate": "2025-03-31T08:04:22.6573965Z", "assignedAgentId": "string", "assignedAgentName": "string", "segmentationId": "string", "lastMessage": "string", "lastMessageDate": "2025-04-06T20:16:46.808Z", "platformSenderId": "string", "platformSenderName": "string", "platformSenderPhone": "string", "isRead": true, "isBotEnabled": true, "isManuallyAdded": true, "avatarColor": null, "orderInCards": 42, "orderInCardsLastUpdated": "2025-04-06T14:44:38.0807297Z", "tags": [ { "id": "", "name": "", "color": null, "assignmentDate": "2025-04-04T17:47:18.1255151Z" } ], "files": [], "isSolved": false, "workspaceId": "string", "name": "string", "lastname": "string", "email": null, "platformId": 2, "stageId": "string" } ] }}Códigos de respuesta
Section titled “Códigos de respuesta”200 OK— Se devolvió la información del contacto (campodata).400 Bad Request— Parámetros inválidos (p. ej.emailmalformado).401 Unauthorized— Falta o es incorrecto el headerx-workspace-id.404 Not Found— No se encontró un contacto con ese email.- Otros códigos pueden acompañar un
errorCodey unmessageexplicativo.
- El parámetro
emaildebe ir en la query string; asegúrate de URL-encodearlo correctamente. - Incluye siempre el header
x-workspace-idy el query paramworkspaceId. - Esta ruta no requiere body en la petición.
- En caso de devolver múltiples coincidencias, el array
datacontendrá las entradas encontradas.