DELETE /messaging/v1/sms/definitions/{definitionKey}

Overview 

Deletes a message 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.

URL Parameters 

NameTypeDescription
definitionKeystringRequiredUnique identifier of the definition.

Responses 

StatusNameTypeDescription
200  Send definition is updated on server. Review example response.
 requestIdstringThe unique identifier of this request.
 messagestringSuccess
 deletedDefinitionKeystringNew value of the definition key for referencing the deleted definition.

Usage 

Example Request 

1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2DELETE /messaging/v1/sms/definitions/{definitionKey}
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN

Example Response 

1HTTP/1.1 200 OK
2{
3  "message": “Success",
4  "requestId": "UUID",
5  "deletedDefinitionKey": "51a05a43-0a75-49dd-8cc7-8d316025c87f"
6}

HTTP Responses 

ResponseReason
200 OKSend definition is updated on server. Review example response.
400 Bad RequestInvalid request
403 ForbiddenFailed to pass authorization.
404 Not FoundSend definition doesn’t exist.
500 Server ErrorInternal error

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!