# Webhook Configs

## Create Webhook Config

**post** `/api/v1/beta/webhook-configs`

Create a reusable webhook configuration for the current project.

### Query Parameters

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Body Parameters

- `webhook_url: string`

  URL to receive webhook POST notifications.

- `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

  Events to subscribe to. If null, all events are delivered. An empty list subscribes to nothing and is rejected.

  - `"batch.cancelled"`

  - `"batch.error"`

  - `"batch.pending"`

  - `"batch.running"`

  - `"batch.success"`

  - `"classify.cancelled"`

  - `"classify.error"`

  - `"classify.partial_success"`

  - `"classify.pending"`

  - `"classify.running"`

  - `"classify.success"`

  - `"extract.cancelled"`

  - `"extract.error"`

  - `"extract.partial_success"`

  - `"extract.pending"`

  - `"extract.success"`

  - `"parse.cancelled"`

  - `"parse.error"`

  - `"parse.partial_success"`

  - `"parse.pending"`

  - `"parse.running"`

  - `"parse.success"`

  - `"sheets.cancelled"`

  - `"sheets.error"`

  - `"sheets.partial_success"`

  - `"sheets.pending"`

  - `"sheets.success"`

  - `"split.cancelled"`

  - `"split.error"`

  - `"split.pending"`

  - `"split.processing"`

  - `"split.success"`

  - `"unmapped_event"`

- `webhook_headers: optional map[string]`

  Custom HTTP headers sent with each webhook request.

- `webhook_output_format: optional "json" or "string"`

  Response format sent to the webhook: 'string' (default) or 'json'.

  - `"json"`

  - `"string"`

- `webhook_signing_secret: optional string`

  Shared secret used to sign deliveries to this endpoint. Write-only: it is never returned in responses.

### Returns

- `WebhookConfigResponse object { id, has_secret, tenant_id, 7 more }`

  A stored webhook configuration. The signing secret is never included.

  - `id: string`

    Unique identifier for the webhook configuration.

  - `has_secret: boolean`

    Whether a signing secret is configured for this endpoint.

  - `tenant_id: string`

    Owner tenant ID.

  - `tenant_type: "project"`

    Owner tenant type.

    - `"project"`

  - `webhook_url: string`

    URL that receives webhook POST notifications.

  - `created_at: optional string`

    Creation datetime

  - `updated_at: optional string`

    Update datetime

  - `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

    Subscribed events (null = all events).

    - `"batch.cancelled"`

    - `"batch.error"`

    - `"batch.pending"`

    - `"batch.running"`

    - `"batch.success"`

    - `"classify.cancelled"`

    - `"classify.error"`

    - `"classify.partial_success"`

    - `"classify.pending"`

    - `"classify.running"`

    - `"classify.success"`

    - `"extract.cancelled"`

    - `"extract.error"`

    - `"extract.partial_success"`

    - `"extract.pending"`

    - `"extract.success"`

    - `"parse.cancelled"`

    - `"parse.error"`

    - `"parse.partial_success"`

    - `"parse.pending"`

    - `"parse.running"`

    - `"parse.success"`

    - `"sheets.cancelled"`

    - `"sheets.error"`

    - `"sheets.partial_success"`

    - `"sheets.pending"`

    - `"sheets.success"`

    - `"split.cancelled"`

    - `"split.error"`

    - `"split.pending"`

    - `"split.processing"`

    - `"split.success"`

    - `"unmapped_event"`

  - `webhook_headers: optional map[string]`

    Custom HTTP headers sent with each request.

  - `webhook_output_format: optional "json" or "string"`

    Response format sent to the webhook.

    - `"json"`

    - `"string"`

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v1/beta/webhook-configs \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
    -d '{
          "webhook_url": "https://example.com/webhooks/llamacloud"
        }'
