---
title: "Creates a new webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Creates a new webhook

`POST /webhooks`

Creates a new webhook

## Request body

- WebhookRequest
  - `types` string[]
  - `apiVersion` 'default' | '<YYYY-MM-DD>' — Indicates whether to use the current, default version of the API or the version specified by YYYY-MM-DD.
  - `enabled` boolean — Indicates whether the webhook is enabled and receives notifications.
  - `address` string, required — URL of the webhook endpoint on your server you have set up to receive webhook notifications. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.
  - `transportType` 'HTTP' | 'OAUTH'
  - `oauth` object
    - `tokenEndPoint` string, required — The token endpoint.
    - `userName` string — The user name to access the token endpoint.
    - `password` string — The password to access the token endpoint.
    - `clientID` string, required — The client identifier issued to the client during the [registration process](https://tools.ietf.org/html/rfc6749#section-2.3.1).
    - `clientSecret` string, required — The [client secret](https://tools.ietf.org/html/rfc6749#section-2.3.1).
    - `grantType` 'password' — OAUTH grant type
  - `authentication` object
    - `username` string — some_user_name
    - `password` string — some_secure_password

## Response `201`

201 Created

- Webhook
  - `id` string, uuid
  - `createdTime` string, date-time — Time at which the webhook was created
  - `updatedTime` string, date-time — Time at which the webhook was updated
  - `types` string[]
  - `apiVersion` 'default' | '<YYYY-MM-DD>' — Indicates whether the webhook is configured for the current, default version of the API or the version specified by YYYY-MM-DD.
  - `enabled` boolean — Indicate that webhook is enabled and receives notifications or is not enabled and does not receive notifications
  - `address` string — URL of the webhook endpoint on your server you have set up to receive webhook notifications. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.
  - `transportType` 'HTTP' | 'OAUTH'
  - `oauth` object
    - `tokenEndPoint` string, required — The token endpoint
    - `userName` string — The user name to access token endpoint.
    - `password` string — The password to access token endpoint.
    - `clientID` string, required — The client identifier issued to the client during the [registration process](https://tools.ietf.org/html/rfc6749#section-2.3.1).
    - `clientSecret` string, required — The [client secret](https://tools.ietf.org/html/rfc6749#section-2.3.1).
    - `grantType` 'password' — OAUTH grant type
  - `authentication` object
    - `username` string — some_user_name
    - `password` string — some_secure_password

## Other responses

- `400` — 400 Bad Request
- `401` — 401 Unauthorized
- `403` — 403 Forbidden
- `405` — 405 Method Not Allowed
- `406` — 406 Not Acceptable
- `408` — 408 Request Timeout
- `409` — 409 Conflict
- `429` — 429 Too Many Requests
- `500` — 500 Internal Server Error
- `502` — 502 Bad Gateway Error
- `503` — 503 Service Unavailable Error
- `504` — 504 Gateway Timeout Error

---

[API](https://skmtc.net/digitalriver/apis/digital-river-api-reference.md) · [All operations](https://skmtc.net/digitalriver/apis/digital-river-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalriver/digital-river-api-reference/revisions/f21981db32be/schema)
