> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equalsmoney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create webhooks

> Set up webhooks to receive real-time notifications about events on your accounts.

## Create a webhook

<Note>
  **POST** `/v2/webhooks`
</Note>

### Request

Use this request to create a new webhook for a given `webhookEventTypeName` or `webhookEventTypeId`.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    https://api.equalsmoney.com/v2/webhooks \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "sharedSecret": "123e4567-e89b-12d3-a456-426614174100",
      "enabled": true,
      "accountId": "F12345", 
      "webhookEventTypeName": "AccountActivated",
      "url": "YOUR_WEBHOOK_URL",
      "authorizationHeader": "YOUR_AUTHORIZATION_HEADER"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    https://api.equalsmoney.com/v2/webhooks \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "sharedSecret": "string",
      "enabled": boolean,
      "accountId": "string", 
      "webhookEventTypeId": "string",
      "url": "string",
      "authorizationHeader": "string"
    }'
  ```
</CodeGroup>

#### Request body schema

<ParamField body="sharedSecret" type="string (uuid)">
  When provided, we use this to generate a hash-based message authentication code (HMAC) using the SHA-256 algorithm. We Base64 encode this signature. Every event notification you receive for this webhook will include an `x-em-signature` header, if a shared secret has been provided. You can use this to verify the integrity and authenticity of the message.

  Allowable values: ≤ 36 characters
</ParamField>

<ParamField body="enabled" type="boolean" required>
  Whether or not the webhook should be enabled.

  Allowable values: `true`, `false`
</ParamField>

<ParamField body="accountId" type="string or null">
  The ID of the account. When provided, the webhook is scoped to the specified account and will only fire for events on that account. When omitted, the webhook is **global** and fires across all accounts in your multi-account configuration.

  Must be omitted for onboarding event types: `AccountActivated`, `IdentityVerificationRequest`, `KycInformationRequested`, `KybInformationRequested`, `ApplicationStatusUpdated`, `AccountStatusUpdated`. These are platform-level events that fire before an account exists.

  Allowable values: A valid `accountId`, or `null`
</ParamField>

<ParamField body="webhookEventTypeName" type="string (uuid)" required>
  The name of the webhook event type that you want to create a webhook for.

  Allowable values: `AccountCreated`, `AccountActivated`, `RecipientCreated`, `RecipientDeleted`, `BoxCredited`, `BoxDebited`, `OrderCreated`, `OrderCompleted`, `OrderCancelled`, `FeeCreated`, `3DSAuthRequest`, `CardTransaction`, `DigitalWalletTokenTransition`
</ParamField>

<ParamField body="webhookEventTypeId" type="string (uuid)" required>
  The ID of the webhook event type that you want to create a webhook for.

  Allowable values: ≤ 36 characters
</ParamField>

<ParamField body="url" type="string" required>
  The URL of your webhook endpoint.

  Allowable values: ≤ 512 characters
</ParamField>

<ParamField body="authorizationHeader" type="string or null">
  The authorisation header content for the webhook.

  Allowable values: ≤ 512 characters
</ParamField>

### Response

<CodeGroup>
  ```json Sample response theme={null}
  {
    "sharedSecret": "123e4567-e89b-12d3-a456-426614174000",
    "enabled": true,
    "accountId": "F12345",
    "webhookEventTypeId": "a4dcc403-41aa-4f2e-acf6-32dbaec78e72",
    "url": "https://api.url.com",
    "authorizationHeader": "Basic AXVubzpwQDU1dzByYM==",
    "id": "a4dcc403-41aa-4f2e-acf6-32dbaec78e72",
    "productId": "911db6db-ef58-4992-87cd-2fe2cfde05f9",
    "webhookEventTypeName": "AccountActivated",
    "createdAt": "2023-01-30T08:30:00Z",
    "updatedAt": "2023-01-30T08:30:00Z"
  }
  ```

  ```json Response structure theme={null}
  {
    "sharedSecret": "string",
    "enabled": boolean,
    "accountId": "string",
    "webhookEventTypeId": "string",
    "url": "string",
    "authorizationHeader": "string",
    "id": "string",
    "productId": "string",
    "webhookEventTypeName": "string",
    "createdAt": "string",
    "updatedAt": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/webhooks/create-a-new-webhook).
