---
title: "Create Event Subscription"
method: POST
path: "/eventSubscriptions"
tags: ["Event Subscriptions"]
---

# Create Event Subscription

`POST /eventSubscriptions`

## Request

- Base URL: `https://eu-west-1.api.silverflow.com/v1`
- URL: `https://eu-west-1.api.silverflow.com/v1/eventSubscriptions`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/silverflow/apis/silverflow-api/docs/eventSubscriptions/post.ts> (a function with typed inputs; its response is checked against the schema)

This operation creates a new Event Subscription for the given event source.
When the subscription is created successfully, a test event will be sent to the `targetUrl`.

Requires `eventSubscriptions:Create` permission.

## Request body

- EventSubscriptionCreate
  - `description` string
  - `eventSource` 'https://silverflow.com/charges' | 'https://silverflow.com/clearing' | 'https://silverflow.com/complianceCases' | 'https://silverflow.com/currencyRates' | 'https://silverflow.com/disputes' | 'https://silverflow.com/documents' | 'https://silverflow.com/enrollments' | 'https://silverflow.com/fraudNotifications' | 'https://silverflow.com/networkTokens' | 'https://silverflow.com/processorTokens' | 'https://silverflow.com/reconciliation' | 'https://silverflow.com/reports' | 'https://silverflow.com/distributions' | 'https://silverflow.com/ammfSubmissions', required
  - `targetUrl` string, required: A valid URL

## Response `201`

The created Event Subscription

- EventSubscription
  - `key` string, required
  - `agentKey` string, required: Uniquely identifies an Agent
  - `status` 'active' | 'archived', required: The status of the Event Subscription
  - `description` string
  - `eventSource` string, required: A valid URL
  - `eventDataSchema` string, required: A valid URL
  - `targetUrl` string, required: A valid URL
  - `created` string, date-time, required: The date and time this object was created
  - `lastModified` string, date-time: The date and time this object was last modified
  - `version` integer, required: The version of this object

## Other responses

- `400`: The request was malformed. See the response body for details
- `401`: Authentication information is missing or invalid
- `403`: The authenticated client is forbidden to make the request for the resource identified.
- `429`: The number of requests (per minute) has exceeded the configured maximum

---

[API](https://skmtc.dev/silverflow/apis/silverflow-api.md) - [All operations](https://skmtc.dev/silverflow/apis/silverflow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/silverflow/apis/silverflow-api/revisions/43ecbe4fd6ea?raw)