```

#### Response

```json
{
  "id": "id",
  "has_secret": true,
  "tenant_id": "tenant_id",
  "tenant_type": "project",
  "webhook_url": "webhook_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "webhook_events": [
    "batch.cancelled"
  ],
  "webhook_headers": {
    "foo": "string"
  },
  "webhook_output_format": "json"
}
```

## List Webhook Configs

**get** `/api/v1/beta/webhook-configs`

List the webhook configurations for the current project, newest first.

### Query Parameters

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Returns

- `id: string`

  Unique identifier for the webhook configuration.

- `has_secret: boolean`

  Whether a signing secret is configured for this endpoint.

- `tenant_id: string`

  Owner tenant ID.

- `tenant_type: "project"`

  Owner tenant type.

  - `"project"`

- `webhook_url: string`

  URL that receives webhook POST notifications.

- `created_at: optional string`

  Creation datetime

- `updated_at: optional string`

  Update datetime

- `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

  Subscribed events (null = all events).

  - `"batch.cancelled"`

  - `"batch.error"`

  - `"batch.pending"`

  - `"batch.running"`

  - `"batch.success"`

  - `"classify.cancelled"`

  - `"classify.error"`

  - `"classify.partial_success"`

  - `"classify.pending"`

  - `"classify.running"`

  - `"classify.success"`

  - `"extract.cancelled"`

  - `"extract.error"`

  - `"extract.partial_success"`

  - `"extract.pending"`

  - `"extract.success"`

  - `"parse.cancelled"`

  - `"parse.error"`

  - `"parse.partial_success"`

  - `"parse.pending"`

  - `"parse.running"`

  - `"parse.success"`

  - `"sheets.cancelled"`

  - `"sheets.error"`

  - `"sheets.partial_success"`

  - `"sheets.pending"`

  - `"sheets.success"`

  - `"split.cancelled"`

  - `"split.error"`

  - `"split.pending"`

  - `"split.processing"`

  - `"split.success"`

  - `"unmapped_event"`

- `webhook_headers: optional map[string]`

  Custom HTTP headers sent with each request.

- `webhook_output_format: optional "json" or "string"`

  Response format sent to the webhook.

  - `"json"`

  - `"string"`

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v1/beta/webhook-configs \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
```

#### Response

```json
[
  {
    "id": "id",
    "has_secret": true,
    "tenant_id": "tenant_id",
    "tenant_type": "project",
    "webhook_url": "webhook_url",
    "created_at": "2019-12-27T18:11:19.117Z",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "webhook_events": [
      "batch.cancelled"
    ],
    "webhook_headers": {
      "foo": "string"
    },
    "webhook_output_format": "json"
  }
]
```

## Get Webhook Config

**get** `/api/v1/beta/webhook-configs/{config_id}`

Get a single webhook configuration by ID.

### Path Parameters

- `config_id: string`

### Query Parameters

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Returns

- `WebhookConfigResponse object { id, has_secret, tenant_id, 7 more }`

  A stored webhook configuration. The signing secret is never included.

  - `id: string`

    Unique identifier for the webhook configuration.

  - `has_secret: boolean`

    Whether a signing secret is configured for this endpoint.

  - `tenant_id: string`

    Owner tenant ID.

  - `tenant_type: "project"`

    Owner tenant type.

    - `"project"`

  - `webhook_url: string`

    URL that receives webhook POST notifications.

  - `created_at: optional string`

    Creation datetime

  - `updated_at: optional string`

    Update datetime

  - `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

    Subscribed events (null = all events).

    - `"batch.cancelled"`

    - `"batch.error"`

    - `"batch.pending"`

    - `"batch.running"`

    - `"batch.success"`

    - `"classify.cancelled"`

    - `"classify.error"`

    - `"classify.partial_success"`

    - `"classify.pending"`

    - `"classify.running"`

    - `"classify.success"`

    - `"extract.cancelled"`

    - `"extract.error"`

    - `"extract.partial_success"`

    - `"extract.pending"`

    - `"extract.success"`

    - `"parse.cancelled"`

    - `"parse.error"`

    - `"parse.partial_success"`

    - `"parse.pending"`

    - `"parse.running"`

    - `"parse.success"`

    - `"sheets.cancelled"`

    - `"sheets.error"`

    - `"sheets.partial_success"`

    - `"sheets.pending"`

    - `"sheets.success"`

    - `"split.cancelled"`

    - `"split.error"`

    - `"split.pending"`

    - `"split.processing"`

    - `"split.success"`

    - `"unmapped_event"`

  - `webhook_headers: optional map[string]`

    Custom HTTP headers sent with each request.

  - `webhook_output_format: optional "json" or "string"`

    Response format sent to the webhook.

    - `"json"`

    - `"string"`

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v1/beta/webhook-configs/$CONFIG_ID \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
```

#### Response

```json
{
  "id": "id",
  "has_secret": true,
  "tenant_id": "tenant_id",
  "tenant_type": "project",
  "webhook_url": "webhook_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "webhook_events": [
    "batch.cancelled"
  ],
  "webhook_headers": {
    "foo": "string"
  },
  "webhook_output_format": "json"
}
```

## Update Webhook Config

**put** `/api/v1/beta/webhook-configs/{config_id}`

Update a webhook configuration. Only fields present in the request change.

### Path Parameters

- `config_id: string`

### Query Parameters

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Body Parameters

- `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

  Updated event subscriptions. Omit to leave unchanged; [] is rejected.

  - `"batch.cancelled"`

  - `"batch.error"`

  - `"batch.pending"`

  - `"batch.running"`

  - `"batch.success"`

  - `"classify.cancelled"`

  - `"classify.error"`

  - `"classify.partial_success"`

  - `"classify.pending"`

  - `"classify.running"`

  - `"classify.success"`

  - `"extract.cancelled"`

  - `"extract.error"`

  - `"extract.partial_success"`

  - `"extract.pending"`

  - `"extract.success"`

  - `"parse.cancelled"`

  - `"parse.error"`

  - `"parse.partial_success"`

  - `"parse.pending"`

  - `"parse.running"`

  - `"parse.success"`

  - `"sheets.cancelled"`

  - `"sheets.error"`

  - `"sheets.partial_success"`

  - `"sheets.pending"`

  - `"sheets.success"`

  - `"split.cancelled"`

  - `"split.error"`

  - `"split.pending"`

  - `"split.processing"`

  - `"split.success"`

  - `"unmapped_event"`

