{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-develop/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Webhook","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhook","__idx":0},"children":["Webhook"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhooks allow your application to receive asynchronous notifications when an AI task completes with either a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," status. Notifications are sent to an HTTP endpoint you control and follow the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/standard-webhooks/standard-webhooks/blob/main/spec/standard-webhooks.md"},"children":["Standard Webhooks Specification"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"webhook-secret","__idx":1},"children":["Webhook Secret"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"construction-of-webhook-secret","__idx":2},"children":["Construction of Webhook Secret"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We use ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HMAC-SHA256"]}," signature schme webhook secret, and webhook secret is base64 encoded, prefixed with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["whsec_"]}," for easy identification."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example webhook secret:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["whsec_NDQzMzYxNzkzMzE0NjYyNDM6OTIxOTcwNDIxODQ"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"implement-webhook-with-standard-webhooks-library","__idx":3},"children":["Implement Webhook with Standard Webhooks Library"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We strongly recommend using an official implementation of the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standard Webhooks Library"]},", and you do not have to worry about the signature validation details."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Using an official implementation also ensures secure and correct signature validation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/standard-webhooks/standard-webhooks/tree/main?tab=readme-ov-file#reference-implementations"},"children":["https://github.com/standard-webhooks/standard-webhooks/tree/main?tab=readme-ov-file#reference-implementations"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"implement-webhook-by-yourself","__idx":4},"children":["Implement Webhook by Yourself"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please carefully understand the construction of the webhook secret, refer to Symmetric part of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/standard-webhooks/standard-webhooks/blob/main/spec/standard-webhooks.md#signature-scheme"},"children":["Signature scheme"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you are trying to sign signature input, please remove the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["whsec_"]}," prefix and base64 decode the remaining string to obtain the actual bytes of secret to do ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HMAC-SHA256"]}," hash."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"webhook-request-example","__idx":5},"children":["Webhook Request Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST https://yourdomain.com/webhook-endpoint\nContent-Type: application/json\nwebhook-id: msg_1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4:1761112848\nwebhook-timestamp: 1761112900\nwebhook-signature: v1,vyVNWrjoZcBK1JXrFGkdDKK2slo5+Q5yfzpkHmqO5R0=\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"created_at\": 1761112848,\n  \"data\": {\n    \"task_id\": \"1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4\",\n    \"task_status\": \"success\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"http-headers","__idx":6},"children":["HTTP Headers"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"webhook-id","__idx":7},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhook-id"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A unique identifier for the webhook delivery."," ","This value remains consistent across retries and should be used for idempotency handling."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"webhook-timestamp","__idx":8},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhook-timestamp"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Unix epoch timestamp (seconds) when the webhook was sent."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"webhook-signature","__idx":9},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhook-signature"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["'v1' followed by a comma (,), followed by the base64 encoded ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HMAC-SHA256"]}," signature."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["'v1' indicates the version of the signature scheme, and is currently the only supported version."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The base64 encoded ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HMAC-SHA256"]}," signature is the result of signing signature input using your webhook secret."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Signature input format:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{webhook-id}.{webhook-timestamp}.{raw-minified-json-body}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example signed content:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"msg_1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4:1761112848.1761112900.{\"created_at\":1761112848,\"data\":{\"task_id\":\"1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4\",\"task_status\":\"success\"}}\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-body","__idx":10},"children":["Request Body"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"created_at","__idx":11},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["created_at"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Unix epoch timestamp (seconds) indicating when the task completed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"data","__idx":12},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Contains the event payload."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The task identifier returned when the task was created. Use this ID to query the final task result."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Task completion status. Possible values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"integration-guide","__idx":13},"children":["Integration Guide"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"webhook-integration-guide","__idx":14},"children":["Webhook Integration Guide"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Prepare a webhook endpoint on your server."]}," ","Ensure the endpoint accepts ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," requests and is accessible via HTTPS."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create a webhook in the API Console."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run an AI task and record the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]},"."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Process webhook notifications using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," to retrieve task results."]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"creating-a-webhook-endpoint","__idx":15},"children":["Creating a Webhook Endpoint"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Visit the API Console's Webhook Management page:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://yce.makeupar.com/api-console/en/webhook/"},"children":["https://yce.makeupar.com/api-console/en/webhook/"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"1-locate-the-webhook-section","__idx":16},"children":["1. Locate the Webhook Section"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/webhook_main_bae171663b.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"2-create-a-new-webhook-endpoint","__idx":17},"children":["2. Create a New Webhook Endpoint"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/webhook_create_cd28e68fa3.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You may configure up to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["10 webhook endpoints"]}," concurrently."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"3-secure-your-webhook-secret","__idx":18},"children":["3. Secure Your Webhook Secret"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your webhook secret is used to validate the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webhook-signature"]},"."," ","Keep it safe and never expose it publicly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/webhook_secret_key_6fe757a7de.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"4-manage-existing-webhooks","__idx":19},"children":["4. Manage Existing Webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/webhook_manage_endpoints_3bed715de9.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"verify-signature","__idx":20},"children":["Verify Signature"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"handling-webhook-requests-on-your-server","__idx":21},"children":["Handling Webhook Requests on Your Server"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We recommend using an official implementation of the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standard Webhooks Library"]},":"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/standard-webhooks/standard-webhooks/tree/main?tab=readme-ov-file#reference-implementations"},"children":["https://github.com/standard-webhooks/standard-webhooks/tree/main?tab=readme-ov-file#reference-implementations"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This ensures secure and correct signature validation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also test or debug payloads using the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standard Webhooks Simulator"]},":"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.standardwebhooks.com/simulate"},"children":["https://www.standardwebhooks.com/simulate"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"verifying-webhook-signatures","__idx":22},"children":["Verifying Webhook Signatures"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Consider the webhook request example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST https://yourdomain.com/webhook-endpoint\nContent-Type: application/json\nwebhook-id: msg_1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4:1761112848\nwebhook-timestamp: 1761112900\nwebhook-signature: v1,vyVNWrjoZcBK1JXrFGkdDKK2slo5+Q5yfzpkHmqO5R0=\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Request body:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"created_at\": 1761112848,\n  \"data\": {\n    \"task_id\": \"1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4\",\n    \"task_status\": \"success\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Signature input format will be like:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{webhook-id}.{webhook-timestamp}.{raw-minified-json-body}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example signed content:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"msg_1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4:1761112848.1761112900.{\"created_at\":1761112848,\"data\":{\"task_id\":\"1eWPv9cWJCnEP99UJncmVJ6KjK_xVXRhZPe_eSGnRNbLlXEPjiG3gb3Usg9le3_4\",\"task_status\":\"success\"}}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Veriry HMAC-SHA256 encrypted signed content using your webhook secret key with the received webhook-signature."," ","Example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"v1,vyVNWrjoZcBK1JXrFGkdDKK2slo5+Q5yfzpkHmqO5R0=\n"},"children":[]}]},"headings":[{"value":"Webhook","id":"webhook","depth":1},{"value":"Webhook Secret","id":"webhook-secret","depth":4},{"value":"Construction of Webhook Secret","id":"construction-of-webhook-secret","depth":5},{"value":"Implement Webhook with Standard Webhooks Library","id":"implement-webhook-with-standard-webhooks-library","depth":5},{"value":"Implement Webhook by Yourself","id":"implement-webhook-by-yourself","depth":5},{"value":"Webhook Request Example","id":"webhook-request-example","depth":4},{"value":"HTTP Headers","id":"http-headers","depth":4},{"value":"webhook-id","id":"webhook-id","depth":5},{"value":"webhook-timestamp","id":"webhook-timestamp","depth":5},{"value":"webhook-signature","id":"webhook-signature","depth":5},{"value":"Request Body","id":"request-body","depth":4},{"value":"created_at","id":"created_at","depth":5},{"value":"data","id":"data","depth":5},{"value":"Integration Guide","id":"integration-guide","depth":2},{"value":"Webhook Integration Guide","id":"webhook-integration-guide","depth":3},{"value":"Creating a Webhook Endpoint","id":"creating-a-webhook-endpoint","depth":4},{"value":"1. Locate the Webhook Section","id":"1-locate-the-webhook-section","depth":5},{"value":"2. Create a New Webhook Endpoint","id":"2-create-a-new-webhook-endpoint","depth":5},{"value":"3. Secure Your Webhook Secret","id":"3-secure-your-webhook-secret","depth":5},{"value":"4. Manage Existing Webhooks","id":"4-manage-existing-webhooks","depth":5},{"value":"Verify Signature","id":"verify-signature","depth":2},{"value":"Handling Webhook Requests on Your Server","id":"handling-webhook-requests-on-your-server","depth":4},{"value":"Verifying Webhook Signatures","id":"verifying-webhook-signatures","depth":4}],"frontmatter":{"seo":{"title":"Webhook"}},"lastModified":"2026-03-10T09:00:01.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/develop/webhook","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}