For the complete documentation index, see llms.txt. This page is also available as Markdown.

Messages

Endpoints for sending and managing messages

Send Message

post

Send a message via the messaging API. Supports text, media, and template messages with automatic routing to marketing messages endpoint when applicable. Supports MM API fallback mechanism, more info: https://docs.360dialog.com/partner/messaging-and-calling/sending-marketing-messages/technical-details-for-mm-api.

Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Body

Message Payload

categorystring · enumOptional

Direct Send only. Category of the message to send as a template: utility or authentication (charged at the respective rates). Omitting it is equivalent to service: the regular service-message flow, where the message is dropped if the customer service window isn't open

Example: utilityPossible values:
messaging_productstringRequiredExample: whatsapp
recipientstringOptional

Business-scoped user ID (BSUID) of the message recipient, in the form <ISO 3166-2 country code>.<up to 128 alphanumeric chars>. Alternative to 'to'; required if 'to' is omitted

Example: US.13491208655302741918
recipient_typestring · enumRequiredPossible values:
tostringOptional

WhatsApp ID or phone number of the message recipient. Required unless recipient (BSUID) is provided

Example: 1234567890
ttl_secondsinteger · min: 30 · max: 43200Optional

Direct Send only. Custom time-to-live of the message in seconds; requires category utility or authentication. Utility: 30-43200 (default 30 days). Authentication: 30-900 (default 600)

Example: 600
typestring · enumRequiredPossible values:
Responses
200

Message sent successfully

application/json
messaging_productstringOptional
post/messages
POST /messages HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1352

{
  "audio": {
    "id": "text",
    "link": "text"
  },
  "category": "utility",
  "context": {
    "message_id": "text"
  },
  "direct_send_config": {
    "template_name": "order_shipment_update"
  },
  "document": {
    "id": "text",
    "link": "text"
  },
  "image": {
    "id": "text",
    "link": "text"
  },
  "interactive": {
    "action": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "body": {
      "text": "text"
    },
    "footer": {
      "text": "text"
    },
    "header": {
      "document": {
        "id": "text",
        "link": "text"
      },
      "image": {
        "id": "text",
        "link": "text"
      },
      "text": "text",
      "type": "text",
      "video": {
        "id": "text",
        "link": "text"
      }
    },
    "type": "button"
  },
  "location": {
    "address": "text",
    "latitude": 1,
    "longitude": 1,
    "name": "text"
  },
  "messaging_product": "whatsapp",
  "reaction": {
    "emoji": "text",
    "message_id": "text"
  },
  "recipient": "US.13491208655302741918",
  "recipient_type": "individual",
  "sticker": {
    "id": "text",
    "link": "text"
  },
  "template": {
    "components": [
      {
        "index": 1,
        "parameters": [
          {
            "currency": {
              "amount_1000": 1,
              "code": "text",
              "fallback_value": "text"
            },
            "date_time": {
              "fallback_value": "text"
            },
            "document": {
              "id": "text",
              "link": "text"
            },
            "image": {
              "id": "text",
              "link": "text"
            },
            "location": {
              "address": "text",
              "latitude": 1,
              "longitude": 1,
              "name": "text"
            },
            "text": "text",
            "type": "text",
            "video": {
              "id": "text",
              "link": "text"
            }
          }
        ],
        "sub_type": "quick_reply",
        "type": "header"
      }
    ],
    "language": {
      "code": "en_US"
    },
    "name": "hello_world"
  },
  "text": {
    "body": "text",
    "preview_url": true
  },
  "to": "1234567890",
  "ttl_seconds": 600,
  "type": "text",
  "video": {
    "id": "text",
    "link": "text"
  }
}
{
  "contacts": [
    {
      "input": "+1234567890",
      "user_id": "US.13491208655302741918",
      "wa_id": "1234567890"
    }
  ],
  "messages": [
    {
      "id": "text",
      "message_status": "accepted"
    }
  ],
  "messaging_product": "text"
}

Send Sample Message

post

Submit a sample of a message and use case you plan to send via Direct Send, so Meta can classify it and generate a matching template. Upload 3-4 samples covering the message types and use cases you intend to send.

Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Body

Sample message payload

categorystring · enumOptional

Required when submitting multiple button samples in a single request

Possible values:
typestring · enumRequiredPossible values:
Responses
200

Sample classified successfully

application/json
categorystring · enumOptionalPossible values:
successbooleanOptional
post/messages/sample
POST /messages/sample HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 356

{
  "category": "utility",
  "interactive": {
    "action": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "body": {
      "text": "text"
    },
    "footer": {
      "text": "text"
    },
    "header": {
      "document": {
        "id": "text",
        "link": "text"
      },
      "image": {
        "id": "text",
        "link": "text"
      },
      "text": "text",
      "type": "text",
      "video": {
        "id": "text",
        "link": "text"
      }
    },
    "type": "button"
  },
  "text": {
    "body": "text",
    "preview_url": true
  },
  "type": "text"
}
{
  "category": "UTILITY",
  "success": true
}

Last updated

Was this helpful?