# One API

## Query status of a message

> \<ul>\<li>Response will contain status information for any channel relevant to the message.\</li>\<li>The timestamp field indicates the time of the last status change.\</li>\<li>If the message is in an unknown state (message not found), the format is different (since there is no channel) and the timestamp should be set to the current time as it is presently unknown at the time of the request.\</li>\</ul>

```json
{"openapi":"3.0.1","info":{"title":"One API","version":"1.0.0"},"tags":[{"name":"One API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OmniMessageStatusResponse":{"type":"object","properties":{"sms":{"$ref":"#/components/schemas/OmniMessageStatusEntry"},"whatsapp":{"$ref":"#/components/schemas/OmniMessageStatusEntry"}}},"OmniMessageStatusEntry":{"type":"object","properties":{"status":{"type":"string","enum":["UNKNOWN","QUEUED","SCHEDULED","SENT_TO_SUPPLIER","DEVICE_ACK","READ","EXPIRED","STOPPED_BY_USER","STOPPED_BY_ADMIN","DELIVERY_FAILURE","EMULATED","INSUFFICIENT_ACCOUNT_BALANCE","VOLUME_LIMIT","VOLUME_LIMIT_DAILY","VOLUME_LIMIT_MONTHLY","RECIPIENT_DOES_NOT_EXIST","STOP_MARKETING_MESSAGES","EXCESSIVE_MESSAGES_TO_RECIPIENT","ENCRYPTION_ACCESS_DENIED","ENCRYPTION_CONTENT_ERROR","ENCRYPTION_VALIDATION_ERROR","ANONYMOUS_USER_ID_INVALID","ANONYMOUS_USER_ID_ERROR","MEDIA_NOT_FOUND","MEDIA_SIZE_ERROR","MEDIA_CHECKSUM_FAILURE","MEDIA_REJECTED_BY_SUPPLIER","MEDIA_METADATA_ERROR","MEDIA_ACCESS_ERROR","MEDIA_TYPE_NOT_SUPPORTED","ROUTING_ERROR","WHATSAPP_ACCOUNT_PAYMENT_ISSUE","WHATSAPP_RE_ENGAGEMENT_REQUIRED","WHATSAPP_SPAM_RATE_LIMIT_REACHED","WHATSAPP_SERVER_RATE_LIMIT","WHATSAPP_EXPERIMENTAL_NUMBER","WHATSAPP_TEMPLATE_TEXT_TOO_LONG","WHATSAPP_TEMPLATE_FORMAT_MISMATCH","WHATSAPP_TEMPLATE_FORMATTING_POLICY_VIOLATED","WHATSAPP_TEMPLATE_MEDIA_FORMAT_UNSUPPORTED","WHATSAPP_PARAMETER_MISSING","WHATSAPP_PARAMETER_INVALID","WHATSAPP_PARAMETER_NOT_REQUIRED","WHATSAPP_TEMPLATE_INVALID_URL","WHATSAPP_TEMPLATE_INVALID_PHONE_NUMBER","WHATSAPP_TEMPLATE_RECEIVER_NO_BUTTON_SUPPORT","WHATSAPP_TEMPLATE_DOES_NOT_EXIST","WHATSAPP_TEMPLATE_PARAM_COUNT_MISMATCH","WHATSAPP_TEMPLATE_PAUSED","WHATSAPP_TEMPLATE_DISABLED","WHATSAPP_COMPLIANCE_INFO_MISSING","WHATSAPP_PRODUCT_CATALOG_NOT_FOUND","WHATSAPP_PRODUCT_NOT_FOUND_IN_CATALOG","WHATSAPP_PRODUCT_COMPLIANCE_ERROR","WHATSAPP_MESSAGE_UNDELIVERABLE","WHATSAPP_CHOSE_NOT_TO_DELIVER","PAYMENT_COMPLETED","PAYMENT_DECLINED","PAYMENT_FAILED","PAYMENT_INVALID_MERCHANT_SESSION","PAYMENT_INVALID_WEBHOOK_ENDPOINTS"]},"timestamp":{"type":"integer","format":"int64"}}}}},"paths":{"/v1/message/{omniMessageId}":{"get":{"tags":["One API"],"summary":"Query status of a message","description":"<ul><li>Response will contain status information for any channel relevant to the message.</li><li>The timestamp field indicates the time of the last status change.</li><li>If the message is in an unknown state (message not found), the format is different (since there is no channel) and the timestamp should be set to the current time as it is presently unknown at the time of the request.</li></ul>","operationId":"messageStatus","parameters":[{"name":"omniMessageId","in":"path","description":"Omni message id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OmniMessageStatusResponse"}}}},"404":{"description":"Account not found"}}}}}}
```

