# Create Subscription

Creates a webhook subscription for the specified event types and the given URL.

Endpoint: POST /api/v1/subscriptions/
Version: Version: b6359d9a
Security: HTTPBearer

## Header parameters:

  - `x-jiko-idempotency` (string, required)

  - `x-jiko-signature` (string, required)

## Request fields (application/json):

  - `description` (string)
    A description of the webhook's intended use.

  - `events` (array, required)
    Which types of events this webhook should be invoked for.

  - `url` (string, required)
    The webhook URL to invoke.

  - `retry_policy` (any)
    The retry policy to use if Jiko encounters HTTP errors when calling subscription URLs.

  - `shared_secret` (string, required)
    The shared secret used by the Partner API to sign requests made to the webhook. The shared secret needs to be minimum 16 characters long.

## Response 201 fields (application/json):

  - `description` (string)
    A description of the webhook's intended use.

  - `events` (array, required)
    Which types of events this webhook should be invoked for.

  - `url` (string, required)
    The webhook URL to invoke.

  - `retry_policy` (any)
    The retry policy to use if Jiko encounters HTTP errors when calling subscription URLs.

  - `id` (string, required)

  - `time_created` (string, required)

  - `updated_at` (string, required)

  - `status` (string, required)
    Enum: "enabled", "disabled"

  - `object_type` (string, required)

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array, required)

  - `detail.msg` (string, required)

  - `detail.type` (string, required)


## Response 404 fields
