{ "swagger": "2.0", "info": { "title": "Marketing Cloud REST API", "description": "Marketing Cloud's REST API is our newest API. It supports multi-channel use cases, is much more lightweight and easy to use than our SOAP API, and is getting more comprehensive with every release.", "version": "1.0.0", "contact": { "name": "MC SDK Team", "email": "mc_sdk@salesforce.com" }, "license": { "name": "BSD-3-Clause", "url": "https://opensource.org/licenses/BSD-3-Clause" } }, "host": "www.exacttargetapis.com", "paths": { "/asset/v1/content/assets/{id}": { "get": { "tags": [ "asset" ], "summary": "getAssetById", "description": "Gets an asset by ID.", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the asset", "required": true, "type": "number" } ], "responses": { "200": { "description": "A single asset", "schema": { "$ref": "#/definitions/Asset" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getAssetById" }, "patch": { "tags": [ "asset" ], "summary": "partiallyUpdateAssetById", "description": "Updates part of an asset.", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the asset to update", "required": true, "type": "number" }, { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/Asset" } } ], "responses": { "200": { "description": "A single asset", "schema": { "$ref": "#/definitions/Asset" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "partiallyUpdateAssetById" }, "delete": { "tags": [ "asset" ], "summary": "deleteAssetById", "description": "Deletes an asset.", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the asset to delete", "required": true, "type": "number" } ], "responses": { "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "deleteAssetById" } }, "/asset/v1/content/assets": { "post": { "tags": [ "asset" ], "summary": "createAsset", "description": "Creates a new asset.", "parameters": [ { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/Asset" } } ], "responses": { "200": { "description": "A single asset", "schema": { "$ref": "#/definitions/Asset" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "createAsset" } }, "/hub/v1/campaigns": { "post": { "tags": [ "campaign" ], "summary": "createCampaign", "description": "Creates a campaign.", "parameters": [ { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/Campaign" } } ], "responses": { "200": { "description": "A single campaign", "schema": { "$ref": "#/definitions/Campaign" } } }, "operationId": "createCampaign" } }, "/hub/v1/campaigns/{id}": { "get": { "tags": [ "campaign" ], "summary": "getCampaignById", "description": "Retrieves a campaign.", "parameters": [ { "name": "id", "in": "path", "description": "Campaign ID", "required": true, "type": "string" } ], "responses": { "200": { "description": "A single campaign", "schema": { "$ref": "#/definitions/Campaign" } } }, "operationId": "getCampaignById" }, "delete": { "tags": [ "campaign" ], "summary": "deleteCampaignById", "description": "Deletes a campaign.", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the campaign to delete", "required": true, "type": "string" } ], "responses": { "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "deleteCampaignById" } }, "/messaging/v1/email/definitions/": { "post": { "tags": [ "transactionalMessaging" ], "summary": "createEmailDefinition", "description": "Creates the definition for an email.", "parameters": [ { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/EmailDefinition" } } ], "responses": { "201": { "description": "A single definition for an email", "schema": { "$ref": "#/definitions/EmailDefinition" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "createEmailDefinition" }, "get": { "tags": [ "transactionalMessaging" ], "summary": "getEmailDefinitions", "description": "Gets a list of email definitions.", "parameters": [ { "name": "$filter", "in": "query", "description": "Filter by status type. Accepted values are active, inactive, or deleted. Valid operations are eq and neq.", "required": false, "type": "string", "enum": [ "active", "inactive", "deleted" ] }, { "name": "$pageSize", "in": "query", "description": "Number of definitions, which are array elements, to return per paged response.", "required": false, "type": "number" }, { "name": "$page", "in": "query", "description": "Page number to return.", "required": false, "type": "number" }, { "name": "$orderBy", "in": "query", "description": "Sort by a dimension. You can sort by only one dimension. Accepted values are definitionKey, name, createdDate, modifiedDate, and status.", "required": false, "type": "string", "enum": [ "definitionKey", "name", "createdDate", "modifiedDate", "status" ] } ], "responses": { "200": { "description": "Email definitions successfully retrieved", "schema": { "$ref": "#/definitions/GetEmailDefinitionsResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getEmailDefinitions" } }, "/messaging/v1/email/definitions/{definitionKey}": { "delete": { "tags": [ "transactionalMessaging" ], "summary": "deleteEmailDefinition", "description": "Deletes an email definition. You can't restore a deleted definition. The deleted definition is archived, and a delete location of the definition key is provided in the response for reference. You can reuse a deleted definition key because the information associated with it is copied to a new unique identifier.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the definition to delete", "required": true, "type": "string" } ], "responses": { "200": { "description": "Definition of email successfully deleted", "schema": { "$ref": "#/definitions/DeleteSendDefinitionResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "deleteEmailDefinition" }, "patch": { "tags": [ "transactionalMessaging" ], "summary": "partiallyUpdateEmailDefinition", "description": "Updates a specific email definition.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the definition.", "required": true, "type": "string" }, { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/UpdateEmailDefinitionRequest" } } ], "responses": { "200": { "description": "A single definition for an email", "schema": { "$ref": "#/definitions/EmailDefinition" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "partiallyUpdateEmailDefinition" }, "get": { "tags": [ "transactionalMessaging" ], "summary": "getEmailDefinition", "description": "Gets email definition configuration details for a definition key.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the definition to get", "required": true, "type": "string" } ], "responses": { "200": { "description": "Definition of email successfully retrieved", "schema": { "$ref": "#/definitions/EmailDefinition" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getEmailDefinition" } }, "/messaging/v1/email/definitions/{definitionKey}/queue": { "get": { "tags": [ "transactionalMessaging" ], "summary": "getQueueMetricsForEmailDefinition", "description": "Gets metrics for the messages of an email definition. Applies to messages that are accepted but not yet processed.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the email definition", "required": true, "type": "string" } ], "responses": { "200": { "description": "Metrics for the messages of an email definition", "schema": { "$ref": "#/definitions/GetQueueMetricsForSendDefinitionResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getQueueMetricsForEmailDefinition" }, "delete": { "tags": [ "transactionalMessaging" ], "summary": "deleteQueuedMessagesForEmailDefinition", "description": "Deletes the queue for an email definition. The email definition must be in inactive status.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the email definition", "required": true, "type": "string" } ], "responses": { "200": { "description": "Queue for email defintion successfully deleted", "schema": { "$ref": "#/definitions/DeleteQueuedMessagesForSendDefinitionResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "deleteQueuedMessagesForEmailDefinition" } }, "/messaging/v1/email/messages/": { "post": { "tags": [ "transactionalMessaging" ], "summary": "sendEmailToMultipleRecipients", "description": "Sends a message to multiple recipients using an email definition. You can provide a messageKey in the request; otherwise, the messageKey is automatically generated in the response.", "parameters": [ { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/SendEmailToMultipleRecipientsRequest" } } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/SendDefinitionToMultipleRecipientsResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "sendEmailToMultipleRecipients" }, "get": { "tags": [ "transactionalMessaging" ], "summary": "getEmailsNotSentToRecipients", "description": "Gets a paginated list of messages that were not sent, ordered from oldest to newest.", "parameters": [ { "name": "type", "in": "query", "description": "Only notSent is supported.", "required": true, "type": "string" }, { "name": "$pageSize", "in": "query", "description": "Number of messageKeys (array elements) to return per response page.", "required": false, "type": "integer" }, { "name": "lastEventId", "in": "query", "description": "Event ID from which you want the response to start. To obtain the initial event ID, submit a request without a lastEventId. The events in the response are listed top to bottom from oldest to newest.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/GetDefinitionsNotSentToRecipientsResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getEmailsNotSentToRecipients" } }, "/messaging/v1/email/messages/{messageKey}": { "get": { "tags": [ "transactionalMessaging" ], "summary": "getEmailSendStatusForRecipient", "description": "Gets the send status for a message. Because this route is rate-limited, use it for infrequent verification of a messageKey. To collect send status at scale, subscribe to transactional send events using the Event Notification Service.", "parameters": [ { "name": "messageKey", "in": "path", "description": "Unique identifier to track message send status. You must provide it in singleton requests using the recipient attribute. To provide it in batch requests, use the recipients array attribute. If you don’t provide the message key for recipients, it’s generated in the response.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Email send status for recipient succesfully retrieved.", "schema": { "$ref": "#/definitions/GetDefinitionSendStatusForRecipientResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getEmailSendStatusForRecipient" }, "post": { "tags": [ "transactionalMessaging" ], "summary": "sendEmailToSingleRecipient", "description": "Sends a message to a single recipient via an email definition using a messageKey path parameter.", "parameters": [ { "name": "messageKey", "in": "path", "description": "Unique identifier used to track message status. Can be automatically created when you create a message or provided as part of the request. Each recipient in a request must have a unique messageKey. If you use a duplicate messageKey in the same send request, the message is rejected.", "required": true, "type": "string" }, { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/SendEmailToSingleRecipientRequest" } } ], "responses": { "202": { "description": "", "schema": { "$ref": "#/definitions/SendDefinitionToSingleRecipientResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "sendEmailToSingleRecipient" } }, "/messaging/v1/sms/definitions/{definitionKey}": { "get": { "tags": [ "transactionalMessaging" ], "summary": "getSmsDefinition", "description": "Gets SMS definition configuration details for a definition key.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the definition to get", "required": true, "type": "string" } ], "responses": { "200": { "description": "Definition of SMS successfully retrieved", "schema": { "$ref": "#/definitions/SmsDefinition" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getSmsDefinition" }, "patch": { "tags": [ "transactionalMessaging" ], "summary": "partiallyUpdateSmsDefinition", "description": "Updates a specific SMS definition.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the definition.", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "description": "JSON Parameters", "schema": { "$ref": "#/definitions/UpdateSmsDefinitionRequest" } } ], "responses": { "200": { "description": "A single definition for an SMS", "schema": { "$ref": "#/definitions/SmsDefinition" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "partiallyUpdateSmsDefinition" }, "delete": { "tags": [ "transactionalMessaging" ], "summary": "deleteSmsDefinition", "description": "Deletes an sms definition. You can't restore a deleted definition. The deleted definition is archived, and a delete location of the definition key is provided in the response for reference. You can reuse a deleted definition key because the information associated with it is copied to a new unique identifier.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the definition to delete", "required": true, "type": "string" } ], "responses": { "200": { "description": "Definition of SMS successfully deleted", "schema": { "$ref": "#/definitions/DeleteSendDefinitionResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "404": { "description": "Not found", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "deleteSmsDefinition" } }, "/messaging/v1/sms/definitions": { "post": { "tags": [ "transactionalMessaging" ], "summary": "createSmsDefinition", "description": "Creates the definition for an SMS.", "parameters": [ { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/SmsDefinition" } } ], "responses": { "201": { "description": "A single definition for an sms", "schema": { "$ref": "#/definitions/SmsDefinition" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "createSmsDefinition" }, "get": { "tags": [ "transactionalMessaging" ], "summary": "getSmsDefinitions", "description": "Gets a list of SMS definitions.", "parameters": [ { "name": "$filter", "in": "query", "description": "Filter by status type. Accepted values are active, inactive, or deleted. Valid operations are eq and neq.", "required": false, "type": "string", "enum": [ "active", "inactive", "deleted" ] }, { "name": "$pageSize", "in": "query", "description": "Number of definitions, which are array elements, to return per paged response.", "required": false, "type": "number" }, { "name": "$page", "in": "query", "description": "Page number to return.", "required": false, "type": "number" }, { "name": "$orderBy", "in": "query", "description": "Sort by a dimension. You can sort by only one dimension. Accepted values are definitionKey, name, createdDate, modifiedDate, and status.", "required": false, "type": "string", "enum": [ "definitionKey", "name", "createdDate", "modifiedDate", "status" ] } ], "responses": { "200": { "description": "SMS definitions successfully retrieved", "schema": { "$ref": "#/definitions/GetSmsDefinitionsResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getSmsDefinitions" } }, "/messaging/v1/sms/definitions/{definitionKey}/queue": { "get": { "tags": [ "transactionalMessaging" ], "summary": "getQueueMetricsForSmsDefinition", "description": "Gets metrics for the messages of a SMS definition. Applies to messages that are accepted but not yet processed.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the SMS definition", "required": true, "type": "string" } ], "responses": { "200": { "description": "Metrics for the messages of an SMS definition", "schema": { "$ref": "#/definitions/GetQueueMetricsForSendDefinitionResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getQueueMetricsForSmsDefinition" }, "delete": { "tags": [ "transactionalMessaging" ], "summary": "deleteQueuedMessagesForSmsDefinition", "description": "Deletes the queue for a SMS definition. The SMS definition must be in inactive status.", "parameters": [ { "name": "definitionKey", "in": "path", "description": "Unique identifier of the SMS definition", "required": true, "type": "string" } ], "responses": { "200": { "description": "Queue for SMS defintion successfully deleted", "schema": { "$ref": "#/definitions/DeleteQueuedMessagesForSendDefinitionResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "deleteQueuedMessagesForSmsDefinition" } }, "/messaging/v1/sms/messages/": { "post": { "tags": [ "transactionalMessaging" ], "summary": "sendSmsToMultipleRecipients", "description": "Sends a message to multiple recipients using an email definition. You can provide a messageKey in the request; otherwise, the messageKey is automatically generated in the response.", "parameters": [ { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/SendSmsToMultipleRecipientsRequest" } } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/SendDefinitionToMultipleRecipientsResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "sendSmsToMultipleRecipients" }, "get": { "tags": [ "transactionalMessaging" ], "summary": "getSMSsNotSentToRecipients", "description": "Gets a paginated list of messages that were not sent, ordered from oldest to newest.", "parameters": [ { "name": "type", "in": "query", "description": "Only notSent is supported.", "required": true, "type": "string" }, { "name": "$pageSize", "in": "query", "description": "Number of messageKeys (array elements) to return per response page.", "required": false, "type": "integer" }, { "name": "lastEventId", "in": "query", "description": "Event ID from which you want the response to start. To obtain the initial event ID, submit a request without a lastEventId. The events in the response are listed top to bottom from oldest to newest.", "required": false, "type": "integer" } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/GetDefinitionsNotSentToRecipientsResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getSMSsNotSentToRecipients" } }, "/messaging/v1/sms/messages/{messageKey}": { "post": { "tags": [ "transactionalMessaging" ], "summary": "sendSmsToSingleRecipient", "description": "Sends a message to a single recipient via a SMS definition using a messageKey path parameter.", "parameters": [ { "name": "messageKey", "in": "path", "description": "Unique identifier of the definition used to track message status. The messageKey can be created automatically when you create a message, or you can provide it as part of the request. Each recipient in a request must have a unique messageKey. If you use a duplicate messageKey in the same send request, the message is rejected.", "required": true, "type": "string" }, { "name": "body", "in": "body", "description": "JSON Parameters", "required": true, "schema": { "$ref": "#/definitions/SendSmsToSingleRecipientRequest" } } ], "responses": { "202": { "description": "", "schema": { "$ref": "#/definitions/SendDefinitionToSingleRecipientResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/ApiError" } }, "403": { "description": "Permission error", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "sendSmsToSingleRecipient" }, "get": { "tags": [ "transactionalMessaging" ], "summary": "getSmsSendStatusForRecipient", "description": "Gets the send status for a message. Because this route is rate-limited, use it for infrequent verification of a messageKey. To collect send status at scale, subscribe to transactional send events using the Event Notification Service.", "parameters": [ { "name": "messageKey", "in": "path", "description": "Unique identifier to track message send status. You must provide it in singleton requests using the recipient attribute. To provide message key in batch requests, use the recipients array attribute. If you don’t provide the message key for recipients, it’s generated in the response.", "required": true, "type": "string" } ], "responses": { "200": { "description": "SMS send status for recipient succesfully retrieved.", "schema": { "$ref": "#/definitions/GetDefinitionSendStatusForRecipientResponse" } }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/ApiError" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/ApiError" } }, "500": { "description": "Server Error", "schema": { "$ref": "#/definitions/ApiError" } } }, "operationId": "getSmsSendStatusForRecipient" } } }, "definitions": { "ApiError": { "type": "object", "properties": { "message": { "description": "The error message", "type": "string" }, "errorCode": { "description": "The specific error code", "type": "number" }, "documentation": { "description": "Any specific documentation for the error", "type": "string" } } }, "AssetType": { "type": "object", "description": "The asset type", "required": [ "id", "name" ], "properties": { "id": { "description": "The id of the asset type", "type": "number" }, "name": { "description": "The name of the asset type", "type": "string" }, "displayName": { "description": "The description of the asset type", "type": "string" } } }, "Asset": { "type": "object", "required": [ "customerKey", "name", "description", "assetType" ], "properties": { "id": { "description": "The id of the asset", "type": "number" }, "customerKey": { "description": "Reference to customer's private ID/name for the asset", "type": "string" }, "contentType": { "description": "The type that the content attribute will be in", "type": "string" }, "data": { "description": "Property bag containing the asset data", "type": "object" }, "assetType": { "$ref": "#/definitions/AssetType" }, "version": { "description": "The version of the asset", "type": "number" }, "locked": { "description": "Specifies if the asset can be modified or not", "type": "boolean" }, "fileProperties": { "description": "Stores the different properties that this asset refers to if it is a file type", "type": "object" }, "name": { "description": "Name of the asset, set by the client", "type": "string" }, "description": { "description": "Description of the asset, set by the client", "type": "string" }, "category": { "description": "ID of the category the asset belongs to", "type": "object" }, "tags": { "description": "List of tags associated with the asset", "type": "array", "items": { "type": "string" } }, "content": { "description": "The actual content of the asset", "type": "string" }, "design": { "description": "Fallback for display when neither content nor supercontent are provided", "type": "string" }, "superContent": { "description": "Content that supersedes content in terms of display", "type": "string" }, "customFields": { "description": "Custom fields within an asset", "type": "object" }, "views": { "description": "Views within an asset", "type": "object" }, "blocks": { "description": "Blocks within the asset", "type": "object" }, "minBlocks": { "description": "Minimum number of blocks within an asset", "type": "number" }, "maxBlocks": { "description": "Maximum number of blocks within an asset", "type": "number" }, "channels": { "description": "List of channels that are allowed to use this asset", "type": "object" }, "allowedBlocks": { "description": "List of blocks that are allowed in the asset", "type": "array", "items": { "type": "string" } }, "slots": { "description": "Slots within the asset", "type": "object" }, "businessUnitAvailability": { "description": "A dictionary of member IDs that have been granted access to the asset", "type": "object" }, "sharingProperties": { "$ref": "#/definitions/SharingProperties" }, "template": { "description": "Template the asset follows", "type": "object" }, "file": { "description": "Base64-encoded string of a file associated with an asset", "type": "string" }, "generateFrom": { "description": "Tells the sending compiler what view to use for generating this view's content", "type": "string" } } }, "Campaign": { "type": "object", "required": [ "name", "description", "campaignCode", "color", "favorite" ], "properties": { "name": { "description": "Name of the campaign with a maximum length of 128 characters", "type": "string", "maxLength": 128 }, "description": { "description": "Description of the campaign with a maximum length of 512 characters", "type": "string", "maxLength": 512 }, "campaignCode": { "description": "Unique identifier for the campaign with a maximum length of 36 characters", "type": "string", "maxLength": 36 }, "color": { "description": "Hex color value", "type": "string" }, "favorite": { "description": "Determines if the campaign will be flagged as a favorite", "type": "boolean" }, "id": { "description": "The id of the campaign", "type": "string", "readOnly": true }, "createdDate": { "description": "The date the object was created.", "type": "string", "format": "date-time", "readOnly": true }, "modifiedDate": { "description": "The date the object was modified.", "type": "string", "format": "date-time", "readOnly": true } } }, "EmailDefinition": { "type": "object", "required": [ "definitionKey", "name", "content", "subscriptions" ], "properties": { "requestId": { "description": "The ID of the request", "type": "string", "readOnly": true }, "name": { "description": "Name of the definition. Must be unique.", "type": "string" }, "definitionKey": { "description": "Unique, user-generated key to access the definition object.", "type": "string" }, "definitionId": { "description": "Definition Id", "type": "string" }, "description": { "description": "User-provided description of the email definition.", "type": "string" }, "classification": { "description": "Marketing Cloud external key of a sending classification defined in Email Studio Administration. Only transactional classifications are permitted. Default is default transactional.", "type": "string" }, "status": { "description": "Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days.", "type": "string" }, "createdDate": { "description": "The date the object was created.", "type": "string", "format": "date-time", "readOnly": true }, "modifiedDate": { "description": "The date the object was modified.", "type": "string", "format": "date-time", "readOnly": true }, "content": { "$ref": "#/definitions/EmailDefinitionContent" }, "subscriptions": { "$ref": "#/definitions/EmailDefinitionSubscriptions" }, "options": { "$ref": "#/definitions/EmailDefinitionOptions" } } }, "UpdateEmailDefinitionRequest": { "type": "object", "properties": { "name": { "description": "Name of the definition. Must be unique.", "type": "string" }, "content": { "$ref": "#/definitions/EmailDefinitionContent" }, "status": { "description": "Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days.", "type": "string" }, "description": { "description": "User-provided description of the email definition.", "type": "string" }, "classification": { "description": "Marketing Cloud external key of a sending classification defined in Email Studio Administration. Only transactional classifications are permitted. Default is default transactional.", "type": "string" }, "subscriptions": { "$ref": "#/definitions/EmailDefinitionSubscriptions" }, "options": { "$ref": "#/definitions/EmailDefinitionOptions" } } }, "UpdateSmsDefinitionRequest": { "type": "object", "properties": { "name": { "description": "Name of the definition. Must be unique.", "type": "string" }, "content": { "$ref": "#/definitions/SmsDefinitionContent" }, "status": { "description": "Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days.", "type": "string" }, "description": { "description": "User-provided description of the SMS definition.", "type": "string" }, "subscriptions": { "$ref": "#/definitions/SmsDefinitionSubscriptions" } } }, "GetEmailDefinitionsResponse": { "type": "object", "properties": { "requestId": { "description": "The ID of the request", "type": "string" }, "definitions": { "type": "array", "items": { "$ref": "#/definitions/EmailDefinition" } }, "count": { "description": "Number of pages", "type": "integer" }, "page": { "description": "Page number to return.", "type": "integer" }, "pageSize": { "description": "Number of definitions, which are array elements, to return per paged response.", "type": "integer" } } }, "EmailDefinitionContent": { "type": "object", "required": [ "customerKey" ], "properties": { "customerKey": { "description": "Unique identifier of the content asset.", "type": "string" } } }, "EmailDefinitionSubscriptions": { "type": "object", "required": [ "list" ], "properties": { "list": { "description": "Marketing Cloud external key of the list or all subscribers. Contains the subscriber keys and profile attributes.", "type": "string" }, "dataExtension": { "description": "Marketing Cloud external key of the triggered send data extension. Each request inserts as a new row in the data extension.", "type": "string" }, "autoAddSubscriber": { "description": "Adds the recipient’s email address and contact key as a subscriber key to subscriptions.list. Default is true.", "type": "boolean", "default": true }, "updateSubscriber": { "description": "Updates the recipient’s contact key as a subscriber key with the provided email address and profile attributes to subscriptions.list. Default is true.", "type": "boolean" } } }, "EmailDefinitionOptions": { "type": "object", "properties": { "trackLinks": { "description": "Wraps links for tracking and reporting. Default is true.", "type": "boolean" } } }, "DeleteSendDefinitionResponse": { "type": "object", "properties": { "message": { "description": "The response message", "type": "string" }, "requestId": { "description": "The ID of the request", "type": "string" }, "deletedDefinitionKey": { "description": "The key of the deleted definition", "type": "string" } } }, "SharingProperties": { "type": "object", "properties": { "sharingType": { "description": "Indicates the permission that you are granting to the list of MIDs in sharedWith. Possible values are view, edit, or local.", "type": "string", "enum": [ "view", "edit", "local" ] }, "sharedWith": { "description": "List of MID IDs the asset is shared with", "type": "array", "items": { "type": "integer" }, "maxItems": 100 } } }, "GetQueueMetricsForSendDefinitionResponse": { "type": "object", "properties": { "requestId": { "description": "The ID of the request", "type": "string" }, "count": { "description": "Number of pages", "type": "number" }, "ageSeconds": { "description": "Number of seconds", "type": "number" } } }, "DeleteQueuedMessagesForSendDefinitionResponse": { "type": "object", "properties": { "requestId": { "description": "The ID of the request", "type": "string" } } }, "SendEmailToMultipleRecipientsRequest": { "type": "object", "required": [ "definitionKey", "recipients" ], "properties": { "definitionKey": { "description": "Unique, user-generated key to access the definition object.", "type": "string" }, "recipients": { "description": "Array of recipient objects that contain parameters and metadata for the recipients, such as send tracking and personalization attributes. Use this parameter to send to multiple recipients in one request. Use either the recipient or recipients parameter, but not both.", "type": "array", "items": { "$ref": "#/definitions/Recipient" } }, "attributes": { "$ref": "#/definitions/Attributes" } } }, "SendDefinitionToMultipleRecipientsResponse": { "type": "object", "properties": { "requestId": { "description": "The ID of the request", "type": "string" }, "errorcode": { "description": "The specific error code", "type": "number" }, "message": { "description": "", "type": "string" }, "responses": { "description": "", "type": "array", "items": { "$ref": "#/definitions/SendDefinitionResponseItem" } } } }, "Recipient": { "type": "object", "required": [ "contactKey" ], "properties": { "contactKey": { "description": "Unique identifier for a subscriber in Marketing Cloud. Each request must include a contactKey. You can use an existing subscriber key or create one at send time by using the recipient’s email address.", "type": "string" }, "to": { "description": "Channel address of the recipient. For email, it’s the recipient's email address. For SMS, it’s the recipient's E.164-based mobile number.", "type": "string" }, "messageKey": { "description": "Unique identifier used to track message status. Can be automatically created when you create a message or provided as part of the request. Each recipient in a request must have a unique messageKey. If you use a duplicate messageKey in the same send request, the message is rejected.", "type": "string" }, "attributes": { "$ref": "#/definitions/Attributes" } } }, "SendDefinitionResponseItem": { "type": "object", "properties": { "messageKey": { "description": "Unique identifier used to track message status.", "type": "string" }, "errorCode": { "description": "The specific error code", "type": "number" }, "message": { "description": "The error message", "type": "string" } } }, "GetDefinitionSendStatusForRecipientResponse": { "type": "object", "properties": { "requestId": { "description": "The ID of the request", "type": "string" }, "eventCategoryType": { "description": "The status of the message", "type": "string" }, "timestamp": { "description": "The date the ...", "type": "string", "format": "date-time" }, "compositeId": { "description": "The Id of ...", "type": "string" }, "info": { "$ref": "#/definitions/GetDefinitionSendStatusForRecipientResponseInfo" } } }, "GetDefinitionSendStatusForRecipientResponseInfo": { "type": "object", "properties": { "messageKey": { "description": "Unique identifier used to track message status.", "type": "string" }, "contactKey": { "description": "Unique identifier for a subscriber in Marketing Cloud. Each request must include a contactKey. You can use an existing subscriber key or create one at send time by using the recipient’s email address.", "type": "string" }, "to": { "description": "Channel address of the recipient. For email, it’s the recipient's email address.", "type": "string" }, "statusCode": { "description": "The specific status code", "type": "number" }, "statusMessage": { "description": "The specific status message", "type": "string" } } }, "GetDefinitionsNotSentToRecipientsResponse": { "type": "object", "properties": { "lastEventID": { "description": "Event ID from which you want the response to start. To obtain the initial event ID, submit a request without a lastEventId. The events in the response are listed top to bottom from oldest to newest", "type": "integer" }, "messages": { "description": "", "type": "array", "items": { "$ref": "#/definitions/GetDefinitionsNotSentToRecipientsMessage" } }, "count": { "description": "Number of pages", "type": "integer" }, "requestId": { "description": "The ID of the request", "type": "string", "readOnly": true }, "pageSize": { "description": "Number of definitions, which are array elements, to return per paged response.", "type": "integer" } } }, "GetDefinitionsNotSentToRecipientsMessage": { "type": "object", "properties": { "statusCode": { "description": "The specific status code", "type": "integer" }, "statusMessage": { "description": "The specific status message", "type": "string" }, "eventCategoryType": { "description": "The status of the message", "type": "string" }, "timestamp": { "description": "The date the ...", "type": "string", "format": "date-time" }, "definitionKey": { "description": "Unique, user-generated key to access the definition object.", "type": "string" }, "eventID": { "description": "", "type": "number" }, "info": { "$ref": "#/definitions/GetDefinitionsNotSentToRecipientsMessageInfo" } } }, "GetDefinitionsNotSentToRecipientsMessageInfo": { "type": "object", "properties": { "messageKey": { "description": "Unique identifier used to track message status.", "type": "string" }, "contactKey": { "description": "Unique identifier for a subscriber in Marketing Cloud. Each request must include a contactKey. You can use an existing subscriber key or create one at send time by using the recipient’s email address.", "type": "string" }, "to": { "description": "Channel address of the recipient. For email, it’s the recipient's email address.", "type": "string" } } }, "SendEmailToSingleRecipientRequest": { "type": "object", "required": [ "definitionKey", "recipient" ], "properties": { "definitionKey": { "description": "Unique identifier of the definition.", "type": "string" }, "recipient": { "$ref": "#/definitions/Recipient" } } }, "SendDefinitionToSingleRecipientResponse": { "type": "object", "properties": { "requestId": { "description": "The ID of the request", "type": "string" }, "errorcode": { "description": "The specific error code", "type": "number" }, "responses": { "description": "", "type": "array", "items": { "$ref": "#/definitions/SendDefinitionResponseItem" } } } }, "SmsDefinition": { "type": "object", "required": [ "definitionKey", "name", "content", "subscriptions" ], "properties": { "definitionKey": { "description": "Unique, user-generated key to access the definition object.", "type": "string" }, "name": { "description": "Name of the definition. Must be unique.", "type": "string" }, "content": { "$ref": "#/definitions/SmsDefinitionContent" }, "status": { "description": "Operational state of the definition: active, inactive, or deleted. A message sent to an active definition is processed and delivered. A message sent to an inactive definition isn’t processed or delivered. Instead, the message is queued for later processing for up to three days.", "type": "string" }, "createdDate": { "description": "The date the object was created.", "type": "string", "format": "date-time", "readOnly": true }, "modifiedDate": { "description": "The date the object was modified.", "type": "string", "format": "date-time", "readOnly": true }, "description": { "description": "User-provided description of the SMS definition.", "type": "string" }, "subscriptions": { "$ref": "#/definitions/SmsDefinitionSubscriptions" }, "requestId": { "description": "The ID of the request", "type": "string", "readOnly": true } } }, "SmsDefinitionContent": { "type": "object", "required": [ "message" ], "properties": { "message": { "description": "The message content that you want sent with each message. Use substitution strings and AMPscript to personalize the message.", "type": "string" } } }, "SmsDefinitionSubscriptions": { "type": "object", "required": [ "shortCode", "countryCode" ], "properties": { "shortCode": { "description": "The short code for the mobile transmissions for each message on this definition.", "type": "string" }, "countryCode": { "description": "The country code associated with the shortCode for the mobile transmissions for each message on this definition.", "type": "string" }, "keyword": { "description": "The keyword used to track messages.", "type": "string" }, "autoAddSubscriber": { "description": "Permits adding a recipient as subscriber against the shortCode using contactKey. When false, the message is rejected if contactKey does not exist as a subscriber. Default is true.", "type": "boolean", "default": true } } }, "GetSmsDefinitionsResponse": { "type": "object", "properties": { "requestId": { "description": "The ID of the request", "type": "string" }, "definitions": { "type": "array", "items": { "$ref": "#/definitions/SmsDefinition" } }, "count": { "description": "Number of pages", "type": "integer" }, "page": { "description": "Page number to return.", "type": "integer" }, "pageSize": { "description": "Number of definitions, which are array elements, to return per paged response.", "type": "integer" } } }, "SendSmsToMultipleRecipientsRequest": { "type": "object", "required": [ "definitionKey", "recipients" ], "properties": { "definitionKey": { "description": "Unique, user-generated key to access the definition object.", "type": "string" }, "recipients": { "description": "Array of recipient objects that contain parameters and metadata for the recipients, such as send tracking and personalization attributes. Use this parameter to send to multiple recipients in one request. Use either the recipient or recipients parameter, but not both.", "type": "array", "items": { "$ref": "#/definitions/Recipient" } }, "subscriptions": { "$ref": "#/definitions/SendSmsToMultipleRecipientsSubscriptionsRequest" }, "content": { "$ref": "#/definitions/SendSmsContentRequest" }, "attributes": { "$ref": "#/definitions/Attributes" } } }, "Attributes": { "type": "object" }, "SendSmsToMultipleRecipientsSubscriptionsRequest": { "type": "object", "properties": { "resubscribe": { "description": "Forces the message send request to subscribe the mobile number back into a short code if a user may have requested STOP. Often used to ensure that critical transactional messages are delivered irrespective of a mobile number subscriber status.", "type": "boolean" } } }, "SendSmsContentRequest": { "type": "object", "properties": { "message": { "description": "Override for message content in the definition that you want sent with each message. Use substitution strings to personalize the content.", "type": "string" } } }, "SendSmsToSingleRecipientRequest": { "type": "object", "required": [ "definitionKey", "recipient" ], "properties": { "definitionKey": { "description": "Unique identifier of the definition.", "type": "string" }, "recipient": { "$ref": "#/definitions/Recipient" }, "content": { "$ref": "#/definitions/SendSmsContentRequest" } } } } }