## Send one or more messages

> Note that on message send responses, there are two possible locations for error information: one for global level (where entire payload is rejected) and one where a message level reject is applicable.\<br> \<br>\<a href="[https://docs.clickatell.com/channels/one-api/one-api-errors-table/">Errors](https://docs.clickatell.com/channels/one-api/one-api-errors-table/">Errors) Table\</a>\<br>\<a href="[https://docs.clickatell.com/channels/one-api/one-api-message-status-table/">Message](https://docs.clickatell.com/channels/one-api/one-api-message-status-table/">Message) Status Table\</a>\<br>\<a href="[https://docs.clickatell.com/channels/one-api/supported-content-types/">Supported](https://docs.clickatell.com/channels/one-api/supported-content-types/">Supported) content types and limitations\</a>

```json
{"openapi":"3.0.1","info":{"title":"One API","version":"1.0.0"},"tags":[{"name":"One API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SendOmniChannelMessagesRequest":{"required":["messages"],"type":"object","properties":{"messages":{"maxItems":100,"minItems":1,"type":"array","description":"An array of one or more messages can be specified","items":{"$ref":"#/components/schemas/OmniMessageRequest"}}},"description":"One api send message request"},"OmniMessageRequest":{"required":["to"],"type":"object","properties":{"channel":{"type":"string","description":"Specifies the channel to be used with the specified message.","enum":["sms","whatsapp"]},"to":{"type":"string","description":"Recipient of the message. For whatsapp and sms channels this is their MSISDN."},"content":{"minLength":1,"type":"string","description":"The string value contains actual message content. <br><b>Character set UTF-8</b><br>WhatsApp Inline Media: base64 encoded media data<br><b>Not required for media by reference message sending</b><br><br><b>Limit</b><ul><li>WhatsApp text: 4096 characters</li><li>WhatsApp media: 1MB (total 20MB payload limit)</li></ul>"},"clientMessageId":{"type":"string","description":"Customer defined message ID for tracking purposes. Returned in callbacks and certain API submission formats."},"scheduledDeliveryTime":{"pattern":"yyyy-MM-ddTHH:mm:ssXXX","type":"string","description":"Ability to schedule messages for later delivery."},"validityPeriod":{"type":"integer","description":"The message will not be processed/queued/retried for a period exceeding the provided validity period. (In minutes)","format":"int32","default":1440},"previewFirstUrl":{"type":"boolean","description":"<b>WhatsApp only</b><br>True or false - will indicate if URL link must display as preview on recipient phone. Only applicable when sending plain text messages."},"location":{"$ref":"#/components/schemas/Location"},"contacts":{"type":"array","description":"<b>WhatsApp only</b><br>Array of the contact object containing parameters for sending a contacts message.<br><b>Note:</b><br> if contact object is presented, minimum requirement is the name parameter + at least one other parameter.","items":{"$ref":"#/components/schemas/WhatsAppContact"}},"media":{"$ref":"#/components/schemas/OmniIntegrationWaMediaRequest"},"template":{"$ref":"#/components/schemas/WhatsAppMessageTemplate"},"listPicker":{"$ref":"#/components/schemas/WhatsAppMessageList"},"button":{"$ref":"#/components/schemas/WhatsAppMessageButton"},"actionUrl":{"$ref":"#/components/schemas/WhatsAppMessageCTAButton"},"locationRequest":{"$ref":"#/components/schemas/WhatsAppMessageLocationRequest"},"from":{"type":"string","description":"<b>Sms only</b><br>The two-way number that will be used for message delivery<br>from - Required Field for Two Way communication in the USA."},"userDataHeader":{"type":"string","description":"<b>Sms only</b><br>UDH content of a message. It does not contain any text, but rather specifies how the message should be processed. Basically, it’s a part of the SMS which tells the receiving handset what type of message being sent."},"binary":{"type":"boolean","description":"<b>Sms only</b><br>Specifies if <i>content</i> delivered by client needs to be in binary format."},"encryptionKey":{"type":"string","description":"<b>Client side encryption ONLY</b><br>Base64 encoded encrypted data key as generated from AWS KMS. Note that MC2 will have to submit additional fields to SMS/WA adapter for client side encryption to work. For client side encrypted media by reference send message requests this field must be populated even if the media <i>caption</i> is null."},"encryptionKeyArn":{"type":"string","description":"<b>Client side encryption ONLY</b><br>Customer defined encryption key ARN."},"encryptionCipher":{"type":"string","description":"<b>Client side encryption ONLY</b><br>Customer defined encryption cipher."}}},"Location":{"required":["latitude","longitude"],"type":"object","properties":{"longitude":{"maximum":180,"minimum":-180,"type":"string","description":"Longitude of the location as a numeric string value."},"latitude":{"maximum":90,"minimum":-90,"type":"string","description":"Longitude of the location as a numeric string value."},"name":{"type":"string","description":"Name of the location."},"address":{"type":"string","description":"Address of the location. The address will only be displayed if the name was set."}},"description":"<b>WhatsApp only</b><br>Object containing parameters for sending a location message."},"WhatsAppContact":{"required":["name"],"type":"object","properties":{"addresses":{"minItems":1,"type":"array","description":"List of address object. See request example WhatsApp Contacts: One message","items":{"type":"object","additionalProperties":{"type":"string"}}},"birthday":{"pattern":"YYYY-MM-DD","type":"string","description":"String date value."},"emails":{"minItems":1,"type":"array","description":"List of the email object. See request example WhatsApp Contacts: One message","items":{"type":"object","additionalProperties":{"type":"string"}}},"name":{"type":"object","additionalProperties":{"type":"string","description":"Name object. See request example WhatsApp Contacts: One message"},"description":"Name object. See request example WhatsApp Contacts: One message"},"org":{"type":"object","additionalProperties":{"type":"string","description":"See request example WhatsApp Contacts: One message"},"description":"See request example WhatsApp Contacts: One message"},"phones":{"minItems":1,"type":"array","description":"List of the phone object. See request example WhatsApp Contacts: One message","items":{"type":"object","additionalProperties":{"type":"string"}}},"urls":{"minItems":1,"type":"array","description":"List of the url object. See request example WhatsApp Contacts: One message","items":{"type":"object","additionalProperties":{"type":"string"}}}}},"OmniIntegrationWaMediaRequest":{"type":"object","properties":{"contentType":{"type":"string","description":"Media type header for file format and file content. This parameter is required when sending a media message.<br><b>Inline required.</b>"},"caption":{"type":"string","description":"This is an optional parameter and may be used to describe the media file being sent. Do not use when sending audio media."},"fileName":{"type":"string","description":"This is an optional parameter and may be used to specify name of a file that is sent to WhatsApp."},"sha256Hash":{"type":"string","description":"SHA256 File hash of the unencrypted file content."},"fileId":{"type":"string","description":"File reference id as returned in the media file upload API call.<br><b>By Reference required.</b>"}},"description":"<b>WhatsApp only</b><br>Object containing parameters for sending a media message."},"WhatsAppMessageTemplate":{"required":["templateName","body"],"type":"object","properties":{"templateName":{"type":"string","description":"Template name which was specified when created."},"language":{"type":"string","description":"Specifies the language the template may be rendered in."},"header":{"$ref":"#/components/schemas/WhatsAppMessageTemplateHeader"},"body":{"$ref":"#/components/schemas/WhatsAppMessageTemplateBody"},"buttons":{"$ref":"#/components/schemas/WhatsAppMessageTemplateButtons"},"templateButtons":{"maxItems":10,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/WhatsAppMixedTemplateButton"},"description":"<li>Suppports a combination of button types in a single WhatsApp message template.</li>  <li>All buttons of the same type must be grouped together, e.g., all “url” buttons, all “suggestedResponse” buttons, etc.</li>  <li><b>Note:</b> If a “phone” or “static URL” button is used in the template, their position (index) requires the “index” parameter of other buttons to be incremented accordingly.</li> <li>See Example: <i>WhatsApp Interactive Text Template with Mixed Buttons.</i></li>\n"}},"description":"<b>WhatsApp only</b><br>Object containing parameters for sending a template message."},"WhatsAppMessageTemplateHeader":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"Indicates the header type of the template.<br><b>Note:</b><i> location</i> header type (location template) only supported for cloud-hosted numbers","enum":["text","media","location"]},"text":{"$ref":"#/components/schemas/WhatsAppTemplateHeaderText"},"media":{"$ref":"#/components/schemas/WhatsAppTemplateHeaderMedia"},"location":{"$ref":"#/components/schemas/WhatsAppTemplateHeaderLocation"}},"description":"Template header."},"WhatsAppTemplateHeaderText":{"type":"object","properties":{"parameters":{"type":"object","additionalProperties":{"type":"string","description":"Key value pairs; key is string numeric value parameter and value set to the parameter value WhatsApp currently only allows for a single parameter value in the header text. <br><b>Only required if the template was created with a variable in the header text</b>"},"description":"Key value pairs; key is string numeric value parameter and value set to the parameter value WhatsApp currently only allows for a single parameter value in the header text. <br><b>Only required if the template was created with a variable in the header text</b>"}},"description":"Required, if type text"},"WhatsAppTemplateHeaderMedia":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","description":"<i>fileId</i> as returned in the api reponse of the media upload request (see <i>Upload Media file for One Api</i>). <br>WhatsApp allows files of type image, video and document."}},"description":"Required, if type media"},"WhatsAppTemplateHeaderLocation":{"required":["address","latitude","longitude","name"],"type":"object","properties":{"longitude":{"maximum":180,"minimum":-180,"type":"string","description":"Longitude of the location as a numeric string value."},"latitude":{"maximum":90,"minimum":-90,"type":"string","description":"Longitude of the location as a numeric string value."},"name":{"type":"string","description":"Name of the location."},"address":{"type":"string","description":"Address of the location. The address will only be displayed if the name was set."}},"description":"<b>Note:</b> <i>location</i> header only supported for cloud numbers. Required, if type location"},"WhatsAppMessageTemplateBody":{"type":"object","properties":{"parameters":{"type":"object","additionalProperties":{"type":"string","description":"Key value pairs; key is string numeric value parameter and value set to the parameter value"},"description":"Key value pairs; key is string numeric value parameter and value set to the parameter value"}},"description":"Body object."},"WhatsAppMessageTemplateButtons":{"type":"object","properties":{"suggestedResponse":{"$ref":"#/components/schemas/WhatsAppTemplateSuggestedResponse"},"websiteUrl":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppTemplateWebsiteUrl"}}},"description":"<b>To be deprecated</b><br><u>Use <i>templateButtons</i> instead</u> <br>Interactive template message buttons. <br><i>buttons</i> parameter supports 1 button type (websiteUrl or suggestedResponse) per send message request."},"WhatsAppTemplateSuggestedResponse":{"required":["postbackData"],"type":"object","properties":{"postbackData":{"maximum":3,"maxProperties":3,"type":"object","additionalProperties":{"maximum":3,"maxProperties":3,"type":"string","description":"<b>Key</b> : String integer value of the button to which the postbackData should be associated<br><b>Value</b> : User defined data that will be returned in the callback function to the business."},"description":"<b>Key</b> : String integer value of the button to which the postbackData should be associated<br><b>Value</b> : User defined data that will be returned in the callback function to the business."}}},"WhatsAppTemplateWebsiteUrl":{"required":["listPosition"],"type":"object","properties":{"listPosition":{"type":"integer","description":"If a template was create with a dial button in the 1st position and the websiteUrl in the 2nd position then the <i>listPosition</i> will be 2.<br>If a template was created with the websiteUrl button in 1st position and the dial button in the 2nd position will be 1.","format":"int32","enum":[1,2]},"parameters":{"maxProperties":1,"type":"object","additionalProperties":{"maxProperties":1,"type":"string","description":" WhatsApp supports parameter value in a dynamic URL."},"description":" WhatsApp supports parameter value in a dynamic URL."}}},"WhatsAppMixedTemplateButton":{"type":"object","anyOf":[{"$ref":"#/components/schemas/WhatsAppMixedTemplateButtonUrl"},{"$ref":"#/components/schemas/WhatsAppMixedTemplateButtonSuggestedResponse"},{"$ref":"#/components/schemas/WhatsAppMixedTemplateButtonCouponCode"},{"$ref":"#/components/schemas/WhatsAppMixedTemplateButtonOtp"}]},"WhatsAppMixedTemplateButtonUrl":{"required":["index","type","url"],"type":"object","properties":{"index":{"type":"integer","format":"int32","description":"Index of button in template in order it was created, starts at 1"},"type":{"type":"string","enum":["url"]},"url":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Enter final part of URL in this field (the first part is already specified in template)."}}}}},"WhatsAppMixedTemplateButtonSuggestedResponse":{"required":["index","type","suggestedResponse"],"type":"object","properties":{"index":{"type":"integer","format":"int32","description":"Index of button in template in order it was created, starts at 1"},"type":{"type":"string","enum":["suggestedResponse"]},"suggestedResponse":{"type":"object","required":["postbackData"],"properties":{"postbackData":{"type":"string","description":"This string will be passed back in response message if user taps this button."}}}}},"WhatsAppMixedTemplateButtonCouponCode":{"required":["index","type","couponCode"],"type":"object","properties":{"index":{"type":"integer","format":"int32","description":"Index of button in template in order it was created, starts at 1"},"type":{"type":"string","enum":["couponCode"]},"couponCode":{"type":"object","required":["code"],"properties":{"code":{"maximum":15,"type":"string","description":"Coupon code value."}}}}},"WhatsAppMixedTemplateButtonOtp":{"required":["index","type","otp"],"type":"object","properties":{"index":{"type":"integer","format":"int32","description":"Index of button in template in order it was created, starts at 1"},"type":{"type":"string","enum":["otp"]},"otp":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"OTP code value for authentication templates."}}}}},"WhatsAppMessageList":{"required":["button","sections","subtitle"],"type":"object","properties":{"sections":{"maxItems":10,"minItems":1,"type":"array","description":"Array of the message objects containing items for sending a list message.","items":{"$ref":"#/components/schemas/WhatsAppMessageListSection"}},"title":{"maximum":60,"type":"string","description":"Title for the list picker message.<br><b>Note:</b> Does not allow markdown"},"subtitle":{"maximum":1024,"type":"string","description":"Subtitle for the list picker message"},"button":{"maximum":20,"type":"string","description":"Button name for the list picker message.<br><b>Note:</b> Does not allow markdown"},"footer":{"maximum":60,"type":"string"}},"description":"<b>WhatsApp only</b><br>Object containing parameter for sending a list message"},"WhatsAppMessageListSection":{"type":"object","properties":{"items":{"maxItems":10,"minItems":1,"type":"array","description":"Array of the section message object containing specific title fields for sending a list message. Max items in total is 10.","items":{"$ref":"#/components/schemas/WhatsAppMessageListSectionItem"}},"title":{"maximum":24,"type":"string","description":"Title of section<br><b>Note:</b> Does not allow markdown.<br>If more than one section is presented, this field is required."}}},"WhatsAppMessageListSectionItem":{"required":["postbackData","title"],"type":"object","properties":{"title":{"maximum":24,"type":"string","description":"Title of item<br><b>Note:</b> Does not allow markdown"},"subtitle":{"maximum":72,"type":"string","description":"Subtitle of item<br><b>Note:</b> Does not allow markdown"},"postbackData":{"maximum":200,"type":"string","description":"Used to identify the item(s) that have been selected.<br><b>Note:</b> Does not support emojis or markdown as it is not a visible field."}}},"WhatsAppMessageButton":{"required":["body","items"],"type":"object","properties":{"body":{"maximum":1024,"type":"string"},"header":{"$ref":"#/components/schemas/WhatsAppInteractiveMessageHeader"},"items":{"maxItems":3,"minItems":1,"type":"array","description":"Array of button item objects containing specific fields for sending a button message.","items":{"$ref":"#/components/schemas/WhatsAppMessageButtonItem"}},"footer":{"maximum":60,"type":"string"}},"description":"<b>WhatsApp only</b><br>Object containing parameter for sending a button message"},"WhatsAppInteractiveMessageHeader":{"required":["type"],"type":"object","properties":{"type":{"type":"string","description":"Indicates the header type<br>","enum":["text","media"]},"text":{"maximum":60,"type":"string","description":"Required, if type text<br><b>Note:</b> Does not allow markdown"},"media":{"$ref":"#/components/schemas/WhatsAppInteractiveMessageMedia"}},"description":"Header content displayed on top of a message."},"WhatsAppInteractiveMessageMedia":{"required":["fileId","type"],"type":"object","properties":{"type":{"type":"string","description":"File type value.","enum":["image","video","document"]},"fileId":{"type":"string","description":"File reference id as returned in the media file upload API call."}},"description":"Required, if type media"},"WhatsAppMessageButtonItem":{"required":["postbackData","title"],"type":"object","properties":{"postbackData":{"maximum":256,"type":"string","description":"Used to identify the item(s) that have been selected.<br><b>Note:</b> The value must be unique across all reply buttons in the message."},"title":{"maximum":20,"type":"string","description":"Title of item group.<br><b>Note:</b> Does not allow markdown"},"type":{"type":"string","description":"This is a reserved field for the case where other option types get added. An example for GBM is a 'open url' action.","enum":["reply"]}}},"WhatsAppMessageCTAButton":{"required":["body","title","url"],"type":"object","properties":{"body":{"maximum":1024,"type":"string"},"header":{"$ref":"#/components/schemas/WhatsAppInteractiveMessageHeader"},"footer":{"maximum":60,"type":"string"},"title":{"maximum":20,"type":"string","description":"Title that will be displayed on the button"},"url":{"maximum":2000,"type":"string","description":"Url for CTA button"}},"description":"<b>WhatsApp only</b><br>Object containing parameter for sending a button message"},"WhatsAppMessageLocationRequest":{"required":["body"],"type":"object","properties":{"body":{"maximum":1024,"type":"string","description":"Whatsapp supports: emojis, markdown, links"}},"description":"<b>WhatsApp only</b> <br>Object for sending a location request message"},"OmniMessageListResponse":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/OmniMessagesResponse"}},"error":{"$ref":"#/components/schemas/OmniResponseError"},"type":{"type":"string","writeOnly":true,"enum":["SUCCESS","MIXED","FAIL"]}}},"OmniMessagesResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/OmniResponseError"},"apiMessageId":{"type":"string","description":"System defined message ID."},"accepted":{"type":"boolean","description":"Indication if the message has passed API validation"},"to":{"type":"string","description":"Recipient of the message."},"clientMessageId":{"type":"string","description":"Customer defined message ID for tracking purposes."}}},"OmniResponseError":{"type":"object","properties":{"code":{"type":"integer","description":"<i>Error Code</i> value in ","format":"int32"},"description":{"type":"string","description":"<i>Error Message</i>"}}}}},"paths":{"/v1/message":{"post":{"tags":["One API"],"summary":"Send one or more messages","description":"Note that on message send responses, there are two possible locations for error information: one for global level (where entire payload is rejected) and one where a message level reject is applicable.<br> <br><a href=\"https://docs.clickatell.com/channels/one-api/one-api-errors-table/\">Errors Table</a><br><a href=\"https://docs.clickatell.com/channels/one-api/one-api-message-status-table/\">Message Status Table</a><br><a href=\"https://docs.clickatell.com/channels/one-api/supported-content-types/\">Supported content types and limitations</a>","operationId":"sendMessages","parameters":[],"requestBody":{"description":"Send message/messages request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOmniChannelMessagesRequest"}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OmniMessageListResponse"}}}},"207":{"description":"Returned on a message when more than one message was submitted, but they have a different status (example: one message was accepted, and one was rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OmniMessageListResponse"}}}},"400":{"description":"Bad Request. Note that the global error object is not used because this is a message-level error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OmniMessageListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{}}},"402":{"description":"Payment Required. User is out of funds/credits/currency/balance"},"404":{"description":"Request was sent to a resource that does not exist"},"503":{"description":"Service Unavailable"}}}}}}
```

## POST /v1/notification

> Send Business Read status notification

```json
{"openapi":"3.0.1","info":{"title":"One API","version":"1.0.0"},"tags":[{"name":"One API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"ReplyStatusNotificationRequest":{"required":["event"],"type":"object","properties":{"event":{"$ref":"#/components/schemas/ReplyStatusEvent"}},"description":"Send Business Read Status notification request"},"ReplyStatusEvent":{"required":["messageStatusUpdate"],"type":"object","properties":{"messageStatusUpdate":{"maxItems":100,"minItems":1,"type":"array","description":"An array of one or more messages can be specified","items":{"$ref":"#/components/schemas/ReplyStatusUpdateNotification"}}},"description":"Business Read Status event request"},"ReplyStatusUpdateNotification":{"required":["messageId","statusCode"],"type":"object","properties":{"channel":{"type":"string","description":"Supplier channel on which the inbound message to which this notification relates was received","default":"whatsapp","enum":["whatsapp"]},"statusCode":{"type":"integer","description":"Business acknowledges that it has read (seen) an inbound message from the user","format":"int32","default":1001,"enum":[1001]},"messageId":{"type":"string","description":"MO message id of the message associated with this status update"},"clientEventId":{"type":"string","description":"Client internal id that the client can use to match the response to the request. This parameter will just be echoed back in the response."}}},"WhatsAppNotificationListResponse":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/NotificationEventResponse"},"error":{"$ref":"#/components/schemas/OmniResponseError"},"type":{"type":"string","writeOnly":true,"enum":["SUCCESS","MIXED","FAIL"]}}},"NotificationEventResponse":{"type":"object","properties":{"messageStatusUpdate":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponse"}}}},"NotificationResponse":{"type":"object","properties":{"apiEventId":{"type":"string"},"accepted":{"type":"boolean"},"messageId":{"type":"string"},"clientEventId":{"type":"string"},"error":{"$ref":"#/components/schemas/OmniResponseError"}}},"OmniResponseError":{"type":"object","properties":{"code":{"type":"integer","description":"<i>Error Code</i> value in ","format":"int32"},"description":{"type":"string","description":"<i>Error Message</i>"}}}}},"paths":{"/v1/notification":{"post":{"tags":["One API"],"summary":"Send Business Read status notification","operationId":"sendBusinessStatusNotification","parameters":[],"requestBody":{"description":"Send business status notification/notifications request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyStatusNotificationRequest"}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNotificationListResponse"}}}},"207":{"description":"Returned on a request when more than one notification was submitted, but they have a different status (example: one notification was accepted, and one was rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNotificationListResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppNotificationListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{}}},"404":{"description":"Request was sent to a resource that does not exist"},"503":{"description":"Service Unavailable"}}}}}}
```

## Get media file metadata

> Response returns metadata of uploaded media

```json
{"openapi":"3.0.1","info":{"title":"One API","version":"1.0.0"},"tags":[{"name":"One API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"MediaFileMetadataResponse":{"type":"object","properties":{"expirationTime":{"type":"integer","format":"int64"},"broadcastAllowed":{"type":"boolean"}}},"OmniMediaUploadResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/OmniResponseError"},"fileId":{"type":"string"},"accepted":{"type":"boolean"}}},"OmniResponseError":{"type":"object","properties":{"code":{"type":"integer","description":"<i>Error Code</i> value in ","format":"int32"},"description":{"type":"string","description":"<i>Error Message</i>"}}}}},"paths":{"/v1/media/{fileId}":{"get":{"tags":["One API"],"summary":"Get media file metadata","description":"Response returns metadata of uploaded media","operationId":"getMetadata","parameters":[{"name":"fileId","in":"path","description":"ID of the file that was returned in media upload request","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaFileMetadataResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OmniMediaUploadResponse"}}}},"404":{"description":"Account/file not found"}}}}}}
```

## Media Download

> \<ul>\<li>Media file will be available for download for 30 days\</li>\<li>The response body will contain:\<ul> \<li>the binary media data if it is not client side encrypted\</li> \<li>the encrypted binary media data if client side encrypted\</li>\</ul>\</li>\<li>The download URL is specified in the moMedia event in the downloadUrl parameter of the files object array\</li>\</ul>

```json
{"openapi":"3.0.1","info":{"title":"One API","version":"1.0.0"},"tags":[{"name":"One API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OmniMediaUploadResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/OmniResponseError"},"fileId":{"type":"string"},"accepted":{"type":"boolean"}}},"OmniResponseError":{"type":"object","properties":{"code":{"type":"integer","description":"<i>Error Code</i> value in ","format":"int32"},"description":{"type":"string","description":"<i>Error Message</i>"}}}}},"paths":{"/v1/media":{"get":{"tags":["One API"],"summary":"Media Download","description":"<ul><li>Media file will be available for download for 30 days</li><li>The response body will contain:<ul> <li>the binary media data if it is not client side encrypted</li> <li>the encrypted binary media data if client side encrypted</li></ul></li><li>The download URL is specified in the moMedia event in the downloadUrl parameter of the files object array</li></ul>","operationId":"downloadFile","parameters":[{"name":"fileId","in":"query","description":"ID of the file that is presented in MO Callbacks","required":true,"schema":{"type":"string"}},{"name":"source","in":"query","description":"If encryption is client, value should be 'client'","schema":{"type":"string","enum":["client"]}},{"name":"sha256Hash","in":"query","description":"Hash of file that is presented in MO Callbacks","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OmniMediaUploadResponse"}}}},"404":{"description":"Account/file not found"}}}}}}
```

## Upload media file for One Api

> \<ul>\<li>Uploaded media file will be available for message sending for 30 days after uploading\</li>\<li>The body must contain the binary media data\</li>\<li>Media size limit is 30MB\</li> \</ul> \<br> \<br>\<a href="[https://docs.clickatell.com/channels/one-api/supported-content-types/">Supported](https://docs.clickatell.com/channels/one-api/supported-content-types/">Supported) content types and limitations\</a>

```json
{"openapi":"3.0.1","info":{"title":"One API","version":"1.0.0"},"tags":[{"name":"One API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OmniMediaUploadResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/OmniResponseError"},"fileId":{"type":"string"},"accepted":{"type":"boolean"}}},"OmniResponseError":{"type":"object","properties":{"code":{"type":"integer","description":"<i>Error Code</i> value in ","format":"int32"},"description":{"type":"string","description":"<i>Error Message</i>"}}}}},"paths":{"/v1/media":{"post":{"tags":["One API"],"summary":"Upload media file for One Api","description":"<ul><li>Uploaded media file will be available for message sending for 30 days after uploading</li><li>The body must contain the binary media data</li><li>Media size limit is 30MB</li> </ul> <br> <br><a href=\"https://docs.clickatell.com/channels/one-api/supported-content-types/\">Supported content types and limitations</a>","operationId":"uploadFile","parameters":[{"name":"to","in":"query","description":"Field that marks this upload file for delivery to a single destination user. Limits message sending to only this number ","schema":{"type":"string"}},{"name":"broadcastAllowed","in":"query","description":"<ul> <li>Field that marks this upload file for delivery to any destination users.</li> <li>Value must be set to true</li> <li>Broadcasts for media and interactive media templates are supported.</li> <li><b>Note:</b> The above is dependent on terms and conditions and best practices as prescribed by Meta.</b></li>","schema":{"type":"boolean"}},{"name":"fileName","in":"query","description":"File name of the file being uploaded","required":true,"schema":{"type":"string"}},{"name":"encryptionKey","in":"query","schema":{"type":"string"}},{"name":"kmsArn","in":"query","schema":{"type":"string"}},{"name":"encryptionCipher","in":"query","schema":{"type":"string"}},{"name":"sha256FileHash","in":"query","schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"Content type of file","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Send message/messages request","content":{"*/*":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OmniMediaUploadResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OmniMediaUploadResponse"}}}},"404":{"description":"Account not found"}}}}}}
```

## GET /v1/balance

> Return information about account balance

```json
{"openapi":"3.0.1","info":{"title":"One API","version":"1.0.0"},"tags":[{"name":"One API"}],"servers":[{"url":"https://platform.clickatell.com"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"MessagingBalanceResponse":{"type":"object","properties":{"balance":{"type":"number"},"currency":{"type":"string"}}}}},"paths":{"/v1/balance":{"get":{"tags":["One API"],"summary":"Return information about account balance","operationId":"accountMessagingBalance","parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagingBalanceResponse"}}}},"404":{"description":"Account not found"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.clickatell.com/developers-api-reference/reference/one-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