- `webhook_headers: optional map[string]`

  Updated headers.

- `webhook_output_format: optional "json" or "string"`

  Updated output format.

  - `"json"`

  - `"string"`

- `webhook_signing_secret: optional string`

  Updated signing secret (write-only). Send to rotate the secret.

- `webhook_url: optional string`

  Updated webhook URL.

### Returns

- `WebhookConfigResponse object { id, has_secret, tenant_id, 7 more }`

  A stored webhook configuration. The signing secret is never included.

  - `id: string`

    Unique identifier for the webhook configuration.

  - `has_secret: boolean`

    Whether a signing secret is configured for this endpoint.

  - `tenant_id: string`

    Owner tenant ID.

  - `tenant_type: "project"`

    Owner tenant type.

    - `"project"`

  - `webhook_url: string`

    URL that receives webhook POST notifications.

  - `created_at: optional string`

    Creation datetime

  - `updated_at: optional string`

    Update datetime

  - `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

    Subscribed events (null = all events).

    - `"batch.cancelled"`

    - `"batch.error"`

    - `"batch.pending"`

    - `"batch.running"`

    - `"batch.success"`

    - `"classify.cancelled"`

    - `"classify.error"`

    - `"classify.partial_success"`

    - `"classify.pending"`

    - `"classify.running"`

    - `"classify.success"`

    - `"extract.cancelled"`

    - `"extract.error"`

    - `"extract.partial_success"`

    - `"extract.pending"`

    - `"extract.success"`

    - `"parse.cancelled"`

    - `"parse.error"`

    - `"parse.partial_success"`

    - `"parse.pending"`

    - `"parse.running"`

    - `"parse.success"`

    - `"sheets.cancelled"`

    - `"sheets.error"`

    - `"sheets.partial_success"`

    - `"sheets.pending"`

    - `"sheets.success"`

    - `"split.cancelled"`

    - `"split.error"`

    - `"split.pending"`

    - `"split.processing"`

    - `"split.success"`

    - `"unmapped_event"`

  - `webhook_headers: optional map[string]`

    Custom HTTP headers sent with each request.

  - `webhook_output_format: optional "json" or "string"`

    Response format sent to the webhook.

    - `"json"`

    - `"string"`

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v1/beta/webhook-configs/$CONFIG_ID \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \
    -d '{}'
```

#### Response

```json
{
  "id": "id",
  "has_secret": true,
  "tenant_id": "tenant_id",
  "tenant_type": "project",
  "webhook_url": "webhook_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "webhook_events": [
    "batch.cancelled"
  ],
  "webhook_headers": {
    "foo": "string"
  },
  "webhook_output_format": "json"
}
```

## Delete Webhook Config

**delete** `/api/v1/beta/webhook-configs/{config_id}`

Delete a webhook configuration.

### Path Parameters

- `config_id: string`

### Query Parameters

- `organization_id: optional string`

- `project_id: optional string`

### Cookie Parameters

- `session: optional string`

### Example

```http
curl https://api.cloud.llamaindex.ai/api/v1/beta/webhook-configs/$CONFIG_ID \
    -X DELETE \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
```

## Domain Types

### Webhook Config Create

