# CreateWebhookSubscription

Create a subscription to events

`POST /webhooks/subscriptions`

**API:** Avalara E-Invoicing API
**Tag:** Subscriptions
**API Version:** 1.3
**Base URL:** https://api.sbx.avalara.com/einvoicing
**Authentication:** Bearer token

Source: https://developer.avalara.com/products/e-invoicing/api/v1.3/methods/Subscriptions/CreateWebhookSubscription/

## Description

Create a subscription to events exposed by registered systems.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |
| `undefined` |  |  | No |  |

## Request Body

**Content-Type:** `application/json`
**Schema:** `SubscriptionRegistration`

## Responses

| Status | Description | Schema |
|---|---|---|
| 201 | Subscribed successfully | `SuccessResponse` |
| 400 | Invalid input | `WebhooksErrorResponse` |
| 401 | Not authenticated | `WebhooksErrorResponse` |
| 403 | Access token does not have the required scope | `WebhooksErrorResponse` |

### 201 Response: `SuccessResponse`

Indicates a successful outcome of an API operation, including a generated ID and success message.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | string | No | Unique identifier for the new or updated entity. Example: `78f6caaa-6988-4862-bd11-e52906b31b72`. |
| `message` | string | No | Success message Example: `Webhook subscription created successfully`. |

## Example Request

```bash
curl -X POST "https://api.sbx.avalara.com/einvoicing/webhooks/subscriptions" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '{
  "description": "Basic webhook configuration without signature",
  "notificationUrl": "https://webhook.example.com/notifications",
  "signature": {
    "type": "none"
  },
  "events": [
    {
      "eventName": "document.complete"
    }
  ]
}'
```