GET /messaging/v1/email/definitions/{definitionKey}
Gets send definition configuration details for a definition key. You can only retrieve activated Transactional Send Journeys created in Journey Builder.
URL Parameters
Name | Type | Description | |
---|---|---|---|
definitionKey | string | Required | Unique identifier of the definition. |
Responses
Status | Name | Type | Description |
---|---|---|---|
200 | Definition retrieved. Review example response. | ||
requestId | string | The unique identifier of this request. | |
name | string | Name of the definition. | |
definitionKey | string | Unique, user-generated key to access the definition object. | |
definitionId | string | A unique object identifier. | |
description | string | User-provided description of the send definition. | |
classification | string | The external key of a sending classification defined in Email Studio Administration. Only transactional classifications are permitted. Default is default transactional. | |
status | string | 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. | |
createdDate | string | Date the definition was created. | |
modifiedDate | string | Date and time the definition was most recently changed. | |
content.customerKey | string | Unique identifier of the content asset. | |
subscriptions.dataExtension | string | The external key of the triggered send data extension. Each request inserts as a new row in the data extension. | |
subscriptions.list | string | The external key of the list or all subscribers. Contains the subscriber keys and profile attributes. | |
subscriptions.autoAddSubscriber | boolean | Adds the recipient’s email address and contact key as a subscriber key to subscriptions.list. Default is true. | |
subscriptions.updateSubscriber | boolean | For email only: Updates the recipient’s contact key as a subscriber key with the provided email address and profile attributes to subscriptions.list. Default is true. | |
options.trackLinks | boolean | Wraps links for tracking and reporting. Default is true. | |
options.cc | array | Include CC email addresses with every send. To CC dynamically at send time, create a profile attribute and use the %%attribute%% syntax. | |
options.bcc | array | Include BCC email addresses with every send. To dynamically BCC at send time, create a profile attribute and use the %%attribute%% syntax. | |
journey | boolean | Indicates whether the send definition is available in Journey Builder as a Transactional Send Journey. | |
journey.interactionKey | string | Unique ID of the Transactional Send Journey. |
Usage
Example Request
Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
GET /messaging/v1/email/definitions/2FA_order_accounts
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
Example Response
HTTP/1.1 200 Success
{
"requestId": "1f1e8755-819b-424d-a914-e066b5ba20f8",
"name": "My Unique Definition Name",
"definitionKey": "2FA_order_accounts",
"definitionId": "c13a2f02-2e02-e911-80e9-1402ec6b9711",
"description": "description updated",
"classification": "Default Transactional",
"status": "Active",
"createdDate": "2018-12-17T13:00:00",
"modifiedDate": "2018-12-31T09:52:00",
"content": {
"customerKey": "bebf8650-137a-494c-8727-cdeb32534961"
},
"subscriptions": {
"dataExtension": "test-de",
"list": "test-list"
"autoAddSubscriber": true,
"updateSubscriber": true
},
"options": {
"trackLinks": true
},
"journey": {
"interactionKey": "81bcd4b9-10b0-47c2-be8e-fce576c8110c"
}
}
HTTP Responses
Response | Reason |
---|---|
200 Success | Definition retrieved. Review example response. |
400 Bad Request | Invalid request |
403 Forbidden | Failed to pass authorization. |
404 Not Found | Definition key doesn’t exist for this MID |
500 Server Error | Internal error |