openapi: 3.2.0 info: title: SAP Emarsys SMS Partner Service Outbound Message Sending API description: 'An SAP Emarsys SMS Partner Service allows partners to host SMS message sends that are triggered by an SAP Emarsys SMS campaign launch. This OpenAPI specification describes the required Partner service endpoints. ' version: 0.0.1 contact: name: SAP Emarsys SMS Team email: team-sms@emarsys.com servers: - url: https://api.sms-partner.io/sms/partner/v1 security: - oAuthAuthorization: [] tags: - name: Outbound Message Sending paths: /clients/{clientId}/messages: parameters: - $ref: ./common.yaml#/components/parameters/clientIdPathParam post: tags: - Outbound Message Sending operationId: sendMessages summary: Send SMS messages to the Partner API requestBody: description: Messages to be sent required: true content: application/json: schema: $ref: '#/components/schemas/OutboundMessageBatch' responses: '202': $ref: ./common.yaml#/components/responses/AcceptedResponse '400': description: "Returns error type and error context globally, for all messages, or per message. \n\nUse the OutboundMessageBatchGlobalError schema if there is an issue with the payload as a whole, and use the OutboundMessageBatchMessageSpecificError response schema if any of the messages are invalid.\n\nNo messages should be sent or processed if the payload is invalid in any way, even if there are some valid messages among the invalid ones.\n\nUpon recieving a OutboundMessageBatchMessageSpecificError response, the Emarsys SMS Service will treat all of the messages with errors as failed and will retry any messages that did not have errors.\n" content: application/json: schema: $ref: '#/components/schemas/OutboundMessageBatchError' '401': $ref: ./common.yaml#/components/responses/AuthenticationFailedResponse '403': $ref: ./common.yaml#/components/responses/AuthorizationFailedResponse '404': $ref: ./common.yaml#/components/responses/ClientDoesNotExistResponse '429': $ref: ./common.yaml#/components/responses/TooManyRequestsResponse 5XX: $ref: ./common.yaml#/components/responses/ServerErrorResponse components: schemas: OutboundMessageBatch: type: object properties: messages: type: array items: $ref: '#/components/schemas/OutboundMessage' minItems: 1 maxItems: 1000 required: - messages OutboundMessageError: type: object properties: errorType: type: string enum: - emarsys - client - partner - provider - unknown example: partner description: '| Value | Description | |---|---| | emarsys | There was a a problem with the message send payload | | client | There was a problem with the client setup | | partner | There was a problem at the partner | | provider | There was a problem at the provider | | unknown | There was an unknown problem | ' errorContext: type: object description: whatever seems to be useful isErrorTransient: type: boolean example: false required: - errorType - isErrorTransient OutboundMessageBatchGlobalError: type: object properties: globalError: allOf: - $ref: '#/components/schemas/OutboundMessageError' - type: object OutboundMessageBatchMessageSpecificError: type: object properties: messageSpecificErrors: type: array items: allOf: - $ref: '#/components/schemas/OutboundMessageError' - $ref: ./common.yaml#/components/schemas/EmarsysMessageId OutboundMessage: allOf: - $ref: ./common.yaml#/components/schemas/Message - $ref: ./common.yaml#/components/schemas/EmarsysMessageId OutboundMessageBatchError: oneOf: - $ref: '#/components/schemas/OutboundMessageBatchGlobalError' - $ref: '#/components/schemas/OutboundMessageBatchMessageSpecificError' securitySchemes: oAuthAuthorization: type: oauth2 description: OAuth client credentials grant type authorization flows: clientCredentials: tokenUrl: https://smsemarsys.accounts.ondemand.com/oauth2/token scopes: {} x-sap-shortText: Configure, test client setup and sends SMS messages.