By providing a fully documented API reference, we want to enable everyone to maximize the usage of the Marigold Engage Platform for automating & exchange data.
The Marigold Engage API is organized around the REST protocol with the use of HTTP verbs and a RESTful endpoint structure. The API provides resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. We strive to make the endpoints so self-explanatory and informative as possible, by providing clear validation, error and success responses.
The API style is inspired by the Microsoft API guidelines.
https://<customername>.sdc.slgnt.eu/api
Example: https://<customername>.sdc.slgnt.eu/api/webhooks/v1/admin/subscriptions/
Definition
Application Env name: refers to a unique subdomain per environment. In the example the production environment "sdc-prod".
Module: refers to a unique subdomain per product/application module. For this API reference the module is SMC ( Marigold Engage).
slgnt.eu/slgnt.us: refers to the geographical area for which the customer instance is active.
Europe: https://<customername>.sdc.slgnt.eu/api
Touchpoint: refers to the grouped entrypoint for the user to interact/interface with the application. For this API reference the touchpoint is the API.
Component/Channel: refers to the channels (email/mobile/sms) or towards a specific component (like messages, reporting, …). In the example the channel is "push".
https://baseUrl/chapter/versioning/entity(_type)/{identifier}/operation|result
Examples:
- webhooks https://<customername>.sdc.slgnt.eu/api/webhooks/v1/events/send
Definition
v2
. In case no version number is part, it refers to
the initial API version.The Marigold Engage Delivery Cloud API uses the Oauth2.0 authorisation protocol, through bearer JSON Web Tokens (JWT), to authenticate requests. Engage will provide you with a dedicated client ID and secret to authorize using OAuth.
With each API call, you will need to set request headers including your access key to authenticate yourself.
The client ID and secret carry significant privileges. Please ensure to keep them 100% secure. Do not share your Oauth client ID and Oauth client secret in publicly accessible areas such as versioning systems (GitHub, Bitbucket,... ) or client-side code.
Engage uses the conventional HTTP response codes to indicate successful or failed API requests.
Codes in the 2xx
range indicate success.
Codes in the 4xx
range indicate an input related error or validation restrictions.
Codes in the 5xx
range indicate an error with Marigold Engage servers.
HTTP Status Codes | Description |
---|---|
200 - OK | We found the request resource |
201 - Created | The resource is successfully created |
204 - No Content | The requested resources is empty |
400 - Bad Request | There was an error with the request. The body of the response will have more info. |
401 - Unauthorized | The access key was incorrect |
404 - Not found | The resources cannot be found |
405 - Method Not Allowed | The method is not allowed |
408 - Request Timeout | The request is taking too long to respond |
409 - Conflict | Something is conflicting the request |
422 - Unprocessable Entity | The resource couldn't be created |
429 - Too Many Requests | Too many requests hit the API too quickly |
5xx - Server errors | Something went wrong on our end. Please try again |
In the case of a validation of bad request error, the body of the response includes a JSON formatted response that tells you exactly what's wrong.
Attribute | Type | Description |
---|---|---|
title |
String | One of a server-defined set of error codes. |
status |
Integer | An integer that represents the error type. |
traceId |
String | A reference ID to trace log within the SMC platform. This can be relevant for reporting to the support team. |
errors[] |
Array | An array of details about specific errors that led to this reported error. |
errors[] key |
Integer | For some errors that could be handled programmatically, a short string indicating the error code reported. |
errors[] array value |
String | A human-readable description of the error. You can use this to let the user know what they can do about the error. |
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-03f4894fecc1ae4498599fb8d5d16b5e-9d0a2aab93c57d41-00",
"errors": {
"Name": ["The Name field is required."],
"ApiName": ["The ApiName field is required."]
}
}
Attribute | Type | Description |
---|---|---|
code |
Integer | An integer that represents the error type. |
message |
String | A human readable error message. |
traceId |
String | A reference ID to trace log within the SMC platform. This can be relevant for reporting to the support team. |
target |
String | The target in your request related to the error. |
details[] |
Array | An array of details about specific errors that led to this reported error. |
errors[].code |
Integer | A short string indicating the error code reported, for some errors that could be handled programmatically. |
errors[].message |
String | A human-readable description of the error. You can use this to let the user know what they can do about the error. |
errors[].target |
String | The target in your request related to the error if the error is specific. |
{
"error": {
"code": "BadArgument",
"message": "Multiple errors in ContactInfo data",
"target": "ContactInfo",
"details": [
{
"code": "NullValue",
"target": "PhoneNumber",
"message": "Phone number must not be null"
},
{
"code": "NullValue",
"target": "LastName",
"message": "Last name must not be null"
},
{
"code": "MalformedValue",
"target": "Address",
"message": "Address is not valid"
}
]
}
}
We provide the API specification in the format of OpenApi files which can be found in the openapi/ directory:
The Marigold Engage API can provide very powerful manner for integrating, exchanging data and automating tasks. To facilitate with the usage of the API, we have created a number of guides in our development webhooks.
Our getting started guide will demonstrate for a number of basic use cases. It will refer to this API reference us to highlight the implementation and refer to other information resources in Marigold Engage that will be helpful for many other use cases too.
To get you up and running and provide a hands-on experience, we provide an up-to-date Postman collection of the EDC Webhooks API V1.
Import the Postman collection through any of the methods specified below.
This collection takes advantage of Postman variables and environments to store/access your Marigold Engage Oauth Client key/secret and base URL.
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
id | string |
filters | Array of strings or null (WebhookFilters) Only events that match the filter get forwarded to the target url. The filters support using wildcards ('*') at the start, end or both. Wildcards must come before or after the '.' character of the filter part. Examples: 'sdc.*', '*.failed', '*.email.*', 'sdc.deliveries.email.sent' |
Array of objects or null (WebhookAdvancedFilters) <= 10 items Only events that match the all of the advanced filters get forwarded to the target url. The filters support all the end properties of the event. You have to respect the structure of the event you want to filter. If you try to put a filter on a property that doesn't exists or that is not an end property, the webhook won't be sent. Examples: 'data.recipient stringEndsWith gmail.com', 'data.account_id equals d6862df2-59c2-4fbc-b248-d1374967dafd' | |
target_url | string |
Array of objects or null (WebhookHeaders) Custom headers that add additional information to the HTTP request. For example this can be used to add basic authentication/authorization. The following headers are restricted and can't be overridden or used:
|
[- {
- "id": "494d-93fd896a-3821-ba05-4baec32a7ef9",
- "filters": [
- "sdc.*",
- "*.failed",
- "*.email.*",
- "sdc.deliveries.email.sent"
], - "advanced_filters": [
- {
- "key": "data.recipient",
- "operator": "stringEndsWith",
- "value": "gmail.com"
}
], - "headers": [
- {
- "name": "Authorization",
- "value": "Basic TG9uZyBsaXZlIGRvZ2Uh"
}, - {
- "name": "X-Value",
- "value": "Extra header"
}
]
}
]
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
filters required | Array of strings or null (WebhookFilters) Only events that match the filter get forwarded to the target url. The filters support using wildcards ('*') at the start, end or both. Wildcards must come before or after the '.' character of the filter part. Examples: 'sdc.*', '*.failed', '*.email.*', 'sdc.deliveries.email.sent' | ||||||
Array of objects or null (WebhookAdvancedFilters) <= 10 items Only events that match the all of the advanced filters get forwarded to the target url. The filters support all the end properties of the event. You have to respect the structure of the event you want to filter. If you try to put a filter on a property that doesn't exists or that is not an end property, the webhook won't be sent. Examples: 'data.recipient stringEndsWith gmail.com', 'data.account_id equals d6862df2-59c2-4fbc-b248-d1374967dafd' | |||||||
Array (<= 10 items)
| |||||||
target_url required | string non-empty | ||||||
Array of objects or null (WebhookHeaders) Custom headers that add additional information to the HTTP request. For example this can be used to add basic authentication/authorization. The following headers are restricted and can't be overridden or used:
| |||||||
Array
|
id | string | ||||||
filters | Array of strings or null (WebhookFilters) Only events that match the filter get forwarded to the target url. The filters support using wildcards ('*') at the start, end or both. Wildcards must come before or after the '.' character of the filter part. Examples: 'sdc.*', '*.failed', '*.email.*', 'sdc.deliveries.email.sent' | ||||||
Array of objects or null (WebhookAdvancedFilters) <= 10 items Only events that match the all of the advanced filters get forwarded to the target url. The filters support all the end properties of the event. You have to respect the structure of the event you want to filter. If you try to put a filter on a property that doesn't exists or that is not an end property, the webhook won't be sent. Examples: 'data.recipient stringEndsWith gmail.com', 'data.account_id equals d6862df2-59c2-4fbc-b248-d1374967dafd' | |||||||
Array (<= 10 items)
| |||||||
target_url | string | ||||||
Array of objects or null (WebhookHeaders) Custom headers that add additional information to the HTTP request. For example this can be used to add basic authentication/authorization. The following headers are restricted and can't be overridden or used:
| |||||||
Array
|
type | string or null A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". |
title | string or null A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization(e.g., using proactive content negotiation; see[RFC7231], Section 3.4). |
status | integer or null <int32> The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem. |
detail | string or null A human-readable explanation specific to this occurrence of the problem. |
instance | string or null A URI reference that identifies the specific occurrence of the problem.It may or may not yield further information if dereferenced. |
{- "filters": [
- "sdc.*",
- "*.failed",
- "*.email.*",
- "sdc.deliveries.email.sent"
], - "advanced_filters": [
- {
- "key": "data.recipient",
- "operator": "stringEndsWith",
- "value": "gmail.com"
}
], - "headers": [
- {
- "name": "Authorization",
- "value": "Basic TG9uZyBsaXZlIGRvZ2Uh"
}, - {
- "name": "X-Value",
- "value": "Extra header"
}
]
}
{- "id": "494d-93fd896a-3821-ba05-4baec32a7ef9",
- "filters": [
- "sdc.*",
- "*.failed",
- "*.email.*",
- "sdc.deliveries.email.sent"
], - "advanced_filters": [
- {
- "key": "data.recipient",
- "operator": "stringEndsWith",
- "value": "gmail.com"
}
], - "headers": [
- {
- "name": "Authorization",
- "value": "Basic TG9uZyBsaXZlIGRvZ2Uh"
}, - {
- "name": "X-Value",
- "value": "Extra header"
}
]
}
Updates the webhook subscription configurations.
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
The configuration for a webhook subscription.
filters required | Array of strings or null (WebhookFilters) Only events that match the filter get forwarded to the target url. The filters support using wildcards ('*') at the start, end or both. Wildcards must come before or after the '.' character of the filter part. Examples: 'sdc.*', '*.failed', '*.email.*', 'sdc.deliveries.email.sent' |
Array of objects or null (WebhookAdvancedFilters) <= 10 items Only events that match the all of the advanced filters get forwarded to the target url. The filters support all the end properties of the event. You have to respect the structure of the event you want to filter. If you try to put a filter on a property that doesn't exists or that is not an end property, the webhook won't be sent. Examples: 'data.recipient stringEndsWith gmail.com', 'data.account_id equals d6862df2-59c2-4fbc-b248-d1374967dafd' | |
target_url required | string non-empty |
Array of objects or null (WebhookHeaders) Custom headers that add additional information to the HTTP request. For example this can be used to add basic authentication/authorization. The following headers are restricted and can't be overridden or used:
| |
id | string or null |
[- {
- "filters": [
- "sdc.*"
], - "headers": [
- {
- "name": "Authorization",
- "value": "Basic TG9uZyBsaXZlIGRvZ2Uh"
}
], - "advanced_filters": [
- {
- "key": "data.recipient",
- "operator": "stringEndsWith",
- "value": "gmail.com"
}
]
}
]
{- "title": "Not Found",
- "status": 404,
- "detail": "Resource does not exist.",
- "instance": "TODO"
}
Removes webhook subscription configurations for the tenant.
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
{- "title": "Not Found",
- "status": 404,
- "detail": "Resource does not exist.",
- "instance": "TODO"
}
subscriptionId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 The unique identifier of the subscription. Dead letters always belong to a webhook subscription. |
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
id required | string non-empty | ||||||
filters required | Array of strings or null (WebhookFilters) Only events that match the filter get forwarded to the target url. The filters support using wildcards ('*') at the start, end or both. Wildcards must come before or after the '.' character of the filter part. Examples: 'sdc.*', '*.failed', '*.email.*', 'sdc.deliveries.email.sent' | ||||||
Array of objects or null (WebhookAdvancedFilters) <= 10 items Only events that match the all of the advanced filters get forwarded to the target url. The filters support all the end properties of the event. You have to respect the structure of the event you want to filter. If you try to put a filter on a property that doesn't exists or that is not an end property, the webhook won't be sent. Examples: 'data.recipient stringEndsWith gmail.com', 'data.account_id equals d6862df2-59c2-4fbc-b248-d1374967dafd' | |||||||
Array (<= 10 items)
| |||||||
target_url required | string non-empty | ||||||
Array of objects or null (WebhookHeaders) Custom headers that add additional information to the HTTP request. For example this can be used to add basic authentication/authorization. The following headers are restricted and can't be overridden or used:
| |||||||
Array
|
{- "id": "494d-93fd896a-3821-ba05-4baec32a7ef9",
- "filters": [
- "sdc.*",
- "*.failed",
- "*.email.*",
- "sdc.deliveries.email.sent"
], - "advanced_filters": [
- {
- "key": "data.recipient",
- "operator": "stringEndsWith",
- "value": "gmail.com"
}
], - "headers": [
- {
- "name": "Authorization",
- "value": "Basic TG9uZyBsaXZlIGRvZ2Uh"
}, - {
- "name": "X-Value",
- "value": "Extra header"
}
]
}
Update the webhook subscription by id
subscriptionId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 The unique identifier of the subscription. Dead letters always belong to a webhook subscription. |
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
The webhook subscription.
id required | string non-empty | ||||||
filters required | Array of strings or null (WebhookFilters) Only events that match the filter get forwarded to the target url. The filters support using wildcards ('*') at the start, end or both. Wildcards must come before or after the '.' character of the filter part. Examples: 'sdc.*', '*.failed', '*.email.*', 'sdc.deliveries.email.sent' | ||||||
Array of objects or null (WebhookAdvancedFilters) <= 10 items Only events that match the all of the advanced filters get forwarded to the target url. The filters support all the end properties of the event. You have to respect the structure of the event you want to filter. If you try to put a filter on a property that doesn't exists or that is not an end property, the webhook won't be sent. Examples: 'data.recipient stringEndsWith gmail.com', 'data.account_id equals d6862df2-59c2-4fbc-b248-d1374967dafd' | |||||||
Array (<= 10 items)
| |||||||
target_url required | string non-empty | ||||||
Array of objects or null (WebhookHeaders) Custom headers that add additional information to the HTTP request. For example this can be used to add basic authentication/authorization. The following headers are restricted and can't be overridden or used:
| |||||||
Array
|
{- "id": "494d-93fd896a-3821-ba05-4baec32a7ef9",
- "filters": [
- "sdc.*",
- "*.failed",
- "*.email.*",
- "sdc.deliveries.email.sent"
], - "advanced_filters": [
- {
- "key": "data.recipient",
- "operator": "stringEndsWith",
- "value": "gmail.com"
}
], - "headers": [
- {
- "name": "Authorization",
- "value": "Basic TG9uZyBsaXZlIGRvZ2Uh"
}, - {
- "name": "X-Value",
- "value": "Extra header"
}
]
}
{- "title": "Not Found",
- "status": 404,
- "detail": "Resource does not exist.",
- "instance": "TODO"
}
Removes the webhook subscription
subscriptionId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 The unique identifier of the subscription. Dead letters always belong to a webhook subscription. |
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
{- "title": "Not Found",
- "status": 404,
- "detail": "Resource does not exist.",
- "instance": "TODO"
}
iterator | string or null Example: iterator=7274bb1d2f5006a248bf129943a1441ab923dee75e475c8e43a1441ab923dee75e475c8e441ab9 An iterator to use when for querying additional results. |
limit | integer <int32> Default: 10 Example: limit=100 Limits the amount of items returned in 1 call. |
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
Array of objects (WebhookDeadLetterPageResponseModel) | |
iterator | string or null An iterator to use when for querying additional results. |
previousIterator | string or null The current iterator used for querying. |
[- {
- "data": [
- {
- "id": "93fd896a-3821-494d-ba05-4baec32a7ef9",
- "subscription_id": "3821-93fd896a-494d-ba05-4baec32a7ef9",
- "event_type": "sdc.deliveries.email.failed",
- "created": "2024-06-24T12:00:00Z",
- "response_code": 500,
- "response": "Server Error",
- "retry_count": 5
}
], - "iterator": "7274bb1d2f5006a248bf129943a1441ab923dee75e475c8e43a1441ab923dee75e475c8e441ab9",
- "previousIterator": "2009e6a248bf129943a1441ab923dee75e475c8e7274bb1d2f5006a248bf129943a1441ab923dee75e475c8e"
}
]
subscriptionId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 The unique identifier of the subscription. Dead letters always belong to a webhook subscription. |
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
from | string <date-time> The lower bound of the time range to query. |
until | string <date-time> The upper bound of the time range to query. |
type | string or null A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". |
title | string or null A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization(e.g., using proactive content negotiation; see[RFC7231], Section 3.4). |
status | integer or null <int32> The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem. |
detail | string or null A human-readable explanation specific to this occurrence of the problem. |
instance | string or null A URI reference that identifies the specific occurrence of the problem.It may or may not yield further information if dereferenced. |
{- "from": "2024-06-20T12:00:00Z",
- "until": "2024-06-24T12:00:00Z"
}
{- "title": "Not Found",
- "status": 404,
- "detail": "Resource does not exist.",
- "instance": "TODO"
}
subscriptionId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 The unique identifier of the subscription. Dead letters always belong to a webhook subscription. |
deadLetterId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 A unique identifier that gets generated once we store the event as a dead letter. The GET endpoint which exposes the metadata of dead letters returns this ID, which can then be used to further retrieve the entire event and also delete it. |
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
id | string | ||||||||||||||||||||
subscription_id | string | ||||||||||||||||||||
event_type | string | ||||||||||||||||||||
target_url | string | ||||||||||||||||||||
created | string <date-time> | ||||||||||||||||||||
response_code | integer <int32> | ||||||||||||||||||||
response | string | ||||||||||||||||||||
retry_count | integer <int32> | ||||||||||||||||||||
object (CloudEventsJson) | |||||||||||||||||||||
|
{- "id": "93fd896a-3821-494d-ba05-4baec32a7ef9",
- "subscription_id": "494d-93fd896a-3821-ba05-4baec32a7ef9",
- "event_type": "sdc.deliveries.email.failed",
- "created": "2024-06-24T12:00:00Z",
- "response_code": 500,
- "response": "Server Error",
- "retry_count": 5,
- "body": {
- "id": "f0e01063-efaa-4023-8199-278d4e4285ae",
- "tenant": "EU.ENGAGE",
- "source": "/sdc/mailer",
- "type": "sdc.deliveries.email.sent",
- "subject": "674d25d7319b4549a88cefdda049989e_92233793802426",
- "time": "2018-04-05T17:31:00.000Z",
- "specversion": "1.0",
- "datacontenttype": "application/json",
- "data": {
- "account_id": "3822afb319684af18b9664ee327b7c44",
- "tenant_id": "EU.ENGAGE",
- "sender_domain": "example.com",
- "route": {
- "destination": {
- "cluster_id": "357d2587006d4938a0cc1a9866d731b1",
- "domain_name": "#MEETMARIGOLD.COM"
}, - "local_ip_port": 5025
}, - "outcome": "250 Ok",
- "recipient": "sdc.example@slgnt.eu",
- "context": {
- "tags": [
- "transactional",
- "DE"
], - "metadata": "TEST=true",
- "profile": "user@userlist"
}, - "drop_time_milliseconds": 40.0872,
- "external_reference": "674d25d7319b4549a88cefdda049989e_92233793802426",
- "timestamp": "2022-03-16T12:56:00.1260605"
}
}
}
subscriptionId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 The unique identifier of the subscription. Dead letters always belong to a webhook subscription. |
deadLetterId required | string Example: 93fd896a-3821-494d-ba05-4baec32a7ef9 A unique identifier that gets generated once we store the event as a dead letter. The GET endpoint which exposes the metadata of dead letters returns this ID, which can then be used to further retrieve the entire event and also delete it. |
Authorization | string Default: Bearer {{oauth_access_token}} Example: Bearer {{oauth_access_token}} Oauth2 token to authorize requests. |
Content-Type required | string Default: application/json Example: application/json Define the file type and format for the request object. |
{- "title": "Not Found",
- "status": 404,
- "detail": "Resource does not exist.",
- "instance": "TODO"
}