API Reference

Communications

Encolá un email, WhatsApp o SMS con el token de equipo y recuperá el mismo registro para leer el estado. Misma autenticación que Contacts, Prompts y WhatsApp.

Para usar la app en el navegador, andá a Ayuda.

Authentication

Todas las requests usan el token de equipo. El equipo lo determina el Bearer, no un team_id.

Base URL: https://admin.idoneo.dev/api/team/communications

Header
Authorization: Bearer YOUR_API_TOKEN

Send a communication

POSThttps://admin.idoneo.dev/api/team/communications

Responde 201 con status: pending. Email pide recipient_email y subject. WhatsApp y SMS piden teléfono (10–15 dígitos). Adjuntos solo en email, campo attachments[], máx. 5 × 10 MB.

FieldTypeRequiredDescription
channelstringYesemail, whatsapp or sms
messagestringYesMessage body
recipient_emailstringIf emailRecipient email address
subjectstringIf emailEmail subject (max 255)
recipient_phonestringIf WhatsApp/SMS10–15 digits. Non-digits are stripped.
recipient_namestringNoDisplay name
contact_idintegerNoExisting contact in the same team
metadataobjectNoArbitrary JSON. In multipart, send a JSON string.
attachmentsfile[]NoEmail only. WhatsApp and SMS return 422.
Email
curl -X POST "https://admin.idoneo.dev/api/team/communications" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "channel": "email",
    "recipient_email": "ada@example.com",
    "recipient_name": "Ada",
    "subject": "Tu factura",
    "message": "Adjuntamos la factura del período.",
    "metadata": { "source": "erp", "external_id": "INV-1042" }
  }'
WhatsApp
curl -X POST "https://admin.idoneo.dev/api/team/communications" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "channel": "whatsapp",
    "recipient_phone": "+34 600 111 222",
    "message": "Hola, tu pedido ya salió."
  }'
SMS
curl -X POST "https://admin.idoneo.dev/api/team/communications" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "channel": "sms",
    "recipient_phone": "34600111222",
    "message": "Código 4821. Caduca en 10 minutos."
  }'
Email with attachment
curl -X POST "https://admin.idoneo.dev/api/team/communications" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -F "channel=email" \
  -F "recipient_email=ada@example.com" \
  -F "subject=Tu factura" \
  -F "message=Adjuntamos la factura del período." \
  -F "metadata={\"source\":\"erp\",\"external_id\":\"INV-1042\"}" \
  -F "attachments[]=@./factura.pdf"
201
{
  "success": true,
  "message": "Communication queued successfully",
  "data": {
    "id": 1842,
    "channel": "email",
    "status": "pending",
    "recipient_email": "ada@example.com",
    "subject": "Tu factura",
    "sent_at": null,
    "attachments": []
  }
}

Get a communication

GEThttps://admin.idoneo.dev/api/team/communications/{id}

Devuelve el mensaje, adjuntos y estado. Poll hasta sent o failed.

StatusDescription
pendingQueued or retrying. sent_at is null.
sentDelivered to the provider. sent_at is ISO-8601.
failedDid not send. Reason in error_message.
GET
curl "https://admin.idoneo.dev/api/team/communications/1842" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
200
{
  "success": true,
  "data": {
    "id": 1842,
    "channel": "email",
    "status": "sent",
    "recipient_email": "ada@example.com",
    "error_message": null,
    "sent_at": "2026-09-18T13:54:08+00:00",
    "attachments": [
      {
        "id": 12,
        "file_name": "factura.pdf",
        "mime_type": "application/pdf",
        "size": 122880
      }
    ]
  }
}

401: token ausente o inválido. 404: el id no es de este equipo. WhatsApp fuera de la ventana de 24 h pasa a failed sin reintentos.

La misma referencia, con el token ya inyectado si estás logueado, está en Humano → Help → Communications API.