Skip to main content

Endpoint

POST https://api.apifycloud.io/api/v1/messages/{appId}/send

Authentication

Bearer token required. Scope: messages:send

Path parameters

  • appId (UUID, required)

Shared request fields

  • to (string, required) recipient phone number
  • type (string, required) message type
  • tags (array of strings, optional)
  • metadata (object or string, optional)

Response shapes

Template:
{
  "data": {
    "messageId": "uuid",
    "status": "sent",
    "providerMessageId": "string"
  },
  "meta": {
    "timestamp": "2024-01-01T00:00:00.000Z",
    "mode": "sync"
  }
}
Non-template:
{
  "data": {
    "messageId": "uuid",
    "status": "queued",
    "logId": "uuid"
  },
  "meta": {
    "timestamp": "2024-01-01T00:00:00.000Z"
  }
}

Message type guides

Errors

  • 400 invalid_json invalid JSON body
  • 400 validation_error invalid request parameters
  • 400 configuration_error provider not configured for this app
  • 400 invalid_template template is not approved
  • 400 invalid_request missing required fields for selected type
  • 403 forbidden unauthorized for app or missing scope
  • 404 not_found template not found
  • 429 rate_limit_exceeded
  • 502 provider_error
  • 500 server_error