openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 59.8 kB
JSON
{"openapi":"3.0.1","servers":[{"url":"https://api.nexmo.com/v1/messages"}],"info":{"contact":{"email":"devrel@nexmo.com","name":"Nexmo DevRel","url":"https://developer.nexmo.com/"},"description":"The Messages API consolidates and normalises exchanges across all messaging channels. It allows you to use a single API to interact with our various channels such as SMS, MMS, WhatsApp, Viber and Facebook Messenger","title":"Messages API","version":"1.4.0","x-logo":{"url":"https://www.vonage.com/content/dam/vonage/us-en/api/illustrations/Mobile_APIs_Services.svg"},"x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/nexmo/api-specification/master/definitions/messages-olympus.yml","version":"3.0"}],"x-providerName":"nexmo.com","x-serviceName":"messages-olympus"},"paths":{"/":{"post":{"callbacks":{"message-status":{"{$request.body#/callback}":{"post":{"description":"Webhooks provide information about events happening to the message such as whether it has been sent, delivered or rejected by the provider.","operationId":"message-status","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/messageStatusSMS"},{"$ref":"#/components/schemas/messageStatusMMS"},{"$ref":"#/components/schemas/messageStatusWhatsApp"},{"$ref":"#/components/schemas/messageStatusMessenger"},{"$ref":"#/components/schemas/messageStatusViber"}]}}},"required":true},"responses":{"200":{"description":"Your server returns this code if it accepts the callback."}},"summary":"Message Status","x-example-path":"/webhooks/message-status"}}}},"description":"Send a Message","operationId":"SendMessage","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Text"},{"properties":{"text":{"description":"The text of message to send; limited to 1000 characters. The Messages API automatically detects unicode characters when sending SMS and sends the message as a unicode SMS. For more information on how concatenation and encoding please visit: [developer.nexmo.com/messaging/sms/guides/concatenation-and-encoding](https://developer.nexmo.com/messaging/sms/guides/concatenation-and-encoding).\n"}}},{"$ref":"#/components/schemas/channelOptionsSms"}]}],"title":"SMS","x-tab-id":"SMS"},{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Image"},{"properties":{"image":{"properties":{"caption":{"description":"Additional text to accompany the image.","example":"Additional text to accompany the image.","maxLength":2000,"minLength":1,"type":"string"},"url":{"description":"The URL of the image attachment.\n\nSupports `.jpg`, `.jpeg`, `.png` and `.gif`.\n","example":"https://example.com/image.jpg","type":"string"}},"required":["url"]}}},{"$ref":"#/components/schemas/channelOptionsMms"}]},{"allOf":[{"$ref":"#/components/schemas/vCard"},{"properties":{"vcard":{"properties":{"url":{"description":"The URL of the vCard attachment.\n\nSupports `.vcf` only.\n","example":"https://example.com/contact.vcf","type":"string"}},"required":["url"]}}},{"$ref":"#/components/schemas/channelOptionsMms"}]},{"allOf":[{"$ref":"#/components/schemas/Audio"},{"properties":{"audio":{"properties":{"caption":{"description":"Additional text to accompany the audio file.","example":"Additional text to accompany the audio file.","maxLength":2000,"minLength":1,"type":"string"},"url":{"description":"The URL of the audio attachment.\n","example":"https://example.com/audio.mp3","type":"string"}},"required":["url"]},"message_type":{"description":"The type of message to send. You must provide `audio` in this field.\n\nFor best device and network support .mp3 is recommended. Not supported for US short codes.\n","enum":["audio"],"example":"audio","type":"string"}}},{"$ref":"#/components/schemas/channelOptionsMms"}]},{"allOf":[{"$ref":"#/components/schemas/Video"},{"properties":{"message_type":{"description":"The type of message to send. You must provide `video` in this field.\n\nFor best device and network support .mp4 is recommended. Not supported for US short codes.\n","enum":["video"],"example":"video","type":"string"},"video":{"properties":{"caption":{"description":"Additional text to accompany the video file.","example":"Additional text to accompany the video file.","maxLength":2000,"minLength":1,"type":"string"},"url":{"description":"The URL of the video attachment.\n","example":"https://example.com/video.mp4","type":"string"}},"required":["url"]}}},{"$ref":"#/components/schemas/channelOptionsMms"}]}],"title":"MMS","x-tab-id":"MMS"},{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Text"},{"properties":{"text":{"description":"The text of message to send; limited to 4096 characters, including unicode.\n"}}},{"$ref":"#/components/schemas/channelOptionsWhatsapp"}]},{"allOf":[{"$ref":"#/components/schemas/Location"},{"properties":{"text":{"description":"The location to be sent in the message.\n"}}},{"$ref":"#/components/schemas/channelOptionsWhatsapp"}]},{"allOf":[{"$ref":"#/components/schemas/Image"},{"properties":{"image":{"properties":{"caption":{"description":"Additional text to accompany the image.","example":"Additional text to accompany the image.","maxLength":3000,"minLength":1,"type":"string"},"url":{"description":"The URL of the image attachment.\n\nSupports `.jpg`, `.jpeg`, and `.png`.\n","example":"https://example.com/image.jpg","type":"string"}},"required":["url"]}}},{"$ref":"#/components/schemas/channelOptionsWhatsapp"}]},{"allOf":[{"$ref":"#/components/schemas/Audio"},{"properties":{"audio":{"properties":{"url":{"description":"The URL of the audio attachment.\n\nSupports `.aac`, `.m4a`, `.amr`, `.mp3` and `.opus`.\n","maxLength":2000,"minLength":10}},"required":["url"]}}},{"$ref":"#/components/schemas/channelOptionsWhatsapp"}]},{"allOf":[{"$ref":"#/components/schemas/Video"},{"properties":{"video":{"properties":{"caption":{"description":"Additional text to accompany the file.","example":"Additional text.","type":"string"},"url":{"description":"The URL of the video attachment.\n\nSupports `.mp4` and `.3gpp`. Note, only `H.264` video codec and `AAC` audio codec is supported.\n"}},"required":["url"]}}},{"$ref":"#/components/schemas/channelOptionsWhatsapp"}]},{"allOf":[{"$ref":"#/components/schemas/File"},{"properties":{"file":{"properties":{"caption":{"description":"Additional text to accompany the file.","example":"Additional text.","type":"string"},"url":{"description":"The URL of the file attachment.\n\nSupports supports a wide range of attachments including `.zip`, `.csv` and `.pdf`.\n"}},"required":["url"]}}},{"$ref":"#/components/schemas/channelOptionsWhatsapp"}]},{"allOf":[{"required":["message_type","whatsapp"]},{"$ref":"#/components/schemas/Template"},{"$ref":"#/components/schemas/channelOptionsWhatsapp"},{"properties":{"whatsapp":{"properties":{"locale":{"description":"The [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) language of the template. See [the WhatsApp documentation](https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages-) for supported languages.","example":"en_US","type":"string"},"policy":{"description":"Policy for resolving what language template to use. As of right now the only valid choice is `deterministic`.","enum":["deterministic"],"example":"deterministic","type":"string"}},"required":["locale"],"type":"object"}}}]},{"allOf":[{"required":["message_type"]},{"$ref":"#/components/schemas/Custom"},{"$ref":"#/components/schemas/channelOptionsWhatsapp"}]}],"title":"WhatsApp","x-tab-id":"WhatsApp"},{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Text"},{"properties":{"text":{"description":"The text of message to send; limited to 640 characters, including unicode.\n"}}},{"$ref":"#/components/schemas/channelOptionsMessenger"}]},{"allOf":[{"$ref":"#/components/schemas/Image"},{"properties":{"image":{"properties":{"url":{"description":"The URL of the image attachment.\n\nSupports `.jpg`, `.jpeg`, `.png` and `.gif`.\n","example":"https://example.com/image.jpg","type":"string"}}}}},{"$ref":"#/components/schemas/channelOptionsMessenger"}]},{"allOf":[{"$ref":"#/components/schemas/Audio"},{"properties":{"audio":{"properties":{"url":{"description":"The URL of the audio attachment.\n\nOnly supports `.mp3` files\n","maxLength":2000,"minLength":10}}}}},{"$ref":"#/components/schemas/channelOptionsMessenger"}]},{"allOf":[{"$ref":"#/components/schemas/Video"},{"properties":{"video":{"properties":{"url":{"description":"The URL of the video attachment.\n\nSupports `.mp4` files. Note, only `H.264` video codec and `AAC` audio codec is supported.\n"}}}}},{"$ref":"#/components/schemas/channelOptionsMessenger"}]},{"allOf":[{"$ref":"#/components/schemas/File"},{"properties":{"file":{"properties":{"url":{"description":"The URL of the file attachment.\n\nSupports a wide range of attachments including `.zip`, `.csv` and `.pdf`.\n"}}}}},{"$ref":"#/components/schemas/channelOptionsMessenger"}]}],"title":"Messenger","x-tab-id":"Messenger"},{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Text"},{"properties":{"text":{"description":"The text of message to send; limited to 1000 characters, including unicode.\n"}}},{"$ref":"#/components/schemas/channelOptionsViberWithButton"}]},{"allOf":[{"$ref":"#/components/schemas/Image"},{"properties":{"image":{"properties":{"caption":{"description":"A caption to accompany the image. Required if the message includes an action button.","example":"Check out this new promotion","type":"string"},"url":{"description":"The URL of the image attachment.\n\nSupports `.jpg`, `.jpeg`, and `.png`.\n","example":"https://example.com/image.jpg","type":"string"}}}}},{"$ref":"#/components/schemas/channelOptionsViberWithButton"}]},{"allOf":[{"$ref":"#/components/schemas/Video"},{"properties":{"video":{"properties":{"caption":{"description":"Text caption to accompany message.","example":"Check out this new video","type":"string"},"thumb_url":{"description":"URL to an image file for a thumbnail preview of the video.","example":"https://example.com/file1.jpg","maxLength":1000,"type":"string"},"url":{"description":"The URL of the video attachment.","example":"https://example.com/image.jpg","type":"string"}},"required":["url","duration","file_size","thumb_url"]}}},{"$ref":"#/components/schemas/channelOptionsViberVideo"}]},{"allOf":[{"$ref":"#/components/schemas/File"},{"properties":{"file":{"description":"An object containing details of the file to be sent. Note: allowed file types are `.doc,` `.docx`, `.rtf`, `.dot`, `.dotx`, `.odt`, `.odf`, `.fodt`, `.txt`, `.info`, `.pdf`, `.xps`, `.pdax`, `.eps`, `.xls`, `.xlsx`, `.ods`, `.fods`, `.csv`, `.xlsm`, `.xltx`. Maximum file size is 200MB","properties":{"name":{"description":"The name and extension of the file.","example":"example.pdf","maxLength":25,"type":"string"},"url":{"description":"The URL for the file attachment *or* the path for the location of the file attachement. If `name` is included, can just be the path. If `name` is not included, must include the filename and extension.","example":"https://example.com/files/","type":"string"}}}}},{"$ref":"#/components/schemas/channelOptionsViber"}]}],"title":"Viber","x-tab-id":"Viber"}]}}},"description":"Send a Message.","required":true,"x-show-example-request":true},"responses":{"202":{"content":{"application/json":{"schema":{"oneOf":[{"description":"SMS","properties":{"message_uuid":{"$ref":"#/components/schemas/MessageUuid"}},"type":"object","x-tab-id":"SMS"},{"description":"MMS","properties":{"message_uuid":{"$ref":"#/components/schemas/MessageUuid"}},"type":"object","x-tab-id":"MMS"},{"description":"WhatsApp","properties":{"message_uuid":{"$ref":"#/components/schemas/MessageUuid"}},"type":"object","x-tab-id":"WhatsApp"},{"description":"Messenger","properties":{"message_uuid":{"$ref":"#/components/schemas/MessageUuid"}},"type":"object","x-tab-id":"Messenger"},{"description":"Viber","properties":{"message_uuid":{"$ref":"#/components/schemas/MessageUuid"}},"type":"object","x-tab-id":"Viber"}],"type":"object"}}},"description":"Accepted."},"401":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorUnauthorizedMissingCredentials"},{"$ref":"#/components/schemas/ErrorUnauthorizedInvalidApplication"}]}}},"description":"Authentication failure"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPaymentRequired"}}},"description":"Payment Required"},"422":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorInvalidJson"},{"$ref":"#/components/schemas/ErrorChannel"},{"$ref":"#/components/schemas/ErrorChannelParams"},{"$ref":"#/components/schemas/ErrorSender"},{"$ref":"#/components/schemas/ErrorRecipient"},{"$ref":"#/components/schemas/ErrorMessageType"},{"$ref":"#/components/schemas/ErrorMessageParams"},{"$ref":"#/components/schemas/ErrorClientReference"}]}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorThrottled"}}},"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInternal"}}},"description":"Internal error"}},"security":[{"bearerAuth":[]},{"basicAuth":[]}],"summary":"Send a message to the given channel."}}},"components":{"schemas":{"Audio":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"audio":{"properties":{"url":{"example":"https://example.com/audio.mp3","format":"url","type":"string"}},"required":["url"],"type":"object"},"message_type":{"description":"The type of message to send. You must provide `audio` in this field","enum":["audio"],"example":"audio","type":"string"}},"required":["audio"],"title":"Audio","type":"object","x-tab-id":"Audio"}]},"Context":{"description":"This is only present for the Inbound Message where the user is quoting another message, or for a `product` message where the user has selected the 'Message Business' \noption. It provides information about the quoted message and/or the product message being responded to. \n","properties":{"message_from":{"description":"The phone number of the **original sender** of the message being quoted in the [E.164](https://en.wikipedia.org/wiki/E.164) format. Not present in a `context` object which is the result of a user selecting 'Message Business' in a `product` message.","example":"447700900000","type":"string"},"message_uuid":{"description":"The UUID of the message being quoted. Not present in a `context` object which is the result of a user selecting 'Message Business' in a `product` message.","example":"aaaaaaaa-bbbb-cccc-dddd-0123456789ab","type":"string"},"whatsapp_referred_product":{"description":"An object containing details of a product from a `product` message being quoted or replied to using the 'Message Business' option.\n","properties":{"catalog_id":{"description":"The ID of the catalog associated with the product from the `product` message being quoted or replied to using the 'Message Business' option.","example":"1267260820787549","type":"string"},"product_retailer_id":{"description":"The ID of the product from the `product` message being quoted or replied to using the 'Message Business' option.","example":"r07qei73l7","type":"string"}},"required":["catalog_id","product_retailer_id"],"type":"object"}},"required":["message_uuid","message_from"],"type":"object"},"Custom":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"custom":{"additionalProperties":true,"description":"A custom payload, which is passed directly to WhatsApp for certain features such as templates and interactive messages. The schema of a custom object can vary widely. [Read more about Custom Objects](https://developer.vonage.com/messages/concepts/custom-objects).","type":"object"},"message_type":{"description":"The type of message to send. You must provide `custom` in this field","enum":["custom"],"example":"custom","type":"string"}},"title":"Custom","type":"object","x-tab-id":"Custom"}]},"ErrorChannel":{"description":"Unsupported channel","properties":{"detail":{"description":"Additional information about the error","example":"The specified channel is not supported.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Unsupported channel","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1100","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorChannelParams":{"description":"Invalid channel parameters","properties":{"detail":{"description":"Additional information about the error","example":"The value of one or more parameters is invalid.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"invalid_parameters":{"items":{"properties":{"name":{"description":"Name of invalid parameter","example":"messenger.category","type":"string"},"reason":{"description":"Reason of failure","example":"Must be one of `response`, `update` or `message_tag`.","type":"string"}},"type":"object"},"type":"array"},"title":{"description":"Generic error message","example":"Invalid channel parameters","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1110","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorClientReference":{"description":"Invalid client reference","properties":{"detail":{"description":"Additional information about the error","example":"The client reference can be a string of up to 40 characters.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Invalid client reference","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1060","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorInternal":{"properties":{"detail":{"description":"Additional information about the error","example":"There was an error processing your request in the Platform.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Internal error","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1000","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorInvalidJson":{"description":"Invalid JSON","properties":{"detail":{"description":"Additional information about the error","example":"Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"The request body did not contain valid JSON","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors#invalid-json","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorMessageParams":{"description":"Invalid message parameters","properties":{"detail":{"description":"Additional information about the error","example":"The value of one or more parameters is invalid.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"invalid_parameters":{"items":{"properties":{"name":{"description":"Name of invalid parameter","example":"image.url","type":"string"},"reason":{"description":"Reason of failure","example":"is required.","type":"string"}},"type":"object"},"type":"array"},"title":{"description":"Generic error message","example":"Invalid params","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1150","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorMessageType":{"description":"Invalid message type","properties":{"detail":{"description":"Additional information about the error","example":"The `to` parameter is invalid for the given channel.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Invalid message type","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1140","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorPaymentRequired":{"properties":{"detail":{"description":"Additional information about the error","example":"This request could not be performed due to your account balance being low.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Low balance","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/#low-balance","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorRecipient":{"description":"Invalid recipient","properties":{"detail":{"description":"Additional information about the error","example":"The `to` parameter is invalid for the given channel.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Invalid recipient","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#110","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorSender":{"description":"Invalid sender","properties":{"detail":{"description":"Additional information about the error","example":"The `from` parameter is invalid for the given channel.","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Invalid sender","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1120","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorThrottled":{"properties":{"detail":{"description":"Additional information about the error","example":"Please wait, then retry your request","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"Rate Limit Hit","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/messages-olympus#1000","type":"string"}},"required":["type","title","detail","instance"],"type":"object"},"ErrorUnauthorizedInvalidApplication":{"description":"Invalid Application Type","properties":{"detail":{"description":"Additional information about the error","example":"Check your API key is correct and has been whitelisted","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"The crendentials provided do not have access to the requested product","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/#unprovisioned","type":"string"}},"required":["type","title","details","instance"],"type":"object"},"ErrorUnauthorizedMissingCredentials":{"description":"Missing or Invalid Credentials","properties":{"detail":{"description":"Additional information about the error","example":"Check that you're using the correct credentials, and that your account has this feature enabled","type":"string"},"instance":{"description":"Internal Trace ID","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"Generic error message","example":"You did not provide correct credentials.","type":"string"},"type":{"description":"Link to error / remediation options","example":"https://developer.nexmo.com/api-errors/#unathorized","type":"string"}},"required":["type","title","details","instance"],"type":"object"},"File":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"file":{"properties":{"url":{"example":"https://example.com/file.pdf","type":"string"}},"required":["url"],"type":"object"},"message_type":{"description":"The type of message to send. You must provide `file` in this field","enum":["file"],"example":"file","type":"string"}},"required":["file"],"title":"File","type":"object","x-tab-id":"File"}]},"FromId":{"description":"The ID of the message sender\n","example":"9876543210","maxLength":50,"minLength":1,"type":"string"},"FromNumber":{"description":"The phone number of the message **sender** in the [E.164](https://en.wikipedia.org/wiki/E.164) format. Don't use a leading + or 00 when entering a phone number, start with the country code, for example, 447700900000. For SMS in certain localities alpha-numeric sender id's will work as well, see [Global Messaging](https://developer.nexmo.com/messaging/sms/guides/country-specific-features#country-specific-features) for more details\n","example":"447700900001","type":"string"},"Image":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"image":{"properties":{"url":{"description":"The publicly accessible URL of the image attachment. The image file is available for 48 hours after it is created. Supported types are .jpg, .jpeg, and .png","example":"https://example.com/image.jpg","format":"url","type":"string"}},"required":["url"],"type":"object"},"message_type":{"description":"The type of message to send. You must provide `image` in this field","enum":["image"],"example":"image","type":"string"}},"required":["image"],"title":"Image","type":"object","x-tab-id":"Image"}]},"InboundMessengerMessageCommon":{"properties":{"channel":{"description":"The channel that the message came in on","enum":["messenger"],"example":"messenger","type":"string"},"from":{"$ref":"#/components/schemas/FromId"},"message_uuid":{"$ref":"#/components/schemas/MessageUuid"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"to":{"$ref":"#/components/schemas/ToId"}},"required":["channel","message_uuid","to","from","timestamp"],"title":"Messenger","x-tab-id":"Messenger"},"InboundViberMessageCommon":{"properties":{"channel":{"description":"The channel that the message came in on","enum":["viber_service"],"example":"viber_service","type":"string"},"context":{"description":"Object containing contextual details for the inbound message when it is a response to another message.","properties":{"message_uuid":{"description":"The ID of the message being replied to.","example":"1234567890abcdef","type":"string"}},"type":"object"},"from":{"$ref":"#/components/schemas/FromNumber"},"message_uuid":{"$ref":"#/components/schemas/MessageUuid"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"to":{"$ref":"#/components/schemas/ToId"}},"required":["channel","message_uuid","to","from","timestamp"],"title":"Viber","x-tab-id":"Viber"},"Location":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"location":{"properties":{"address":{"description":"Address of the location. Only displayed if `name` is present.","example":"23 Main St, Holmdel, NJ 07733, USA","type":"string"},"lat":{"description":"Latitude of the location.","example":40.34772,"type":"number"},"long":{"description":"Longitude of the location.","example":-74.18847,"type":"number"},"name":{"description":"Name of the location.","example":"Vonage","type":"string"}},"required":["lat","long"],"type":"object"},"message_type":{"description":"The type of message to send. You must provide `location` in this field","enum":["location"],"example":"location","type":"string"}},"required":["location"],"title":"Location","type":"object","x-tab-id":"Location"}]},"MessageUuid":{"description":"The UUID of the message","example":"aaaaaaaa-bbbb-cccc-dddd-0123456789ab","type":"string"},"Order":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"message_type":{"description":"The type of message to send.","enum":["order"],"example":"order","type":"string"},"order":{"properties":{"catalog_id":{"description":"The ID of the catalog containing the products in this order.","example":"2806150799683508","type":"string"},"product_items":{"items":{"properties":{"currency":{"description":"The currency code representing the currency for this specific item.","example":"USD","type":"string"},"item_price":{"description":"The unit price for this specific item.","example":"9.99","type":"string"},"product_retailer_id":{"description":"The ID of the specific product being ordered.","example":"pk1v7rudbg","type":"string"},"quantity":{"description":"The quantity ordered for this specific item.","example":"1","type":"string"}},"type":"object"},"type":"array"}},"required":["catalog_id","product_items"],"type":"object"}},"required":["order"],"title":"Order","type":"object","x-tab-id":"Order"}]},"Profile":{"properties":{"name":{"description":"The WhatsApp number's displayed profile name","example":"Jane Smith","type":"string"}},"required":["name"],"type":"object"},"Reply":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"message_type":{"description":"The type of message to send. You must provide `custom` in this field.","enum":["reply"],"example":"reply","type":"string"},"reply":{"properties":{"description":{"description":"A description that may be added to the interactive options presented (available only on interactive lists).","example":"Select 9am appointmaent time","type":"string"},"id":{"description":"An identifier to help identify the exact interactive message response.","example":"row1","type":"string"},"title":{"description":"The title displayed on the interactive option chosen.","example":"9am","type":"string"}},"required":["id","title"],"type":"object"}},"required":["reply"],"title":"Reply","type":"object","x-tab-id":"Reply"}]},"Template":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"message_type":{"description":"The type of message to send. You must provide `template` in this field","enum":["template"],"example":"template","type":"string"},"template":{"properties":{"name":{"description":"The name of the template. For WhatsApp use your WhatsApp namespace (available via Facebook Business Manager), followed by a colon : and the name of the template to use.","example":"9b6b4fcb_da19_4a26_8fe8_78074a91b584:verify","type":"string"},"parameters":{"$ref":"#/components/schemas/TemplateParameters"}},"required":["name"],"type":"object"}},"required":["template"],"title":"Template","type":"object","x-tab-id":"Template"}]},"TemplateParameters":{"description":"The parameters are an array of strings, with the first string being used for {{1}} in the template, with the second being {{2}} etc. Only required if the template specified by `name` contains parameters.","example":["Verification","2526","5"],"items":{"type":"string"},"type":"array"},"Text":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"description":"The text of message to send.","properties":{"message_type":{"description":"The type of message to send. You must provide `text` in this field","enum":["text"],"example":"text","type":"string"},"text":{"example":"Nexmo Verification code: 12345.<br />Valid for 10 minutes.","type":"string"}},"required":["text"],"title":"Text","x-tab-id":"Text"}]},"Timestamp":{"description":"The datetime of when the event occurred, in `ISO 8601` format.","example":"2025-04-15T13:51:51.320Z","type":"string"},"ToId":{"description":"The ID of the message recipient\n","example":"0123456789","maxLength":50,"minLength":1,"type":"string"},"ToNumber":{"description":"The phone number of the message **recipient** in the [E.164](https://en.wikipedia.org/wiki/E.164) format. Don't use a leading + or 00 when entering a phone number, start with the country code, for example, 447700900000.\n","example":"447700900000","maxLength":15,"minLength":7,"type":"string"},"Unsupported":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"message_type":{"description":"The type of message to send. Will be `unsupported` if the type of message received from user is not supported by the channel.","enum":["unsupported"],"example":"unsupported","type":"string"}},"required":["message_type"],"title":"Unsupported","type":"object","x-tab-id":"Unsupported"}]},"Usage":{"properties":{"currency":{"description":"The charge currency in ISO 4217 format.","enum":["EUR"],"example":"EUR","type":"string"},"price":{"description":"The charge amount as a stringified number.","example":"0.0333","type":"string"}},"type":"object"},"Video":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"message_type":{"description":"The type of message to send. You must provide `video` in this field","enum":["video"],"example":"video","type":"string"},"video":{"properties":{"url":{"description":"Publicly accessible URL of the video attachment. Supports file types .mp4 and .3gpp\n> Note: Only supports video codec H.264 and audio codec AAC\n","example":"https://example.com/video.mp4","format":"url","type":"string"}},"required":["url"],"type":"object"}},"required":["video"],"title":"Video","type":"object","x-tab-id":"Video"}]},"baseMessageType":{"properties":{"client_ref":{"description":"Client reference of up to 100 characters. The reference will be present in every message status.","type":"string"}},"required":["to","from","message","message_type","channel"],"type":"object"},"channelOptionsMessenger":{"properties":{"channel":{"description":"The channel to send to. You must provide `messenger` in this field","enum":["messenger"],"example":"messenger","type":"string"},"from":{"$ref":"#/components/schemas/FromId"},"messenger":{"properties":{"category":{"description":"The use of different category tags enables the business to send messages for different use cases. For Facebook Messenger they need to comply with their [Messaging Types policy](https://developers.facebook.com/docs/messenger-platform/send-messages#messaging_types). Vonage maps our `category` to their `messaging_type`. If `message_tag` is used, then an additional `tag` for that type is mandatory. By default Vonage sends the `response` category to Facebook Messenger.","enum":["response","update","message_tag"],"example":"response","type":"string"},"tag":{"description":"A tag describing the type and relevance of the 1:1 communication between your app and the end user. A full list of available tags is available [here](https://developers.facebook.com/docs/messenger-platform/send-messages/message-tags)","example":"CONFIRMED_EVENT_UPDATE","type":"string"}},"type":"object"},"to":{"$ref":"#/components/schemas/ToId"}},"type":"object"},"channelOptionsMms":{"properties":{"channel":{"description":"The channel to send to. You must provide `mms` in this field","enum":["mms"],"example":"mms","type":"string"},"from":{"$ref":"#/components/schemas/FromNumber"},"to":{"$ref":"#/components/schemas/ToNumber"}},"type":"object"},"channelOptionsSms":{"properties":{"channel":{"description":"The channel to send to. You must provide `sms` in this field","enum":["sms"],"example":"sms","type":"string"},"from":{"$ref":"#/components/schemas/FromNumber"},"to":{"$ref":"#/components/schemas/ToNumber"}},"type":"object"},"channelOptionsViber":{"properties":{"channel":{"description":"The channel to send to. You must provide `viber_service` in this field","enum":["viber_service"],"example":"viber_service","type":"string"},"from":{"$ref":"#/components/schemas/FromId"},"to":{"$ref":"#/components/schemas/ToNumber"},"viber_service":{"properties":{"category":{"description":"The use of different category tags enables the business to send messages for different use cases. For Viber Business Messages the first message sent from a business to a user must be personal, informative & a targeted message - not promotional. By default Vonage sends the `transaction` category to Viber Business Messages.","enum":["transaction","promotion"],"type":"string"},"ttl":{"description":"Set the time-to-live of message to be delivered in seconds. i.e. if the message is not delivered in 600 seconds then delete the message.","example":600,"maximum":259200,"minimum":30,"type":"integer"},"type":{"description":"Viber-specific type definition. To use \"template\", please contact your Vonage Account Manager to setup your templates. To find out more please visit the [product page](https://www.vonage.com/communications-apis/messages/)","type":"string"}},"type":"object"}},"type":"object"},"channelOptionsViberVideo":{"properties":{"channel":{"description":"The channel to send to. You must provide `viber_service` in this field","enum":["viber_service"],"example":"viber_service","type":"string"},"from":{"$ref":"#/components/schemas/FromId"},"to":{"$ref":"#/components/schemas/ToNumber"},"viber_service":{"properties":{"category":{"description":"The use of different category tags enables the business to send messages for different use cases. For Viber Business Messages the first message sent from a business to a user must be personal, informative & a targeted message - not promotional. By default Vonage sends the `transaction` category to Viber Business Messages.","enum":["transaction","promotion"],"type":"string"},"duration":{"description":"The duration of the video in seconds.","example":"123","maximum":600,"minimum":1,"type":"string"},"file_size":{"description":"The file size of the video in MB.","example":"1","maximum":200,"minimum":1,"type":"string"},"ttl":{"description":"Set the time-to-live of message to be delivered in seconds. i.e. if the message is not delivered in 600 seconds then delete the message.","example":600,"maximum":259200,"minimum":30,"type":"integer"},"type":{"description":"Viber-specific type definition. To use \"template\", please contact your Vonage Account Manager to setup your templates. To find out more please visit the [product page](https://www.vonage.com/communications-apis/messages/)","type":"string"}},"type":"object"}},"type":"object"},"channelOptionsViberWithButton":{"properties":{"channel":{"description":"The channel to send to. You must provide `viber_service` in this field","enum":["viber_service"],"example":"viber_service","type":"string"},"from":{"$ref":"#/components/schemas/FromId"},"to":{"$ref":"#/components/schemas/ToNumber"},"viber_service":{"properties":{"action":{"description":"Node for Viber action buttons.","properties":{"text":{"description":"Text which is rendered on the action button.","example":"Find out more","maxLength":30,"type":"string"},"url":{"description":"A URL which is requested when the action button is clicked.","example":"https://example.com/page1.html","type":"string"}},"type":"object"},"category":{"description":"The use of different category tags enables the business to send messages for different use cases. For Viber Business Messages the first message sent from a business to a user must be personal, informative & a targeted message - not promotional. By default Vonage sends the `transaction` category to Viber Business Messages.","enum":["transaction","promotion"],"type":"string"},"ttl":{"description":"Set the time-to-live of message to be delivered in seconds. i.e. if the message is not delivered in 600 seconds then delete the message.","example":600,"maximum":259200,"minimum":30,"type":"integer"},"type":{"description":"Viber-specific type definition. To use \"template\", please contact your Vonage Account Manager to setup your templates. To find out more please visit the [product page](https://www.vonage.com/communications-apis/messages/)","type":"string"}},"type":"object"}},"type":"object"},"channelOptionsWhatsapp":{"properties":{"channel":{"description":"The channel to send to. You must provide `whatsapp` in this field","enum":["whatsapp"],"example":"whatsapp","type":"string"},"from":{"$ref":"#/components/schemas/FromNumber"},"to":{"$ref":"#/components/schemas/ToNumber"}},"type":"object"},"inboundMessageMMS":{"properties":{"channel":{"description":"The channel the message came in on","enum":["mms"],"example":"mms","type":"string"},"from":{"$ref":"#/components/schemas/FromNumber"},"message_uuid":{"$ref":"#/components/schemas/MessageUuid"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"to":{"$ref":"#/components/schemas/ToNumber"}},"required":["channel","message_uuid","to","from","timestamp"],"title":"MMS","type":"object","x-tab-id":"MMS"},"inboundMessageSMS":{"properties":{"channel":{"description":"The channel the message came in on","enum":["sms"],"example":"sms","type":"string"},"from":{"$ref":"#/components/schemas/FromNumber"},"message_uuid":{"$ref":"#/components/schemas/MessageUuid"},"sms":{"description":"Channel specific metadata for SMS","properties":{"keyword":{"description":"The first word of the message sent to uppercase.","example":"HELLO","type":"string"},"num_messages":{"description":"The number of inbound SMS messages concatenated together to comprise this message. SMS messages are 160 characters, if an inbound message exceeds that size they are concatenated together to forma single message. This number indicates how many messages formed this webhook.","example":"2","type":"string"}},"type":"object"},"text":{"description":"The UTF-8 encoded text of the inbound message.\n","example":"Hello From Vonage!","type":"string"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"to":{"$ref":"#/components/schemas/ToNumber"},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["channel","message_uuid","to","from","timestamp","text"],"title":"SMS","type":"object"},"inboundWhatsAppMessageCommon":{"properties":{"channel":{"description":"The channel that the message came in on","enum":["whatsapp"],"example":"whatsapp","type":"string"},"context":{"$ref":"#/components/schemas/Context"},"from":{"$ref":"#/components/schemas/FromNumber"},"message_uuid":{"$ref":"#/components/schemas/MessageUuid"},"profile":{"$ref":"#/components/schemas/Profile"},"provider_message":{"description":"A message from the channel provider, which may contain a description, error codes or other information","type":"string"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"to":{"$ref":"#/components/schemas/ToNumber"}},"required":["channel","message_uuid","to","from","timestamp"],"title":"WhatsApp","type":"object","x-tab-id":"WhatsApp"},"messageStatusBase":{"properties":{"client_ref":{"description":"Client reference of up to 100 characters. The reference will be present in every message status.","type":"string"},"error":{"description":"If the message encountered a problem a descriptive error will be supplied in this object.","properties":{"detail":{"description":"Text describing the error. See [our errors list](https://developer.nexmo.com/api-errors/messages-olympus) for a list of possible errors","example":"Throttled - You have exceeded the submission capacity allowed on this account. Please wait and retry","type":"string"},"instance":{"description":"The record id of this error's occurrence.","example":"bf0ca0bf927b3b52e3cb03217e1a1ddf","type":"string"},"title":{"description":"The error code encountered when sending the message. See [our errors list](https://developer.nexmo.com/api-errors/messages-olympus) for a list of possible errors","example":1000,"type":"string"},"type":{"description":"The type of error encountered, follow URL for more details","example":"https://developer.nexmo.com/api-errors/messages-olympus#1000","format":"url","type":"string"}},"type":"object"},"from":{"$ref":"#/components/schemas/FromNumber"},"message_uuid":{"$ref":"#/components/schemas/MessageUuid"},"status":{"description":"The status of the message.","enum":["submitted","delivered","rejected","undeliverable"],"example":"submitted","type":"string"},"timestamp":{"description":"The datetime of when the event occurred, in `ISO 8601` format.","example":"2025-04-15T13:51:51.320Z","type":"string"},"to":{"$ref":"#/components/schemas/ToNumber"},"usage":{"properties":{"currency":{"description":"The charge currency in ISO 4217 format.","enum":["EUR"],"example":"EUR","type":"string"},"price":{"description":"The charge amount as a stringified number.","example":"0.0333","type":"string"}},"type":"object"}},"required":["message_uuid","channel","to","from","timestamp","status"],"type":"object"},"messageStatusMMS":{"allOf":[{"$ref":"#/components/schemas/messageStatusBase"},{"description":"MMS","properties":{"channel":{"description":"The channel sending to.","enum":["mms"],"example":"mms","type":"string"}},"title":"MMS","x-tab-id":"MMS"}]},"messageStatusMessenger":{"allOf":[{"$ref":"#/components/schemas/messageStatusBase"},{"description":"Messenger","properties":{"channel":{"description":"The channel sending to.","enum":["messenger"],"example":"messenger","type":"string"},"from":{"$ref":"#/components/schemas/FromId"},"status":{"enum":["submitted","delivered","rejected","undeliverable","read"],"example":"read"},"to":{"$ref":"#/components/schemas/ToId"}},"title":"Messenger","x-tab-id":"Messenger"}]},"messageStatusSMS":{"allOf":[{"$ref":"#/components/schemas/messageStatusBase"},{"description":"SMS","properties":{"channel":{"description":"The channel sending to.","enum":["sms"],"example":"sms","type":"string"}},"title":"SMS","x-tab-id":"SMS"}]},"messageStatusViber":{"allOf":[{"$ref":"#/components/schemas/messageStatusBase"},{"description":"Viber","properties":{"channel":{"description":"The channel sending to.","enum":["viber_service"],"example":"viber_service","type":"string"},"status":{"enum":["submitted","delivered","rejected","undeliverable","read"],"example":"read"}},"title":"Viber","x-tab-id":"Viber"}]},"messageStatusWhatsApp":{"allOf":[{"$ref":"#/components/schemas/messageStatusBase"},{"description":"WhatsApp","properties":{"channel":{"description":"The channel sending to.","enum":["whatsapp"],"example":"whatsapp","type":"string"},"status":{"enum":["submitted","delivered","rejected","undeliverable","read"],"example":"read"},"usage":{"properties":{"currency":{"description":"The charge currency in ISO 4217 format.","enum":["EUR"],"example":"EUR","type":"string"},"price":{"description":"The charge amount as a stringified number. For WhatsApp this is the default Vonage charge per conversation.","example":"0.0333","type":"string"}},"type":"object"},"whatsapp":{"description":"An object contining meta-data related to the WhatsApp message that triggered this callback. Only present for callbacks with a `status` of `delivered`.","properties":{"conversation":{"description":"An object contining data for the conversation to which the message relates.","properties":{"id":{"description":"The id of the conversation.","example":"1234567890","type":"string"},"origin":{"description":"An object contining data related to the origin of the conversation.","properties":{"type":{"description":"The conversation type.","example":"user_initiated","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"title":"WhatsApp","x-tab-id":"WhatsApp"}]},"vCard":{"allOf":[{"$ref":"#/components/schemas/baseMessageType"},{"properties":{"message_type":{"description":"The type of message to send. You must provide `vcard` in this field","enum":["vcard"],"example":"vcard","type":"string"},"vcard":{"properties":{"url":{"description":"The publicly accessible URL of the vCard attachment. Supported types are .vcf only","example":"https://example.com/conatact.vcf","format":"url","type":"string"}},"required":["url"],"type":"object"}},"required":["vcard"],"title":"vCard","type":"object","x-tab-id":"vCard"}]}},"securitySchemes":{"basicAuth":{"scheme":"basic","type":"http"},"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},"x-errors":{"1000":{"description":"Throttled - You have exceeded the submission capacity allowed on this account. Please wait and retry"},"1010":{"description":"Missing params - Your request is incomplete and missing some mandatory parameters."},"1020":{"description":"Invalid params - The value of one or more parameters is invalid."},"1021":{"description":"Invalid tag - The tag value is invalid."},"1022":{"description":"Invalid template - Invalid template or template parameters"},"1030":{"description":"Internal error - There was an error processing your request in the Platform."},"1040":{"description":"Invalid message - The Platform was unable to process your request. For example, due to an unrecognised prefix for the phone number."},"1050":{"description":"Number barred - The number you are trying to submit to is blacklisted and may not receive messages."},"1060":{"description":"Partner account barred - The `api_key` you supplied is for an account that has been barred from submitting messages."},"1070":{"description":"Partner quota exceeded - Your pre-paid account does not have sufficient credit to process this message."},"1080":{"description":"Account not enabled for REST - This account is not provisioned for REST submission, you should use SMPP on the SMS API."},"1090":{"description":"Message too long - The length of `udh` and `body` was greater than 140 octets for a binary type SMS requ