Request a message dispatch

POST /v1/api/dispatch

It creates a multi-channel and multi-language message for multiple recipients. Please note that there is a limit of 1000 recipients per request.

application/json

Body Required

Dispatch request payload

  • message object

    Multilanguage, multichannel message. Required if template is not specified

    Additional properties are allowed.

    Hide message attributes Show message attributes object
    • The default language used when a recipient's language is not available in the message translations. This language must be present among the keys in translations.

    • translations object Required

      The message translations, where each key represents a language code (iso alpha 2) and the corresponding value contains the translated message content.

      Hide translations attribute Show translations attribute object
      • * object Additional properties

        Additional properties are allowed.

        Hide * attributes Show * attributes object
        • contents array[object]

          The default list of message contents, applicable to all channels unless a specific channel override is provided. Each content item represents a distinct message (e.g., text, image, video, etc.), meaning multiple contents will result in multiple messages being sent.

          Hide contents attributes Show contents attributes object
          • text object

            Additional properties are allowed.

            Hide text attribute Show text attribute object
            • body string Required

              The text body of the message.

              Maximum length is 2000.

          • image object

            Additional properties are allowed.

            Hide image attribute Show image attribute object
            • url string Required

              The URL of the image to be included in the message.

              Maximum length is 512.

          • video object

            Additional properties are allowed.

            Hide video attribute Show video attribute object
            • url string Required

              The URL of the video to be included in the message.

              Maximum length is 512.

          • document object

            Additional properties are allowed.

            Hide document attribute Show document attribute object
            • url string Required

              The URL of the document to be included in the message.

              Maximum length is 512.

        • A map allowing content overrides for specific channels. If defined, the specified content will be used instead of the default 'contents' list for the given channel. For example, while multimedia messages may be included in 'contents', a simplified text version can be set for the SMS channel.

          Hide channelContents attribute Show channelContents attribute object
          • * array[object] Additional properties
            Hide * attributes Show * attributes object
            • text object

              Additional properties are allowed.

              Hide text attribute Show text attribute object
              • body string Required

                The text body of the message.

                Maximum length is 2000.

            • image object

              Additional properties are allowed.

              Hide image attribute Show image attribute object
              • url string Required

                The URL of the image to be included in the message.

                Maximum length is 512.

            • video object

              Additional properties are allowed.

              Hide video attribute Show video attribute object
              • url string Required

                The URL of the video to be included in the message.

                Maximum length is 512.

            • document object

              Additional properties are allowed.

              Hide document attribute Show document attribute object
              • url string Required

                The URL of the document to be included in the message.

                Maximum length is 512.

  • template object

    Required if message is not specified

    Additional properties are allowed.

    Hide template attribute Show template attribute object
    • id string Required
  • recipients array[object] Required
    Hide recipients attributes Show recipients attributes object
    • recipientIdentifiers array[object] Required
      Hide recipientIdentifiers attributes Show recipientIdentifiers attributes object
      • channelIdType string Required

        The type of identifier for the recipient. If using the recipient's phone number as the identifier, MSISDN should be used.

        Value is MSISDN.

      • channelIdentifier string Required

        The channel identifier for the recipient. For example, if using MSISDN, this should be the recipient's phone number, including the international prefix and the '+' symbol. For instance, a valid phone number could be +39XXXXXXXXXX.

    • language string

      The language for the recipient. If the specified language is available in the message translations, it will be used; otherwise, the default language of the message will be applied.

    • A key-value map used to replace placeholders in the message text. The keys represent placeholder names, and the values are the corresponding replacements.

      Hide placeholders attribute Show placeholders attribute object
      • * string Additional properties
    • metadata object

      Optional custom metadata linked to the recipient. Sent as 'recipientMetadata' parameter of "Message Status Update" webhook.

      Hide metadata attribute Show metadata attribute object
      • * string Additional properties
  • scheduleDate string(date-time)

    Optional scheduled date and time for a deferred message delivery in UTC format (e.g., 'yyyy-MM-dd'T'HH:mm:ss'Z'). Must be in the future and no more than 365 days from the current date. If null, the message will be sent immediately and cannot be cancelled. A scheduled dispatch can be cancelled only up to 5 minutes before the specified date and time.

  • Set true if you want to fix msisdn numbers with the countryCodeDefault. If numbers in the recipient list don't have interational prefix, set this flag to true otherwise recipients with invalid numbers will be skipped.

  • Required if countryCodeFixEnabled is true

  • channels object

    Channels parameters. Required if message is specified, ignored for template.

    Additional properties are allowed.

    Hide channels attributes Show channels attributes object
    • rcs object

      Optional parameters to enable the RCS channel for message dispatch.

      Additional properties are allowed.

      Hide rcs attribute Show rcs attribute object
    • sms object

      Optional parameters to enable the SMS channel for message dispatch.

      Additional properties are allowed.

      Hide sms attributes Show sms attributes object
      • senderId string Required
      • encoding string

        The encoding for SMS sending can be either forced, if specified, or automatically determined based on the text characters.

        Values are GSM7BIT or UCS2.

    • whatsapp object

      Optional parameters to enable the WhatsApp channel for message dispatch.

      Additional properties are allowed.

      Hide whatsapp attribute Show whatsapp attribute object
  • metadata object

    Optional custom metadata linked to the dispatch. Sent as 'dispatchMetadata' parameter of "Message Status Update" webhook.

    Hide metadata attribute Show metadata attribute object
    • * string Additional properties
  • Optional URL to which status updates for sent messages will be delivered as webhook callbacks. The URL must use the HTTPS protocol to ensure secure communication.

    Maximum length is 255.

  • Optional secret key used to sign webhook callbacks. If provided, each webhook request will include a signature header computed using HMAC-SHA256 with this secret, allowing the recipient to verify the integrity and authenticity of the payload.

    Minimum length is 16, maximum length is 64.

Responses

POST /v1/api/dispatch
curl \
 --request POST 'https://api.nifteem.com/v1/api/dispatch' \
 --header "X-API-Key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"message":{"translations":{"en":{"contents":[{"text":{"body":"Hello {{firstname}}! This is a simple SMS test."}}]}},"languageDefault":"en"},"channels":{"sms":{"senderId":"{{SMS_SENDER_ID}}"}},"recipients":[{"placeholders":{"firstname":"Mark"},"recipientIdentifiers":[{"channelIdType":"MSISDN","channelIdentifier":"+39347XXXXXXX"}]},{"placeholders":{"firstname":"Robert"},"recipientIdentifiers":[{"channelIdType":"MSISDN","channelIdentifier":"+39349XXXXXXX"}]}],"countryCodeDefault":"IT","countryCodeFixEnabled":true}'
Simple SMS
{
  "message": {
    "translations": {
      "en": {
        "contents": [
          {
            "text": {
              "body": "Hello {{firstname}}! This is a simple SMS test."
            }
          }
        ]
      }
    },
    "languageDefault": "en"
  },
  "channels": {
    "sms": {
      "senderId": "{{SMS_SENDER_ID}}"
    }
  },
  "recipients": [
    {
      "placeholders": {
        "firstname": "Mark"
      },
      "recipientIdentifiers": [
        {
          "channelIdType": "MSISDN",
          "channelIdentifier": "+39347XXXXXXX"
        }
      ]
    },
    {
      "placeholders": {
        "firstname": "Robert"
      },
      "recipientIdentifiers": [
        {
          "channelIdType": "MSISDN",
          "channelIdentifier": "+39349XXXXXXX"
        }
      ]
    }
  ],
  "countryCodeDefault": "IT",
  "countryCodeFixEnabled": true
}
RCS text with SMS fallback
{
  "message": {
    "translations": {
      "en": {
        "contents": [
          {
            "text": {
              "body": "Hello {{firstname}}! This is a simple RCS with SMS fallback test."
            }
          }
        ]
      }
    },
    "languageDefault": "en"
  },
  "channels": {
    "rcs": {
      "senderId": "{{RCS_SENDER_ID}}"
    },
    "sms": {
      "senderId": "{{SMS_SENDER_ID}}"
    }
  },
  "recipients": [
    {
      "placeholders": {
        "firstname": "Mark"
      },
      "recipientIdentifiers": [
        {
          "channelIdType": "MSISDN",
          "channelIdentifier": "+39347XXXXXXX"
        }
      ]
    },
    {
      "placeholders": {
        "firstname": "Robert"
      },
      "recipientIdentifiers": [
        {
          "channelIdType": "MSISDN",
          "channelIdentifier": "+39349XXXXXXX"
        }
      ]
    }
  ]
}
Specific RCS text with SMS fallback
{
  "message": {
    "translations": {
      "en": {
        "contents": [
          {
            "text": {
              "body": "Hello {{firstname}}! this is a reminder for your appointment on {{date}} at {{time}}. Call us at +39 02 000XXXXX"
            }
          }
        ],
        "channelContents": {
          "rcs": [
            {
              "text": {
                "body": "Hello {{firstname}}, this is a reminder for your appointment on {{date}} at {{time}} with {{doctorname}} at {{location}}. Please arrive 10 minutes early. Need to reschedule or have questions? Call us at +39 02 000XXXXX . See you soon!"
              }
            }
          ]
        }
      }
    },
    "languageDefault": "en"
  },
  "channels": {
    "rcs": {
      "senderId": "{{RCS_SENDER_ID}}"
    },
    "sms": {
      "senderId": "{{SMS_SENDER_ID}}"
    }
  },
  "recipients": [
    {
      "placeholders": {
        "date": "14/02/2025",
        "time": "14:14",
        "location": "Via Roma, 48 - Milano",
        "firstname": "Mark",
        "doctorname": "Dr. John Smith"
      },
      "recipientIdentifiers": [
        {
          "channelIdType": "MSISDN",
          "channelIdentifier": "+39347XXXXXXX"
        }
      ]
    }
  ]
}
Template with placeholders
{
  "template": {
    "id": "0K2QG0XXXXXX"
  },
  "recipients": [
    {
      "placeholders": {
        "date": "31/01/2025",
        "time": "14:14",
        "firstname": "Mark"
      },
      "recipientIdentifiers": [
        {
          "channelIdType": "MSISDN",
          "channelIdentifier": "39347XXXXXXX"
        }
      ]
    }
  ],
  "countryCodeDefault": "IT",
  "countryCodeFixEnabled": true
}
Response examples (200)
{
  "dispatchId": "0K0FHMEJ4DPFZ",
  "scheduleDate": "2025-03-05T12:00:10Z",
  "rejectedRecipients": []
}