cs-icon.svg

Send Concise Webhook Payload

While creating or updating a webhook, Contentstack allows you to send a concise JSON payload to the specified URL whenever the selected event occurs.

To send a concise webhook payload, log in to Contentstack, go to your stack, and perform the following steps:

  1. Click the “Settings” icon (press “S”) on the left navigation panel, and select Webhooks (press “alt + W” for Windows OS, and “option + W” for Mac OS). You will notice a list of existing webhooks.
  2. Click the webhook you want to edit to view its details.
  3. On the webhook page, check the Send Concise Payload checkbox to allow the webhook to return a concise JSON payload.Send_Concise_Webhook_Payload_1_no_highlight.png
  4. To view the concise payload sent by a webhook, open the Logs tab and click the Call Details link.

Examples

Here's an example of a comprehensive JSON payload that a webhook sends in the response body when trying to update an existing entry in a content type:

Without "Send Concise Payload"
{
  "url":"https://localhost:8000",
  "method":"POST",
  "headers":{
    "Content-Type":"application/json",
    "User-Agent":"Contentstack",
    "X-Contentstack-Request-Signature":"1ff17c4025603aa04150241e400439cf18a57d02",
    "custom":"testing",
    "Authorization":"Basic dGVzdDp0ZXN0aW5n"
  },
  "body":{
    "module":"entry",
    "api_key":"blt38776c9acaae33b3",
    "data":{
      "entry":{
        "title":"Samle Entry",
        "body":"<p><a href=\"/privacy\">Privacy</a>  <a href=\"/about_us\">About</a> | Copyright@2021</p>",
        "tags":[
          "footer",
          "header",
          "asd",
          "new",
          "one"
        ],
        "locale":"en-us",
        "uid":"blt36952eb1aa651010",
        "created_by":"blt1e6dead9f06f1560",
        "updated_by":"blt6563a9b067fc1bc9",
        "created_at":"2019-02-15T06:01:22.976Z",
        "updated_at":"2020-10-14T14:51:16.850Z",
        "ACL":{

        },
        "_version":8,
        "_in_progress":false,
        "reference":[
          {
            "uid":"blt67670c9c4c111b0d",
            "_content_type_uid":"eloqua"
          },
          {
            "uid":"blt89e57ca70a1ce997",
            "_content_type_uid":"header"
          },
          {
            "uid":"blt36952eb1aa651010",
            "_content_type_uid":"footer"
          }
        ],
        "oneref":[

        ],
        "file":{
          "uid":"blt98ad72d1484d6cc7",
          "created_at":"2020-02-27T12:23:46.359Z",
          "updated_at":"2020-02-27T12:23:46.359Z",
          "created_by":"blt42e55757d70d5f81026a2b9f",
          "updated_by":"blt42e55757d70d5f81026a2b9f",
          "content_type":"image/png",
          "file_size":"85734",
          "tags":[

          ],
          "filename":"Developer's Guide.png",
          "url":"https://images.contentstack.io/v3/assets/blt38776c9acaae33b3/blt98ad72d1484d6cc7/5e57b4d209113f0d3a8525bf/download",
          "ACL":[

          ],
          "is_dir":false,
          "parent_uid":null,
          "_version":1,
          "title":"Developer's Guide.png"
        }
      },
      "content_type":{
        "created_at":"2019-02-15T06:01:07.706Z",
        "created_by":"blt1e6dead9f06f1560",
        "updated_at":"2020-09-16T16:54:58.986Z",
        "updated_by":"blt6563a9b067fc1bc9",
        "title":"Footer",
        "uid":"footer",
        "description":"",
        "schema":[
          {
            "display_name":"Title",
            "uid":"title",
            "data_type":"text",
            "mandatory":true,
            "unique":true,
            "field_metadata":{
              "_default":true
            },
            "multiple":false,
            "non_localizable":false,
            "indexed":false,
            "inbuilt_model":false
          },
          {
            "data_type":"text",
            "display_name":"Body",
            "uid":"body",
            "field_metadata":{
              "allow_rich_text":true,
              "description":"",
              "multiline":false,
              "rich_text_type":"advanced",
              "options":[

              ],
              "version":1
            },
            "multiple":false,
            "mandatory":false,
            "unique":false,
            "non_localizable":false,
            "indexed":false,
            "inbuilt_model":false
          },
          {
            "data_type":"reference",
            "display_name":"Reference",
            "reference_to":[
              "eloqua",
              "footer",
              "header"
            ],
            "field_metadata":{
              "ref_multiple":true,
              "ref_multiple_content_types":true
            },
            "uid":"reference",
            "multiple":false,
            "mandatory":false,
            "unique":false,
            "non_localizable":false,
            "indexed":false,
            "inbuilt_model":false
          },
          {
            "data_type":"reference",
            "display_name":"oneref",
            "reference_to":"header",
            "field_metadata":{
              "ref_multiple":false
            },
            "uid":"oneref",
            "multiple":false,
            "mandatory":false,
            "unique":false,
            "non_localizable":false,
            "indexed":false,
            "inbuilt_model":false
          },
          {
            "data_type":"file",
            "display_name":"File",
            "uid":"file",
            "extensions":[

            ],
            "field_metadata":{
              "description":"",
              "rich_text_type":"standard"
            },
            "multiple":false,
            "mandatory":false,
            "unique":false,
            "indexed":false,
            "inbuilt_model":false,
            "non_localizable":false
          }
        ],
        "options":{
          "is_page":false,
          "singleton":true,
          "title":"title",
          "sub_title":[

          ]
        }
      }
    },
    "event":"update",
    "triggered_at":"2020-10-14T14:51:37.045Z"
  }
}


Here's an example of a concise JSON payload that a webhook sends in the response body when trying to update an existing entry in a content type:

With "Send Concise Payload"
{
  "url":"https://localhost:8000",
  "method":"POST",
  "headers":{
    "Content-Type":"application/json",
    "User-Agent":"Contentstack",
    "X-Contentstack-Request-Signature":"d33bec09607f6aa70d64e076a835bb6d1ff32e8c",
    "custom":"testing",
    "Authorization":"Basic dGVzdDp0ZXN0aW5n"
  },
  "body":{
    "module":"entry",
    "api_key":"blt38776c9acaae33b3",
    "event":"update",
    "triggered_at":"2020-10-14T14:40:54.157Z",
    "data":{
      "entry":{
        "uid":"blt36952eb1aa651010",
        "title":"Samle Entry",
        "locale":"en-us",
        "_version":7
      },
      "content_type":{
        "uid":"footer",
        "title":"Footer"
      }
    }
  }
}

API Reference

To send concise webhook payload while creating or updating a webhook via API, refer to the following API requests:

Was this article helpful?
^