---
title: "Create Webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Create Webhook

`POST /webhooks`

Create a webhook endpoint.

## Request body

- WebhookPostRequest
  - `name` string, required — Name of the webhook endpoint
  - `url` string, required — URL of webhook, must begin with https://
  - `eventTypes` RefWebhookEventType[], required
  - `active` boolean, required — Whether to set this webhook active to received events
  - `includePayload` boolean — Whether to put all datapoints' payload into the events(TASK_FINISHED, ACCOUNT_SNYC_TASK_FINISHED)
  - `secret` string, required — The key that will be used to generate HMAC-SHA512 hex digest value in the Smile-Signature header.

## Response `200`

OK

- WebhookPostResponse
  - `code` 'OK' | 'CREATED' | 'INVALID_CREDENTIALS' | 'INVALID_PARAMETERS' | 'INVALID_TOKEN' | 'UNAUTHORIZED_ACCESS' | 'MISSING_RESOURCE' | 'REQUEST_LIMIT_EXCEEDED' | 'SERVER_ERROR' | 'UNSUPPORTED_METHOD' | 'SERVER_UNAVAILABLE' | 'TIME_LIMIT_EXCEEDED' — Request status code
  - `message` string — Message response to the request
  - `requestId` string — Unique ID that is added to the body of every response for easy traceability of the request in our logs.
  - `data` Webhook — Receive event notifications via Webhooks.
    - `id` string, required — Unique ID of this object
    - `createdAt` string, date-time, required — Date and time
    - `name` string, required — Name of the webhook endpoint
    - `url` string, required — URL of webhook, must begin with https://
    - `secret` string — The key that will be used to generate HMAC-SHA512 hex digest value in the Smile-Signature header.
    - `eventTypes` RefWebhookEventType[], required — Special events that you want to subscribe to
    - `active` boolean, required — Set to true or false depending on if you would like to enable this webhook or not
    - `includePayload` boolean — Whether to put all datapoints' payload into the events(TASK_FINISHED_EVENT, ACCOUNT_SNYC_TASK_FINISHED_EVENT)
    - `updatedAt` string, date-time, required — Date and time

## Other responses

- `400` — Standard error response
- `401` — Standard error response
- `403` — Standard error response
- `404` — Standard error response
- `415` — Standard error response
- `429` — Standard error response
- `500` — Standard error response
- `501` — Standard error response
- `503` — Standard error response
- `504` — Standard error response

---

[API](https://skmtc.dev/smileapi/apis/smile-api.md) · [All operations](https://skmtc.dev/smileapi/apis/smile-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smileapi/smile-api/revisions/4f4b86b82632/schema)
