{"components":{"responses":{},"schemas":{"BalanceResponse":{"description":"A response to a balance request containing the balance of an account","example":{"balance":1.0e4},"properties":{"balance":{"description":"The number of credits the account has","format":"double","type":"number"}},"required":["balance"],"title":"BalanceResponse","type":"object"},"CostLineItemDto":{"description":"The cost incurred for one mobile network within a send","properties":{"cost":{"description":"The cost in credits billed for this network, excluding any VAT, GST or tax","format":"double","type":"number"},"network":{"description":"The name of the mobile network the messages were routed to","type":"string"},"quantity":{"description":"The number of SMS parts billed for this network","format":"int64","type":"integer"}},"required":["quantity","cost","network"],"title":"CostLineItemDto","type":"object"},"FaultReportDto":{"description":"A summary of the messages in the send request that could not be enqueued","properties":{"contentToLong":{"description":"The number of messages whose content exceeded the maximum length of 459 characters","format":"int32","type":"integer"},"duplicates":{"description":"The number of messages that duplicated another message in the same send request","format":"int32","type":"integer"},"faults":{"description":"The individual messages that could not be enqueued","items":{"$ref":"#/components/schemas/MessageFaultDto"},"type":"array"},"noContents":{"description":"The number of messages that had no text content","format":"int32","type":"integer"},"noNetwork":{"description":"The number of messages whose destination address had no network route","format":"int32","type":"integer"},"optedOuts":{"description":"The number of messages addressed to subscribers who have opted out","format":"int32","type":"integer"}},"required":["noNetwork","noContents","contentToLong","duplicates","optedOuts","faults"],"title":"FaultReportDto","type":"object"},"LandingPageVariablesDto":{"description":"Variables related to the generation of a landing page version associated with a specific SMS message, and landing page.","properties":{"landingPageId":{"description":"The API Id of the landing page.","type":"string"},"password":{"description":"The authentication password for the landing page. If not provided (Empty or Null) then the landing page will not require authentication.","type":"string"},"variables":{"additionalProperties":true,"description":"The values of the variables defined in the landing page version.","type":"object"},"version":{"description":"The version of the landing page to use. If not provided then the configured default (active) version is used.","format":"int32","type":"integer"}},"required":["landingPageId"],"title":"LandingPageVariablesDto","type":"object"},"MessageDto":{"description":"A single SMS message within a send request","example":{"content":"Hello","customerId":"order-1","destination":"0821234567"},"properties":{"content":{"description":"The text content of the SMS message","type":"string"},"customerId":{"description":"A user defined ID which can be used to correlate messages sent to the API and receipts or replies received for that message. Maximum length 100 characters","maxLength":100,"type":"string"},"destination":{"description":"The MSISDN (mobile number) to whom the message is intended","type":"string"},"landingPageVariables":{"allOf":[{"$ref":"#/components/schemas/LandingPageVariablesDto"}],"description":"The landing page to generate and link for this specific message."}},"required":["destination"],"title":"MessageDto","type":"object"},"MessageFaultDto":{"description":"A single message from the send request that could not be enqueued","properties":{"customerId":{"description":"The customer ID supplied with the message, if any","nullable":true,"type":"string"},"errorMessage":{"description":"A human readable explanation of why the message was not enqueued","type":"string"},"rawDestination":{"description":"The destination address exactly as it was supplied in the request","type":"string"},"scrubbedDestination":{"description":"The destination address after normalisation into international format. Empty when the address could not be normalised","type":"string"},"status":{"description":"The error code classifying the fault","enum":["DestinationAddress.Invalid","DestinationAddress.NoNetworkFound","DestinationAddress.Optout","DuplicateMessage","NoContent","ContentToLong"],"type":"string"}},"required":["rawDestination","scrubbedDestination","customerId","errorMessage","status"],"title":"MessageFaultDto","type":"object"},"Response":{"description":"Errors associated with the send attempt","example":{"errors":[{"errorCode":"InvalidCredentials","errorMessage":"The given credentials are invalid."}],"sendResponse":null,"statusCode":401},"properties":{"errors":{"description":"A collection of general send wide Errors.","items":{"$ref":"#/components/schemas/SendingError"},"nullable":true,"type":"array"},"sendResponse":{"allOf":[{"$ref":"#/components/schemas/SendResponse"}],"description":"The result of the send. Null when the request failed before any message could be enqueued.","nullable":true},"statusCode":{"description":"StatusCode of the send attempt.","format":"int32","type":"integer"}},"required":["statusCode","sendResponse","errors"],"title":"Response","type":"object"},"SendOptionsDto":{"description":"Options that apply to every message in the send request","properties":{"allowContentTrimming":{"default":true,"description":"Whether or not the message should have leading and trailing whitespace removed before processing.","type":"boolean"},"campaignName":{"description":"A user defined value for the name of the campaign associated with this send. Only used by the system for reporting purposes. Maximum value is 100 characters","maxLength":100,"type":"string"},"checkOptOuts":{"default":true,"description":"True if SMS messages should not be sent to mobile subscribers that have opted-out as a result of a previous send; otherwise false. Note: Opt-outs can take up to 15 minutes to propagate throughout our entire system.","type":"boolean"},"costCentre":{"description":"A user defined value for the name of the cost center associated with this send. Only used by the system for reporting purposes. Maximum value is 100 characters","maxLength":100,"type":"string"},"endDeliveryUtc":{"description":"This value should be set in UTC if delivery should be staggered over a period of time. Leave null if all messages should be sent as soon as possible. Value, if set, must be greater than StartDeliveryUtc and should be formatted according to ISO 8601 UTC format (yyyy-mm-ddThh:mm[:ss][Z])","format":"date-time","type":"string"},"replyRuleSetName":{"description":"The name of the reply rule set that should be used for the send. Replies that are received as a result of the send are then subject to rules configured in the reply rule set governing auto forwards and auto responses","type":"string"},"senderId":{"description":"The sender ID (source address) to use when sending the messages specified. Maximum length is 11 characters, and only letters, digits, spaces, dots, hyphens and underscores are accepted. Please note that a best effort is made to use the value specified, but availability is determined by the route and ultimately by the mobile network operator. A route with no field for a sender ID ignores this value.","maxLength":11,"pattern":"^[A-Za-z0-9 ._-]+$","type":"string"},"shortenUrls":{"default":false,"description":"True if this send should try shorten and track urls otherwise false.","type":"boolean"},"startDeliveryUtc":{"description":"The date and time in UTC when the messages should be sent. Maximum date and time allowed is 3 months from the current date and time. Value should be formatted according to ISO 8601 UTC format (yyyy-mm-ddThh:mm[:ss][Z])","format":"date-time","type":"string"},"testMode":{"default":false,"description":"Should the messages be sent or is this a test of the API? If TestMode = true then it will return the result but won't send the data, and won't appear in any sent report.","type":"boolean"},"validityPeriod":{"description":"The amount of time in hours an SMS should remain valid. The network will continue to try to deliver the SMS over the validity period.","format":"int32","type":"integer"}},"title":"SendOptionsDto","type":"object"},"SendRequest":{"description":"A request to send a batch of SMS messages","example":{"messages":[{"content":"Hello","destination":"0821234567"}],"sendOptions":{"senderId":"MyBrand","testMode":true}},"properties":{"messages":{"description":"The SMS message(s) that should be send. Must contain at least one message and at most 500 messages","items":{"$ref":"#/components/schemas/MessageDto"},"maxItems":500,"minItems":1,"type":"array"},"sendOptions":{"allOf":[{"$ref":"#/components/schemas/SendOptionsDto"}],"description":"Configuration options applied to every message in the request."}},"required":["messages"],"title":"SendRequest","type":"object"},"SendResponse":{"description":"A response to a send request or a group send request","properties":{"cost":{"description":"The total cost of the send excluding any VAT, GST or tax","format":"double","type":"number"},"costBreakdown":{"description":"The break down of the costs for the send grouped by mobile network and feature","items":{"$ref":"#/components/schemas/CostLineItemDto"},"type":"array"},"errorReport":{"allOf":[{"$ref":"#/components/schemas/FaultReportDto"}],"description":"The messages from the request that could not be enqueued for delivery."},"eventId":{"description":"The system generated ID for this send or batch of messages","format":"int64","type":"integer"},"messages":{"description":"The total number of messages that were successfully enqueued for delivery. Long messages may require multiple SMS messages or parts to send a message and this is reflected in the Parts value","format":"int32","type":"integer"},"parts":{"description":"The total number of SMS messages that were successfully enqueued for delivery.","format":"int32","type":"integer"},"remainingBalance":{"description":"The remaining balance after the Cost has been deducted for the send","format":"double","type":"number"},"sample":{"description":"A sample message that was generated for the send. Purely informational","type":"string"}},"required":["cost","remainingBalance","eventId","sample","costBreakdown","messages","parts","errorReport"],"title":"SendResponse","type":"object"},"SendingError":{"description":"Errors associated with the send attempt","properties":{"errorCode":{"description":"Associated ErrorCode","enum":["InvalidParameter.Format","InvalidParameter.Type","EntityNotFound.Group","EntityNotFound","RequiredParameter.Missing","AuthenticationToken.Invalid","AuthenticationToken.Expired","InvalidCredentials","AuthenticationHeader.Missing","AuthenticationHeader.Invalid","InsufficientCredits","IncorrectScheduledDate","DestinationAddress.NoNetworkFound","DestinationAddress.Invalid","DestinationAddress.Optout","DuplicateMessage","EntityNotFound.ReplyRule","EmptySend.NoValidMessages","InternalServerError"],"type":"string"},"errorMessage":{"description":"Error message","type":"string"}},"required":["errorMessage","errorCode"],"title":"SendingError","type":"object"},"TokenDto":{"description":"Contains an authentication token which provides access to various API functions","example":{"expiresInMinutes":1440,"schema":"Bearer","token":"SFMyNTY.g2gDbQAAAA50ZXN0LWNsaWVudC1pZG4GAA"},"properties":{"expiresInMinutes":{"description":"The number of minutes after which the authentication token will expire","example":1440,"format":"int32","type":"integer"},"schema":{"description":"The schema of the authentication token","example":"Bearer","type":"string"},"token":{"description":"A string representation of the authentication token. Calls to API functions that require a token should use this value","type":"string"}},"required":["token","schema","expiresInMinutes"],"title":"TokenDto","type":"object"}},"securitySchemes":{"basicAuth":{"description":"Base64 encoded `ClientId:ApiSecret` supplied in the `Authorization` header.","scheme":"basic","type":"http"},"bearerAuth":{"description":"A token obtained from `/Authentication`, valid for 24 hours.","scheme":"bearer","type":"http"}}},"info":{"description":"The SimplifyMessaging REST API for sending SMS messages in bulk.\n\nThe API authenticates HTTP requests using either the BASIC authorization header\n(`Basic base64(ClientId:ApiSecret)`) or a bearer token generated from those credentials\nvia the `/Authentication` endpoints. Tokens remain valid for 24 hours.\n\nAll endpoints accept and return JSON.\n","title":"SimplifyMessaging REST V3","version":"v3"},"openapi":"3.0.0","paths":{"/Authentication":{"get":{"callbacks":{},"description":"Exchanges the BASIC authorization header for a bearer token valid for 24 hours (1440 minutes).\n\nRequires BASIC credentials: a bearer token cannot be used to mint another token.\n","operationId":"Authentication_Get","parameters":[{"description":"Basic Base64 encoded Authorization Header with your Client Id and Secret","example":"Basic Y2xpZW50LWlkOmFwaS1zZWNyZXQ=","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenDto"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Bad Request. There was an error with the request. The body of the response will have more info."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Unauthorized. Authentication or token is invalid. If your API key is wrong a 401 will be generated."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Service Unavailable"}},"security":[{"basicAuth":[]}],"summary":"Generate an authentication token based on the BASIC authorization header.","tags":["Authentication"]},"post":{"callbacks":{},"description":"Exchanges the BASIC authorization header for a bearer token valid for 24 hours (1440 minutes).\n\nRequires BASIC credentials: a bearer token cannot be used to mint another token.\n","operationId":"Authentication_Post","parameters":[{"description":"Basic Base64 encoded Authorization Header with your Client Id and Secret","example":"Basic Y2xpZW50LWlkOmFwaS1zZWNyZXQ=","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenDto"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Bad Request. There was an error with the request. The body of the response will have more info."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Unauthorized. Authentication or token is invalid. If your API key is wrong a 401 will be generated."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Service Unavailable"}},"security":[{"basicAuth":[]}],"summary":"Generate an authentication token based on the BASIC authorization header.","tags":["Authentication"]}},"/v3/Balance":{"get":{"callbacks":{},"description":"Returns the number of credits currently available to the authenticated account.","operationId":"Balance_Get","parameters":[{"description":"Authorization Header with your basic base64 encoded credentials or generated token","example":"Bearer eyJhbGciOiJIUzI1NiJ9...","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Bad Request. There was an error with the request. The body of the response will have more info."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Unauthorized. Authentication or token is invalid. If your API key is wrong a 401 will be generated."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Service Unavailable"}},"summary":"Retrieve the balance for an account","tags":["Balance"]}},"/v3/BulkMessages":{"post":{"callbacks":{},"description":"Enqueues a batch of between 1 and 500 SMS messages for delivery.\n\nEach message is scrubbed and checked for deliverability independently. Messages that\ncannot be sent (invalid or unroutable destination, empty content, over-long content,\nduplicate, or opted-out recipient) are reported in `sendResponse.errorReport` and are not\nbilled; the remaining messages are still enqueued. If no message in the batch is valid the\nrequest fails with `EmptySend.NoValidMessages`.\n\nA malformed field is not a fault of that kind and is not reported per message: a `content`\nor `customerId` of the wrong JSON type, or a `customerId` over 100 characters, fails the\nwhole request with `400` before anything is sent or billed.\n\nBilling follows the documented SMS length rules: a message of 160 characters or fewer\ncosts one part, and a longer message costs `ceil(length / 153)` parts, where\nextension-table characters (`^ { } \\ [ ~ ] | €`) count as two characters. Content longer\nthan 459 characters is rejected as `ContentToLong`.\n","operationId":"BulkMessages_PostV3","parameters":[{"description":"Authorization Header with your basic base64 encoded credentials or generated token","example":"Bearer eyJhbGciOiJIUzI1NiJ9...","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}},"description":"The send request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Bad Request. There was an error with the request. The body of the response will have more info."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Unauthorized. Authentication or token is invalid. If your API key is wrong a 401 will be generated."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Forbidden. Request contains valid data but is being refused. Typically returned if your API key or account is deactivated or has insufficient credits."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}},"description":"Service Unavailable"}},"summary":"Send one or more messages","tags":["BulkMessages"]}}},"security":[{"basicAuth":[]},{"bearerAuth":[]}],"servers":[{"url":"https://messaging.flickswitch.cloud","variables":{}}],"tags":[{"description":"Exchange API credentials for a short-lived bearer token.","name":"Authentication"},{"description":"Send one or more SMS messages in a single batch.","name":"BulkMessages"},{"description":"Query the credit balance of an account.","name":"Balance"}]}