- `WebhookConfigCreate object { webhook_url, webhook_events, webhook_headers, 2 more }`

  Request to create a stored webhook configuration.

  The owning tenant is taken from the request context (e.g. the project in the
  path), not the body.

  - `webhook_url: string`

    URL to receive webhook POST notifications.

  - `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

    Events to subscribe to. If null, all events are delivered. An empty list subscribes to nothing and is rejected.

    - `"batch.cancelled"`

    - `"batch.error"`

    - `"batch.pending"`

    - `"batch.running"`

    - `"batch.success"`

    - `"classify.cancelled"`

    - `"classify.error"`

    - `"classify.partial_success"`

    - `"classify.pending"`

    - `"classify.running"`

    - `"classify.success"`

    - `"extract.cancelled"`

    - `"extract.error"`

    - `"extract.partial_success"`

    - `"extract.pending"`

    - `"extract.success"`

    - `"parse.cancelled"`

    - `"parse.error"`

    - `"parse.partial_success"`

    - `"parse.pending"`

    - `"parse.running"`

    - `"parse.success"`

    - `"sheets.cancelled"`

    - `"sheets.error"`

    - `"sheets.partial_success"`

    - `"sheets.pending"`

    - `"sheets.success"`

    - `"split.cancelled"`

    - `"split.error"`

    - `"split.pending"`

    - `"split.processing"`

    - `"split.success"`

    - `"unmapped_event"`

  - `webhook_headers: optional map[string]`

    Custom HTTP headers sent with each webhook request.

  - `webhook_output_format: optional "json" or "string"`

    Response format sent to the webhook: 'string' (default) or 'json'.

    - `"json"`

    - `"string"`

  - `webhook_signing_secret: optional string`

    Shared secret used to sign deliveries to this endpoint. Write-only: it is never returned in responses.

### Webhook Config Response

- `WebhookConfigResponse object { id, has_secret, tenant_id, 7 more }`

  A stored webhook configuration. The signing secret is never included.

  - `id: string`

    Unique identifier for the webhook configuration.

  - `has_secret: boolean`

    Whether a signing secret is configured for this endpoint.

  - `tenant_id: string`

    Owner tenant ID.

  - `tenant_type: "project"`

    Owner tenant type.

    - `"project"`

  - `webhook_url: string`

    URL that receives webhook POST notifications.

  - `created_at: optional string`

    Creation datetime

  - `updated_at: optional string`

    Update datetime

  - `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

    Subscribed events (null = all events).

    - `"batch.cancelled"`

    - `"batch.error"`

    - `"batch.pending"`

    - `"batch.running"`

    - `"batch.success"`

    - `"classify.cancelled"`

    - `"classify.error"`

    - `"classify.partial_success"`

    - `"classify.pending"`

    - `"classify.running"`

    - `"classify.success"`

    - `"extract.cancelled"`

    - `"extract.error"`

    - `"extract.partial_success"`

    - `"extract.pending"`

    - `"extract.success"`

    - `"parse.cancelled"`

    - `"parse.error"`

    - `"parse.partial_success"`

    - `"parse.pending"`

    - `"parse.running"`

    - `"parse.success"`

    - `"sheets.cancelled"`

    - `"sheets.error"`

    - `"sheets.partial_success"`

    - `"sheets.pending"`

    - `"sheets.success"`

    - `"split.cancelled"`

    - `"split.error"`

    - `"split.pending"`

    - `"split.processing"`

    - `"split.success"`

    - `"unmapped_event"`

  - `webhook_headers: optional map[string]`

    Custom HTTP headers sent with each request.

  - `webhook_output_format: optional "json" or "string"`

    Response format sent to the webhook.

    - `"json"`

    - `"string"`

### Webhook Config List Response

- `WebhookConfigListResponse = array of WebhookConfigResponse`

  - `id: string`

    Unique identifier for the webhook configuration.

  - `has_secret: boolean`

    Whether a signing secret is configured for this endpoint.

  - `tenant_id: string`

    Owner tenant ID.

  - `tenant_type: "project"`

    Owner tenant type.

    - `"project"`

  - `webhook_url: string`

    URL that receives webhook POST notifications.

  - `created_at: optional string`

    Creation datetime

  - `updated_at: optional string`

    Update datetime

  - `webhook_events: optional array of "batch.cancelled" or "batch.error" or "batch.pending" or 30 more`

    Subscribed events (null = all events).

    - `"batch.cancelled"`

    - `"batch.error"`

    - `"batch.pending"`

    - `"batch.running"`

    - `"batch.success"`

    - `"classify.cancelled"`

    - `"classify.error"`

    - `"classify.partial_success"`

    - `"classify.pending"`

    - `"classify.running"`

    - `"classify.success"`

    - `"extract.cancelled"`

    - `"extract.error"`

    - `"extract.partial_success"`

    - `"extract.pending"`

    - `"extract.success"`

    - `"parse.cancelled"`

    - `"parse.error"`

    - `"parse.partial_success"`

    - `"parse.pending"`

    - `"parse.running"`

    - `"parse.success"`

    - `"sheets.cancelled"`

    - `"sheets.error"`

    - `"sheets.partial_success"`

    - `"sheets.pending"`

    - `"sheets.success"`

    - `"split.cancelled"`

    - `"split.error"`

    - `"split.pending"`

    - `"split.processing"`

    - `"split.success"`

    - `"unmapped_event"`

  - `webhook_headers: optional map[string]`

    Custom HTTP headers sent with each request.

  - `webhook_output_format: optional "json" or "string"`

    Response format sent to the webhook.

    - `"json"`

    - `"string"`
