Communications API Reference

Queue a transactional email, WhatsApp or SMS with your team token, then fetch the same record to read its delivery status.

Base URL
https://admin.growhit.net/api/team/communications

This endpoint uses team token authentication. The team is determined by the Bearer token, not by a team_id parameter.

Authentication

All requests require team token authentication. Include the token in the Authorization header:

Authorization: Bearer YOUR_API_TOKEN
Note: The send is asynchronous. The create response returns status pending. Poll GET until status is sent or failed.
Available Endpoints
POST Send a communication
https://admin.growhit.net/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[]. Email stores from_name and from_address from the team sender at queue time, and delivery uses those values.

Request body
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.
Example request (email)
curl -X POST "https://admin.growhit.net/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"
Example request (email JSON, no files)
curl -X POST "https://admin.growhit.net/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" }
  }'
Example request (WhatsApp)
curl -X POST "https://admin.growhit.net/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"
Example request (WhatsApp JSON, no files)
curl -X POST "https://admin.growhit.net/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ó."
  }'
Example request (SMS)
curl -X POST "https://admin.growhit.net/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 response (201)
{
  "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",
    "from_name": "Avisos",
    "from_address": "avisos@idoneo.dev",
    "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.growhit.net/storage/12/factura.pdf"
      },
      {
        "id": 13,
        "file_name": "recibo-de-pago.pdf",
        "mime_type": "application/pdf",
        "size": 81920,
        "url": "https://admin.growhit.net/storage/13/recibo-de-pago.pdf"
      }
    ]
  }
}
Error responses
HTTP When
401 Missing or invalid team API token
422 Validation error (channel, recipient, subject, phone or attachments)
GET List communications
https://admin.growhit.net/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.
Example request
curl "https://admin.growhit.net/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 response (200)
{
  "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
  }
}
GET Get a communication
https://admin.growhit.net/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.

Example request
curl "https://admin.growhit.net/api/team/communications/1842" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Success response (200)
{
  "success": true,
  "data": {
    "id": 1842,
    "channel": "email",
    "status": "sent",
    "status_label": "Enviado",
    "recipient_email": "ada@example.com",
    "from_name": "Avisos",
    "from_address": "avisos@idoneo.dev",
    "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.growhit.net/storage/12/factura.pdf"
      },
      {
        "id": 13,
        "file_name": "recibo-de-pago.pdf",
        "mime_type": "application/pdf",
        "size": 81920,
        "url": "https://admin.growhit.net/storage/13/recibo-de-pago.pdf"
      }
    ]
  }
}
Status values
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.
Error responses
HTTP When
401 Missing or invalid team API token
404 Communication not found for this team