{ "swagger": "2.0", "info": { "title": "Azure Communication SMS Service", "description": "Azure Communication SMS Service", "contact": { "email": "acsdevexdisc@microsoft.com" }, "version": "2020-07-20-preview1" }, "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/sms": { "post": { "tags": [ "Sms" ], "summary": "Sends a SMS message from a phone number that belongs to the authenticated account.", "operationId": "Sms_Send", "x-ms-examples": { "SuccessfulSend": { "$ref": "./examples/send.json" } }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "body", "name": "SendMessageRequest", "description": "Represents the body of the send message request.", "required": true, "schema": { "$ref": "#/definitions/SendMessageRequest" } }, { "name": "api-version", "in": "query", "description": "Version of API to invoke.", "required": true, "type": "string" } ], "responses": { "200": { "description": "SMS message is successfully scheduled for sending.", "schema": { "$ref": "#/definitions/SendSmsResponse" } } } } } }, "definitions": { "SendSmsOptions": { "description": "Optional configuration for sending SMS messages", "type": "object", "properties": { "enableDeliveryReport": { "description": "Enable this flag to receive a delivery report for this message on the Azure Resource EventGrid", "type": "boolean" } } }, "SendMessageRequest": { "description": "Represents the properties of a send message request.", "required": [ "message", "to", "from" ], "type": "object", "properties": { "from": { "description": "The sender's phone number in E.164 format that is owned by the authenticated account.", "type": "string" }, "to": { "description": "The recipients' phone number in E.164 format. In this version, only one recipient in the list is supported.", "maxLength": 1, "minLength": 1, "type": "array", "items": { "type": "string" } }, "message": { "description": "The contents of the message that will be sent to the recipient. The allowable content is defined by RFC 5724.", "maxLength": 2048, "minLength": 0, "type": "string" }, "sendSmsOptions": { "$ref": "#/definitions/SendSmsOptions" } } }, "SendSmsResponse": { "description": "Response for a successful send Sms request.", "type": "object", "properties": { "messageId": { "description": "The identifier of the outgoing SMS message", "type": "string" } } } }, "parameters": { "Endpoint": { "in": "path", "name": "endpoint", "description": "The endpoint of the Azure Communication resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true, "x-ms-parameter-location": "client" } }, "x-ms-parameterized-host": { "hostTemplate": "{endpoint}", "useSchemePrefix": false, "parameters": [ { "$ref": "#/parameters/Endpoint" } ] } }