Queue a transactional email, WhatsApp or SMS with your team token, then fetch the same record to read its delivery status.
https://admin.idoneo.dev/api/team/communications
This endpoint uses team token authentication. The team is determined by the Bearer token, not by a team_id parameter.
All requests require team token authentication. Include the token in the Authorization header:
Authorization: Bearer YOUR_API_TOKEN
https://admin.idoneo.dev/api/team/communications
Queue one message to one recipient. Email requires recipient_email and subject. WhatsApp and SMS require recipient_phone (10–15 digits). Attachments are allowed on email and WhatsApp (max 50 files, 10 MB each). SMS returns 422 if files are sent. JSON cannot carry files: send attachments as multipart with attachments[].
| Field | Tipo | Required | Descripción |
|---|---|---|---|
channel |
string | Sí | email, whatsapp or sms |
message |
string | Sí | Message body |
recipient_email |
string | If email | Recipient email address |
subject |
string | If email | Email subject (max 255) |
recipient_phone |
string | If WhatsApp/SMS | Phone number, 10–15 digits. Non-digits are stripped. |
recipient_name |
string | No | Display name |
contact_id |
integer | No | Existing contact in the same team. Otherwise matched by email or phone. |
metadata |
object | No | Arbitrary JSON. In multipart, send a JSON string. |
attachments |
file[] | No | Email and WhatsApp. Field name attachments[]. SMS returns 422 if files are sent. |
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 "recipient_name=Tester" \
-F "subject=Tu factura" \
-F "message=Adjuntamos la factura y el recibo de pago. https://idoneo.dev" \
-F "metadata={\"source\":\"erp\",\"external_id\":\"INV-1042\"}" \
-F "attachments[]=@./factura.pdf" \
-F "attachments[]=@./recibo-de-pago.pdf"
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": "Tester",
"subject": "Tu factura",
"message": "Tu factura del período está lista. https://idoneo.dev",
"metadata": { "source": "erp", "external_id": "INV-1042" }
}'
curl -X POST "https://admin.idoneo.dev/api/team/communications" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-F "channel=whatsapp" \
-F "recipient_phone=+34 600 111 222" \
-F "message=Adjuntamos la factura y el recibo de pago." \
-F "attachments[]=@./factura.pdf" \
-F "attachments[]=@./recibo-de-pago.pdf"
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ó."
}'
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."
}'
{
"success": true,
"message": "Communication queued successfully",
"data": {
"id": 1842,
"channel": "email",
"channel_label": "Email",
"status": "pending",
"status_label": "Pendiente",
"recipient_email": "ada@example.com",
"recipient_phone": null,
"recipient_name": "Tester",
"subject": "Tu factura",
"message": "Adjuntamos la factura y el recibo de pago. https://idoneo.dev",
"error_message": null,
"metadata": { "source": "erp", "external_id": "INV-1042" },
"sent_at": null,
"created_at": "2026-09-18T13:54:00+00:00",
"contact": null,
"attachments": [
{
"id": 12,
"file_name": "factura.pdf",
"mime_type": "application/pdf",
"size": 122880,
"url": "https://admin.idoneo.dev/storage/12/factura.pdf"
},
{
"id": 13,
"file_name": "recibo-de-pago.pdf",
"mime_type": "application/pdf",
"size": 81920,
"url": "https://admin.idoneo.dev/storage/13/recibo-de-pago.pdf"
}
]
}
}
| HTTP | When |
|---|---|
401 |
Missing or invalid team API token |
422 |
Validation error (channel, recipient, subject, phone or attachments) |
https://admin.idoneo.dev/api/team/communications
Returns the team communications. Without sort, rows are ordered by id descending, newest first. Walk page until current_page equals last_page. per_page defaults to 20 and cannot exceed 50, the same cap as Mailer and Tickets.
| Query | Descripción |
|---|---|
page |
Page number. Defaults to 1. |
per_page |
Page size. Defaults to 20. Maximum 50. |
search |
Subject, email, name or phone. |
channel |
email, whatsapp, sms |
status |
pending, sent, failed |
sent_today |
true keeps only messages sent today and ignores status. |
sort |
id, created_at, sent_at, status, channel, subject, recipient_email, recipient_name, recipient_phone. Defaults to id. |
order |
asc or desc. Defaults to desc. |
curl "https://admin.idoneo.dev/api/team/communications?search=factura&channel=email&status=sent&sort=sent_at&order=desc&page=1&per_page=20" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"data": [
{
"id": 1842,
"channel": "email",
"status": "sent",
"subject": "Tu factura",
"sent_at": "2026-09-18T13:54:08+00:00"
}
],
"pagination": {
"current_page": 1,
"last_page": 4,
"per_page": 20,
"total": 73
}
}
https://admin.idoneo.dev/api/team/communications/{id}
Returns the queued message, attachments and delivery status. Use data.status: pending, sent or failed. When failed, read data.error_message. When sent, data.sent_at is ISO-8601.
curl "https://admin.idoneo.dev/api/team/communications/1842" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"data": {
"id": 1842,
"channel": "email",
"status": "sent",
"status_label": "Enviado",
"recipient_email": "ada@example.com",
"subject": "Tu factura",
"message": "Adjuntamos la factura y el recibo de pago. https://idoneo.dev",
"error_message": null,
"sent_at": "2026-09-18T13:54:08+00:00",
"created_at": "2026-09-18T13:54:00+00:00",
"contact": {
"id": 88,
"name": "Tester",
"email": "ada@example.com",
"phone": null
},
"attachments": [
{
"id": 12,
"file_name": "factura.pdf",
"mime_type": "application/pdf",
"size": 122880,
"url": "https://admin.idoneo.dev/storage/12/factura.pdf"
},
{
"id": 13,
"file_name": "recibo-de-pago.pdf",
"mime_type": "application/pdf",
"size": 81920,
"url": "https://admin.idoneo.dev/storage/13/recibo-de-pago.pdf"
}
]
}
}
| Estado | Descripción |
|---|---|
pending |
Queued or retrying. sent_at is null. |
sent |
Delivered to the provider. sent_at is set. |
failed |
Did not send. Reason in error_message. WhatsApp outside the 24h window fails without automatic retries. |
| HTTP | When |
|---|---|
401 |
Missing or invalid team API token |
404 |
Communication not found for this team |