{
  "_": {
    "postman_id": "e79a1215-6959-4738-97a0-67a46aad12b4"
  },
  "item": [
    {
      "id": "33891ff5-4cda-40f1-b1cc-bf6dabe0f11e",
      "name": "Webhook Subscriptions",
      "description": {
        "content": "<span class=\"tag eap\">Early Access</span>",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "84612ab4-e98a-4029-9048-03417c753fc0",
          "name": "Get all webhook subscriptions",
          "request": {
            "name": "Get all webhook subscriptions",
            "description": {
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "subscriptions"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": []
        },
        {
          "id": "5ea1ac87-183f-4770-9a5a-94aef9e21ac8",
          "name": "Create a new webhook subscription",
          "request": {
            "name": "Create a new webhook subscription",
            "description": {
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "subscriptions"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"filters\": [\n    \"sdc.*\",\n    \"*.failed\",\n    \"*.email.*\",\n    \"sdc.deliveries.email.sent\"\n  ],\n  \"target_url\": \"https://example.com/customer-endpoint\",\n  \"advanced_filters\": [\n    {\n      \"key\": \"data.recipient\",\n      \"operator\": \"stringEndsWith\",\n      \"value\": \"gmail.com\"\n    }\n  ],\n  \"headers\": [\n    {\n      \"name\": \"Authorization\",\n      \"value\": \"Basic TG9uZyBsaXZlIGRvZ2Uh\"\n    },\n    {\n      \"name\": \"X-Value\",\n      \"value\": \"Extra header\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "0fb37646-b0a3-482e-8979-7d4cedf78701",
          "name": "Update webhook subscriptions on tenant level",
          "request": {
            "name": "Update webhook subscriptions on tenant level",
            "description": {
              "content": "Updates the webhook subscription configurations.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "subscriptions"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "body": {
              "mode": "raw",
              "raw": "[\n  {\n    \"filters\": [\n      \"smc.*\"\n    ],\n    \"target_url\": \"https://www.example.com/smc\"\n  },\n  {\n    \"filters\": [\n      \"sdc.*\"\n    ],\n    \"target_url\": \"https://www.example.com/sdc\",\n    \"headers\": [\n      {\n        \"name\": \"Authorization\",\n        \"value\": \"Basic TG9uZyBsaXZlIGRvZ2Uh\"\n      }\n    ],\n    \"advanced_filters\": [\n      {\n        \"key\": \"data.recipient\",\n        \"operator\": \"stringEndsWith\",\n        \"value\": \"gmail.com\"\n      }\n    ]\n  }\n]",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "d903ad97-7414-4c03-bb49-e854b2354180",
          "name": "Delete all webhook subscriptions for a tenant.",
          "request": {
            "name": "Delete all webhook subscriptions for a tenant.",
            "description": {
              "content": "Removes webhook subscription configurations for the tenant.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "subscriptions"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "DELETE"
          },
          "response": [],
          "event": []
        },
        {
          "id": "38a5aeaf-45c0-4d94-b0fd-9c87baecaff3",
          "name": "Get webhook subscription by id",
          "request": {
            "name": "Get webhook subscription by id",
            "description": {
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "subscriptions",
                ":subscriptionId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) The unique identifier of the subscription. Dead letters always belong to a webhook subscription.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "subscriptionId"
                }
              ]
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": []
        },
        {
          "id": "77219c13-4544-4e59-8ba4-7837a92afe51",
          "name": "Update webhook subscription by id",
          "request": {
            "name": "Update webhook subscription by id",
            "description": {
              "content": "Update the webhook subscription by id",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "subscriptions",
                ":subscriptionId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) The unique identifier of the subscription. Dead letters always belong to a webhook subscription.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "subscriptionId"
                }
              ]
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"filters\": [\n    \"sdc.*\",\n    \"*.failed\",\n    \"*.email.*\",\n    \"sdc.deliveries.email.sent\"\n  ],\n  \"id\": \"494d-93fd896a-3821-ba05-4baec32a7ef9\",\n  \"target_url\": \"https://example.com/customer-endpoint\",\n  \"advanced_filters\": [\n    {\n      \"key\": \"data.recipient\",\n      \"operator\": \"stringEndsWith\",\n      \"value\": \"gmail.com\"\n    }\n  ],\n  \"headers\": [\n    {\n      \"name\": \"Authorization\",\n      \"value\": \"Basic TG9uZyBsaXZlIGRvZ2Uh\"\n    },\n    {\n      \"name\": \"X-Value\",\n      \"value\": \"Extra header\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "71b3538d-b935-4211-b2c3-88522f1b57be",
          "name": "Delete webhook subscription by id",
          "request": {
            "name": "Delete webhook subscription by id",
            "description": {
              "content": "Removes the webhook subscription",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "subscriptions",
                ":subscriptionId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) The unique identifier of the subscription. Dead letters always belong to a webhook subscription.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "subscriptionId"
                }
              ]
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "DELETE"
          },
          "response": [],
          "event": []
        }
      ],
      "event": []
    },
    {
      "id": "464d64be-f1e9-4175-a779-c82dcae12f1a",
      "name": "Webhook Dead Letters",
      "description": {
        "content": "In message queueing a dead letter queue is a service implementation to store messages that the messaging system cannot or should not deliver, dead letters. \nAlthough implementation-specific, messages can be routed to the DLQ for the following reasons:\n\n- The webhook is sent to a URL that does not exist.\n- The webhook could not be accepted or processed by the receiving server.\n- The webhook has been retried the maximum amount of times.\n- The webhook exceeds the size limit.\n- The webhook expires because it reached the TTL (time to live)\n- The webhook is rejected by another API exchange.\n\nRouting these webhooks to a dead letter queue enables analysis of common fault patterns and potential software problems.\nFor more information see: https://en.wikipedia.org/wiki/Dead_letter_queue\n",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "2b148207-b5ff-452b-9ffe-32ffa10358ad",
          "name": "Get paginated webhook dead letters metadata",
          "request": {
            "name": "Get paginated webhook dead letters metadata",
            "description": {
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "deadletters"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [
                {
                  "disabled": false,
                  "description": {
                    "content": "An iterator to use when for querying additional results.",
                    "type": "text/plain"
                  },
                  "key": "iterator",
                  "value": "7274bb1d2f5006a248bf129943a1441ab923dee75e475c8e43a1441ab923dee75e475c8e441ab9"
                },
                {
                  "disabled": false,
                  "description": {
                    "content": "Limits the amount of items returned in 1 call.",
                    "type": "text/plain"
                  },
                  "key": "limit",
                  "value": "100"
                }
              ],
              "variable": []
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": []
        },
        {
          "id": "b0d84a77-519c-466b-9bd2-bada7328e385",
          "name": "Reschedule dead letters",
          "request": {
            "name": "Reschedule dead letters",
            "description": {
              "content": "The reschedule endpoint triggers an action that will put all the dead letters between the specified lower and upper bound dates back on the sending queue.\n\n⚠️ Important note: This action should be used sparingly and there is no guarantee about how quick the dead letters will end up on the sending queue again.\n",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "deadletters",
                ":subscriptionId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) The unique identifier of the subscription. Dead letters always belong to a webhook subscription.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "subscriptionId"
                }
              ]
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"from\": \"2024-06-20T12:00:00Z\",\n  \"until\": \"2024-06-24T12:00:00Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "5f1263b2-41c9-4e44-99b5-98feec81640d",
          "name": "Get webhook deadletter by id",
          "request": {
            "name": "Get webhook deadletter by id",
            "description": {
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "deadletters",
                ":subscriptionId",
                ":deadLetterId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) The unique identifier of the subscription. Dead letters always belong to a webhook subscription.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "subscriptionId"
                },
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) A unique identifier that gets generated once we store the event as a dead letter.\nThe GET endpoint which exposes the metadata of dead letters returns this ID,\nwhich can then be used to further retrieve the entire event and also delete it.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "deadLetterId"
                }
              ]
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET"
          },
          "response": [],
          "event": []
        },
        {
          "id": "2f379590-4853-4f60-a77a-bcb560d9d409",
          "name": "Delete webhook deadletter by id",
          "request": {
            "name": "Delete webhook deadletter by id",
            "description": {
              "type": "text/plain"
            },
            "url": {
              "path": [
                "webhooks",
                "v1",
                "admin",
                "deadletters",
                ":subscriptionId",
                ":deadLetterId"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) The unique identifier of the subscription. Dead letters always belong to a webhook subscription.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "subscriptionId"
                },
                {
                  "disabled": false,
                  "description": {
                    "content": "(Required) A unique identifier that gets generated once we store the event as a dead letter.\nThe GET endpoint which exposes the metadata of dead letters returns this ID,\nwhich can then be used to further retrieve the entire event and also delete it.",
                    "type": "text/plain"
                  },
                  "type": "any",
                  "value": "93fd896a-3821-494d-ba05-4baec32a7ef9",
                  "key": "deadLetterId"
                }
              ]
            },
            "header": [
              {
                "disabled": false,
                "description": {
                  "content": "Oauth2 token to authorize requests.",
                  "type": "text/plain"
                },
                "key": "Authorization",
                "value": "Bearer {{oauth_access_token}}"
              },
              {
                "disabled": false,
                "description": {
                  "content": "(Required) Define the file type and format for the request object.",
                  "type": "text/plain"
                },
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "DELETE"
          },
          "response": [],
          "event": []
        }
      ],
      "event": []
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "id": "04413274-ff44-4a81-8fd1-13b7c1f9821e",
        "type": "text/javascript",
        "exec": [
          "const currentTime = new Date().getTime();",
          "const oauthTokenUrl = pm.environment.get('oauth_access_token_url');",
          "const oauthGrantType = pm.environment.get('oauth_grant_type');",
          "const oauthClientId = pm.environment.get('oauth_client_id');",
          "const oauthClientSecret = pm.environment.get('oauth_client_secret');",
          "const oauthAudience = pm.environment.get('oauth_audience');",
          "const oauthAccountId = pm.environment.get('oauth_account_id');",
          "const getTokenRequest = {",
          "    method: 'POST',",
          "    url: oauthTokenUrl,",
          "    header: {'Content-Type': 'application/json'},",
          "    body: {",
          "        mode: 'raw',",
          "        raw: JSON.stringify({",
          "            'grant_type': oauthGrantType,",
          "            'client_id': oauthClientId,",
          "            'client_secret': oauthClientSecret,",
          "            'audience': oauthAudience,",
          "            'account_id': oauthAccountId,",
          "        })",
          "    }",
          "};",
          "// Fetch new access token, if empty OR if is expired",
          "if (!(pm.environment.get('oauth_access_token')) || (currentTime >= pm.environment.get('oauth_access_tokenExpires'))) {",
          "    pm.sendRequest(getTokenRequest, (err, res) => {",
          "        let jsonData = res.json();",
          "        pm.environment.set('oauth_access_token', jsonData.access_token);",
          "        pm.environment.set('oauth_access_tokenExpires', new Date().getTime() + jsonData.expires_in);",
          "    });",
          "    console.log('Oauth access token refreshed & ready to use')",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "type": "string",
      "value": "https://arkanis.sdc.slgnt.eu/dev/api",
      "key": "baseUrl"
    },
    {
      "type": "string",
      "value": "https://auth.slgnt.eu/oauth/token",
      "key": "oauthAccessTokenUrl"
    },
    {
      "type": "string",
      "value": "",
      "key": "oauthClientId"
    },
    {
      "type": "string",
      "value": "",
      "key": "oauthClientSecret"
    },
    {
      "type": "string",
      "value": "",
      "key": "oauthAccountId"
    },
    {
      "type": "string",
      "value": "https://sdc.slgnt.eu",
      "key": "oauthAudience"
    },
    {
      "type": "string",
      "value": "client_credentials",
      "key": "oauthGrantType"
    }
  ],
  "info": {
    "_postman_id": "e79a1215-6959-4738-97a0-67a46aad12b4",
    "name": "Selligent Delivery Cloud - Webhooks API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": {
      "content": "# SDC Webhooks\r\n\r\nBy providing a fully documented API reference, we want to enable everyone to maximize the usage of the Selligent\r\nPlatform for automating & exchange data.\r\n\r\nThe Selligent API is organized around the REST protocol with the use of HTTP verbs and a RESTful endpoint structure. The\r\nAPI provides resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses\r\nstandard HTTP response codes, authentication, and verbs. We strive to make the endpoints so self-explanatory and\r\ninformative as possible, by providing clear validation, error and success responses.\r\n\r\nThe API style is inspired by the [Microsoft API guidelines](https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md).\r\n\r\n# REST API\r\n\r\nThe SDC Webhooks endpoints are segmented.\r\n\r\n## Base URL\r\n\r\n```\r\nhttps://<customername>.sdc.slgnt.eu/api\r\n```\r\n\r\nExample: `https://<customername>.sdc.slgnt.eu/api/webhooks/v1/admin/subscriptions/`\r\n\r\n**Definition**\r\n\r\n1. **Application Env name**: refers to a unique subdomain per environment. In the example the production environment \"sdc-prod\".\r\n2. **Module**: refers to a unique subdomain per product/application module. For this API reference the module is SMC (\r\n   Selligent).\r\n3. **slgnt.eu/slgnt.us**: refers to the geographical area for which the customer instance is active.\r\n\r\n   **Europe**: `https://<customername>.sdc.slgnt.eu/api`\r\n\r\n4. **Touchpoint**: refers to the grouped entrypoint for the user to interact/interface with the application. For this\r\n   API reference the touchpoint is the API.\r\n5. **Component/Channel**: refers to the channels (email/mobile/sms) or towards a specific component (like messages,\r\n   reporting, …). In the example the channel is \"push\".\r\n\r\n## URI parts\r\n\r\n```\r\nhttps://baseUrl/chapter/versioning/entity(_type)/{identifier}/operation|result\r\n```\r\n\r\nExamples:\r\n\r\n```bash\r\n- webhooks          https://<customername>.sdc.slgnt.eu/api/webhooks/v1/events/send\r\n```\r\n\r\n**Definition**\r\n\r\n0. _Part 0_: **Base URL** - The base url is a reference to the customer domain.\r\n1. _Part 1_: **Webhooks** - Refers to the SDC Webhooks.\r\n1. _Part 2_: **Version number** - major numbering only - example: `v2`. In case no version number is part, it refers to\r\n   the initial API version.\r\n1. _Part 3_: **Entity(\\_type)** - Refers to entity or entity type. This is depends on the chapter, if it is needed or\r\n   not.\r\n1. _Part 4_: **Identifier** - Refers to the unique identifier for a specific entity.\r\n1. _Part 5_: **Operation|Result** - Refers to additional operations or specific sub-entities of the parent entity. This\r\n   is depends on the chapter, if it is needed or not. Examples: lists > fields / journeys > send\r\n\r\n## Authentication\r\n\r\nThe Selligent Delivery Cloud API uses the Oauth2.0 authorisation protocol, through bearer JSON Web Tokens (JWT), to authenticate requests.\r\nSelligent will provide you with a dedicated client ID and secret to authorize using OAuth.\r\n\r\nWith each API call, you will need to set request headers including your access key to authenticate yourself.\r\n\r\nThe client ID and secret carry significant privileges. Please ensure to keep them 100% secure.\r\nDo not share your Oauth client ID and Oauth client secret in publicly accessible areas such as versioning systems (GitHub, Bitbucket,... ) or client-side code.\r\n\r\n<!-- ReDoc-Inject: <security-definitions> -->\r\n\r\n## Errors\r\n\r\nSelligent uses the conventional HTTP response codes to indicate successful or failed API requests.\r\n\r\nCodes in the `2xx` range indicate success.\r\n\r\nCodes in the `4xx` range indicate an input related error or validation restrictions.\r\n\r\nCodes in the `5xx` range indicate an error with Selligent servers.\r\n\r\n| HTTP Status Codes          | Description                                                                        |\r\n| -------------------------- | ---------------------------------------------------------------------------------- |\r\n| 200 - OK                   | We found the request resource                                                      |\r\n| 201 - Created              | The resource is successfully created                                               |\r\n| 204 - No Content           | The requested resources is empty                                                   |\r\n| 400 - Bad Request          | There was an error with the request. The body of the response will have more info. |\r\n| 401 - Unauthorized         | The access key was incorrect                                                       |\r\n| 404 - Not found            | The resources cannot be found                                                      |\r\n| 405 - Method Not Allowed   | The method is not allowed                                                          |\r\n| 408 - Request Timeout      | The request is taking too long to respond                                          |\r\n| 409 - Conflict             | Something is conflicting the request                                               |\r\n| 422 - Unprocessable Entity | The resource couldn't be created                                                   |\r\n| 429 - Too Many Requests    | Too many requests hit the API too quickly                                          |\r\n| 5xx - Server errors        | Something went wrong on our end. Please try again                                  |\r\n\r\n### 400/422 - Bad / Validation request - WIP\r\n\r\nIn the case of a validation of bad request error, the body of the response includes a JSON formatted response that tells\r\nyou exactly what's wrong.\r\n\r\n#### Attributes - current - WIP\r\n\r\n| Attribute              | Type    | Description                                                                                                        |\r\n| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |\r\n| `title`                | String  | One of a server-defined set of error codes.                                                                        |\r\n| `status`               | Integer | An integer that represents the error type.                                                                         |\r\n| `traceId`              | String  | A reference ID to trace log within the SMC platform. This can be relevant for reporting to the support team.       |\r\n| `errors[]`             | Array   | An array of details about specific errors that led to this reported error.                                         |\r\n| `errors[] key`         | Integer | For some errors that could be handled programmatically, a short string indicating the error code reported.         |\r\n| `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. |\r\n\r\n```json\r\n{\r\n  \"type\": \"https://tools.ietf.org/html/rfc7231#section-6.5.1\",\r\n  \"title\": \"One or more validation errors occurred.\",\r\n  \"status\": 400,\r\n  \"traceId\": \"00-03f4894fecc1ae4498599fb8d5d16b5e-9d0a2aab93c57d41-00\",\r\n  \"errors\": {\r\n    \"Name\": [\"The Name field is required.\"],\r\n    \"ApiName\": [\"The ApiName field is required.\"]\r\n  }\r\n}\r\n```\r\n\r\n#### Attributes - proposal - WIP\r\n\r\n| Attribute          | Type    | Description                                                                                                        |\r\n| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------ |\r\n| `code`             | Integer | An integer that represents the error type.                                                                         |\r\n| `message`          | String  | A human readable error message.                                                                                    |\r\n| `traceId`          | String  | A reference ID to trace log within the SMC platform. This can be relevant for reporting to the support team.       |\r\n| `target`           | String  | The target in your request related to the error.                                                                   |\r\n| `details[]`        | Array   | An array of details about specific errors that led to this reported error.                                         |\r\n| `errors[].code`    | Integer | A short string indicating the error code reported, for some errors that could be handled programmatically.         |\r\n| `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. |\r\n| `errors[].target`  | String  | The target in your request related to the error if the error is specific.                                          |\r\n\r\n```json\r\n{\r\n  \"error\": {\r\n    \"code\": \"BadArgument\",\r\n    \"message\": \"Multiple errors in ContactInfo data\",\r\n    \"target\": \"ContactInfo\",\r\n    \"details\": [\r\n      {\r\n        \"code\": \"NullValue\",\r\n        \"target\": \"PhoneNumber\",\r\n        \"message\": \"Phone number must not be null\"\r\n      },\r\n      {\r\n        \"code\": \"NullValue\",\r\n        \"target\": \"LastName\",\r\n        \"message\": \"Last name must not be null\"\r\n      },\r\n      {\r\n        \"code\": \"MalformedValue\",\r\n        \"target\": \"Address\",\r\n        \"message\": \"Address is not valid\"\r\n      }\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n<!--## 5xx - Server errors-->\r\n\r\n# OpenAPI specification\r\n\r\nWe provide the API specification in the format of OpenApi files which can be found in the openapi/ directory:\r\n\r\n- OpenAPI 3.0 - JSON format\r\n  - <a href=\"https://getstarted.slgnt.io/engage/api/sdc-webhooks/openapi/sdc-webhooks-rest-v1.openapi.json\" target=\"_blank\">\r\n    sdc-webhooks-rest-v1.openapi.json</a>\r\n- OpenAPI 3.0 - YAML format\r\n  - <a href=\"https://getstarted.slgnt.io/engage/api/sdc-webhooks/openapi/sdc-webhooks-rest-v1.openapi.yaml\" target=\"_blank\">\r\n    sdc-webhooks-rest-v1.openapi.yaml</a>\r\n\r\n# Developer documentation\r\n\r\nThe Selligent API can provide very powerful manner for integrating, exchanging data and automating tasks. To facilitate\r\nwith the usage of the API, we have created a number of guides in our development webhooks.\r\n\r\nOur getting started guide will demonstrate for a number of basic use cases. It will refer to this API reference us to\r\nhighlight the implementation and refer to other information resources in Selligent that will be helpful for many other\r\nuse cases too.\r\n\r\n[Click here to visit our developer webhooks](https://getstarted.slgnt.io/engage/).\r\n\r\n# Postman collection\r\n\r\nTo get you up and running and provide a hands-on experience, we provide an up-to-date Postman collection of the SDC Webhooks API V1.\r\n\r\n\r\n\r\nImport the Postman collection through any of the methods specified below.\r\n\r\n\r\n- Use the link: <a href=\"https://getstarted.slgnt.io/engage/api/sdc-webhooks/postman/sdc-webhooks-rest-v1.postman.json\" target=\"_blank\">https://getstarted.slgnt.io/engage/api/sdc-webhooks/postman/sdc-webhooks-rest-v1.postman.json</a> via \"Import\" > \"Link\"\r\n- Download the file <a href=\"https://getstarted.slgnt.io/engage/api/sdc-webhooks/postman/sdc-webhooks-rest-v1.postman.json\" target=\"_blank\">sdc-webhooks-rest-v1.postman.json</a> and import the file via \"Import\" > \"File\"\r\n- Download the file <a href=\"https://getstarted.slgnt.io/engage/api/sdc-webhooks/postman/sdc-webhooks-rest-v1.postman.json\" target=\"_blank\">sdc-webhooks-rest-v1.postman.json</a> and copy the contents and paste in the \"Import\" > Paste \"Raw Text\" section.\r\n\r\nThis collection takes advantage of Postman variables and environments to store/access your Selligent Oauth Client key/secret and base\r\nURL.\r\n\n\nContact Support:\n Name: Team Selligent\n Email: info@zetaglobal.com",
      "type": "text/plain"
    }
  }
}