---
title: "Create Event Subscription"
method: POST
path: "/notifications/event-subscriptions"
tags: ["Notifications"]
---

# Create Event Subscription

`POST /notifications/event-subscriptions`

Used to subscribe to notifications relating to a specified event type.

## Headers

- `sub-application` string, uuid

## Request body

- EventSubscriptionRequest
  - `eventTypeId` string, required — Unique identifier of the event type (for which notifications will be sent). Allowed values: payment.status, payment.status.completed, payment.isoStatus
  - `notification` Notification, required — Subscription details for how and where to receive notifications.
    - `type` string, required — How the notification will be delivered. This is currently only via WEBHOOK.
    - `url` string, required — URL to which the notification will be sent.

## Response `201`

Event subscription created successfully

- ApiResponseOfEventSubscriptionResponse
  - `meta` ResponseMeta
    - `tracingId` string
  - `data` EventSubscriptionResponse
    - `eventTypeId` string, required — Unique identifier of the event type (for which notifications will be sent)
    - `applicationId` string, uuid, required — Application related to event subscription.
    - `created` string, required — Creation date of event subscription.
    - `notification` Notification, required — Subscription details for how and where to receive notifications.
      - `type` string, required — How the notification will be delivered. This is currently only via WEBHOOK.
      - `url` string, required — URL to which the notification will be sent.
  - `links` object
  - `forwardedData` ResponseForwardedData[]
    - `headers` object
    - `url` string
  - `raw` RawResponse[]
    - `request` RawRequest
      - `method` string
      - `url` string
      - `requestInstant` string, date-time
      - `headers` object
      - `body` object
      - `bodyParameters` object
      - `startTime` string, date-time
      - `startedAt` string, date-time
    - `duration` string, iso8601
    - `headers` object
    - `resultCode` integer
    - `result` object
  - `tracingId` string

## Other responses

- `400` — Bad request for missing required properties
- `401` — Unauthorized
- `409` — Event subscription already exist for the application

---

[API](https://skmtc.net/yapily/apis/yapily-api.md) · [All operations](https://skmtc.net/yapily/apis/yapily-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/yapily/yapily-api/versions/a8ca54f9eb9f/schema)
