# Webhook Configs

## Create Webhook Config

`client.WebhookConfigs.New(ctx, params) (*WebhookConfigResponse, error)`

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

Create a reusable webhook configuration for the current project.

### Parameters

- `params WebhookConfigNewParams`

  - `WebhookConfigCreate param.Field[WebhookConfigCreate]`

    Body param: 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.

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

### Returns

- `type WebhookConfigResponse struct{…}`

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

  - `ID string`

    Unique identifier for the webhook configuration.

  - `HasSecret bool`

    Whether a signing secret is configured for this endpoint.

  - `TenantID string`

    Owner tenant ID.

  - `TenantType Project`

    Owner tenant type.

    - `const ProjectProject Project = "project"`

  - `WebhookURL string`

    URL that receives webhook POST notifications.

  - `CreatedAt Time`

    Creation datetime

  - `UpdatedAt Time`

    Update datetime

  - `WebhookEvents []string`

    Subscribed events (null = all events).

    - `const WebhookConfigResponseWebhookEventBatchCancelled WebhookConfigResponseWebhookEvent = "batch.cancelled"`

    - `const WebhookConfigResponseWebhookEventBatchError WebhookConfigResponseWebhookEvent = "batch.error"`

    - `const WebhookConfigResponseWebhookEventBatchPending WebhookConfigResponseWebhookEvent = "batch.pending"`

    - `const WebhookConfigResponseWebhookEventBatchRunning WebhookConfigResponseWebhookEvent = "batch.running"`

    - `const WebhookConfigResponseWebhookEventBatchSuccess WebhookConfigResponseWebhookEvent = "batch.success"`

    - `const WebhookConfigResponseWebhookEventClassifyCancelled WebhookConfigResponseWebhookEvent = "classify.cancelled"`

    - `const WebhookConfigResponseWebhookEventClassifyError WebhookConfigResponseWebhookEvent = "classify.error"`

    - `const WebhookConfigResponseWebhookEventClassifyPartialSuccess WebhookConfigResponseWebhookEvent = "classify.partial_success"`

    - `const WebhookConfigResponseWebhookEventClassifyPending WebhookConfigResponseWebhookEvent = "classify.pending"`

    - `const WebhookConfigResponseWebhookEventClassifyRunning WebhookConfigResponseWebhookEvent = "classify.running"`

    - `const WebhookConfigResponseWebhookEventClassifySuccess WebhookConfigResponseWebhookEvent = "classify.success"`

    - `const WebhookConfigResponseWebhookEventExtractCancelled WebhookConfigResponseWebhookEvent = "extract.cancelled"`

    - `const WebhookConfigResponseWebhookEventExtractError WebhookConfigResponseWebhookEvent = "extract.error"`

    - `const WebhookConfigResponseWebhookEventExtractPartialSuccess WebhookConfigResponseWebhookEvent = "extract.partial_success"`

    - `const WebhookConfigResponseWebhookEventExtractPending WebhookConfigResponseWebhookEvent = "extract.pending"`

    - `const WebhookConfigResponseWebhookEventExtractSuccess WebhookConfigResponseWebhookEvent = "extract.success"`

    - `const WebhookConfigResponseWebhookEventParseCancelled WebhookConfigResponseWebhookEvent = "parse.cancelled"`

    - `const WebhookConfigResponseWebhookEventParseError WebhookConfigResponseWebhookEvent = "parse.error"`

    - `const WebhookConfigResponseWebhookEventParsePartialSuccess WebhookConfigResponseWebhookEvent = "parse.partial_success"`

    - `const WebhookConfigResponseWebhookEventParsePending WebhookConfigResponseWebhookEvent = "parse.pending"`

    - `const WebhookConfigResponseWebhookEventParseRunning WebhookConfigResponseWebhookEvent = "parse.running"`

    - `const WebhookConfigResponseWebhookEventParseSuccess WebhookConfigResponseWebhookEvent = "parse.success"`

    - `const WebhookConfigResponseWebhookEventSheetsCancelled WebhookConfigResponseWebhookEvent = "sheets.cancelled"`

    - `const WebhookConfigResponseWebhookEventSheetsError WebhookConfigResponseWebhookEvent = "sheets.error"`

    - `const WebhookConfigResponseWebhookEventSheetsPartialSuccess WebhookConfigResponseWebhookEvent = "sheets.partial_success"`

    - `const WebhookConfigResponseWebhookEventSheetsPending WebhookConfigResponseWebhookEvent = "sheets.pending"`

    - `const WebhookConfigResponseWebhookEventSheetsSuccess WebhookConfigResponseWebhookEvent = "sheets.success"`

    - `const WebhookConfigResponseWebhookEventSplitCancelled WebhookConfigResponseWebhookEvent = "split.cancelled"`

    - `const WebhookConfigResponseWebhookEventSplitError WebhookConfigResponseWebhookEvent = "split.error"`

    - `const WebhookConfigResponseWebhookEventSplitPending WebhookConfigResponseWebhookEvent = "split.pending"`

    - `const WebhookConfigResponseWebhookEventSplitProcessing WebhookConfigResponseWebhookEvent = "split.processing"`

    - `const WebhookConfigResponseWebhookEventSplitSuccess WebhookConfigResponseWebhookEvent = "split.success"`

    - `const WebhookConfigResponseWebhookEventUnmappedEvent WebhookConfigResponseWebhookEvent = "unmapped_event"`

  - `WebhookHeaders map[string, string]`

    Custom HTTP headers sent with each request.

  - `WebhookOutputFormat WebhookConfigResponseWebhookOutputFormat`

    Response format sent to the webhook.

    - `const WebhookConfigResponseWebhookOutputFormatJson WebhookConfigResponseWebhookOutputFormat = "json"`

    - `const WebhookConfigResponseWebhookOutputFormatString WebhookConfigResponseWebhookOutputFormat = "string"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  webhookConfigResponse, err := client.WebhookConfigs.New(context.TODO(), llamacloud.WebhookConfigNewParams{
    WebhookConfigCreate: llamacloud.WebhookConfigCreateParam{
      WebhookURL: "https://example.com/webhooks/llamacloud",
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", webhookConfigResponse.ID)
}
```

#### 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

`client.WebhookConfigs.List(ctx, query) (*[]WebhookConfigResponse, error)`

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

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

### Parameters

- `query WebhookConfigListParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type WebhookConfigListResponse []WebhookConfigResponse`

  - `ID string`

    Unique identifier for the webhook configuration.

  - `HasSecret bool`

    Whether a signing secret is configured for this endpoint.

  - `TenantID string`

    Owner tenant ID.

  - `TenantType Project`

    Owner tenant type.

    - `const ProjectProject Project = "project"`

  - `WebhookURL string`

    URL that receives webhook POST notifications.

  - `CreatedAt Time`

    Creation datetime

  - `UpdatedAt Time`

    Update datetime

  - `WebhookEvents []string`

    Subscribed events (null = all events).

    - `const WebhookConfigResponseWebhookEventBatchCancelled WebhookConfigResponseWebhookEvent = "batch.cancelled"`

    - `const WebhookConfigResponseWebhookEventBatchError WebhookConfigResponseWebhookEvent = "batch.error"`

    - `const WebhookConfigResponseWebhookEventBatchPending WebhookConfigResponseWebhookEvent = "batch.pending"`

    - `const WebhookConfigResponseWebhookEventBatchRunning WebhookConfigResponseWebhookEvent = "batch.running"`

    - `const WebhookConfigResponseWebhookEventBatchSuccess WebhookConfigResponseWebhookEvent = "batch.success"`

    - `const WebhookConfigResponseWebhookEventClassifyCancelled WebhookConfigResponseWebhookEvent = "classify.cancelled"`

    - `const WebhookConfigResponseWebhookEventClassifyError WebhookConfigResponseWebhookEvent = "classify.error"`

    - `const WebhookConfigResponseWebhookEventClassifyPartialSuccess WebhookConfigResponseWebhookEvent = "classify.partial_success"`

    - `const WebhookConfigResponseWebhookEventClassifyPending WebhookConfigResponseWebhookEvent = "classify.pending"`

    - `const WebhookConfigResponseWebhookEventClassifyRunning WebhookConfigResponseWebhookEvent = "classify.running"`

    - `const WebhookConfigResponseWebhookEventClassifySuccess WebhookConfigResponseWebhookEvent = "classify.success"`

    - `const WebhookConfigResponseWebhookEventExtractCancelled WebhookConfigResponseWebhookEvent = "extract.cancelled"`

    - `const WebhookConfigResponseWebhookEventExtractError WebhookConfigResponseWebhookEvent = "extract.error"`

    - `const WebhookConfigResponseWebhookEventExtractPartialSuccess WebhookConfigResponseWebhookEvent = "extract.partial_success"`

    - `const WebhookConfigResponseWebhookEventExtractPending WebhookConfigResponseWebhookEvent = "extract.pending"`

    - `const WebhookConfigResponseWebhookEventExtractSuccess WebhookConfigResponseWebhookEvent = "extract.success"`

    - `const WebhookConfigResponseWebhookEventParseCancelled WebhookConfigResponseWebhookEvent = "parse.cancelled"`

    - `const WebhookConfigResponseWebhookEventParseError WebhookConfigResponseWebhookEvent = "parse.error"`

    - `const WebhookConfigResponseWebhookEventParsePartialSuccess WebhookConfigResponseWebhookEvent = "parse.partial_success"`

    - `const WebhookConfigResponseWebhookEventParsePending WebhookConfigResponseWebhookEvent = "parse.pending"`

    - `const WebhookConfigResponseWebhookEventParseRunning WebhookConfigResponseWebhookEvent = "parse.running"`

    - `const WebhookConfigResponseWebhookEventParseSuccess WebhookConfigResponseWebhookEvent = "parse.success"`

    - `const WebhookConfigResponseWebhookEventSheetsCancelled WebhookConfigResponseWebhookEvent = "sheets.cancelled"`

    - `const WebhookConfigResponseWebhookEventSheetsError WebhookConfigResponseWebhookEvent = "sheets.error"`

    - `const WebhookConfigResponseWebhookEventSheetsPartialSuccess WebhookConfigResponseWebhookEvent = "sheets.partial_success"`

    - `const WebhookConfigResponseWebhookEventSheetsPending WebhookConfigResponseWebhookEvent = "sheets.pending"`

    - `const WebhookConfigResponseWebhookEventSheetsSuccess WebhookConfigResponseWebhookEvent = "sheets.success"`

    - `const WebhookConfigResponseWebhookEventSplitCancelled WebhookConfigResponseWebhookEvent = "split.cancelled"`

    - `const WebhookConfigResponseWebhookEventSplitError WebhookConfigResponseWebhookEvent = "split.error"`

    - `const WebhookConfigResponseWebhookEventSplitPending WebhookConfigResponseWebhookEvent = "split.pending"`

    - `const WebhookConfigResponseWebhookEventSplitProcessing WebhookConfigResponseWebhookEvent = "split.processing"`

    - `const WebhookConfigResponseWebhookEventSplitSuccess WebhookConfigResponseWebhookEvent = "split.success"`

    - `const WebhookConfigResponseWebhookEventUnmappedEvent WebhookConfigResponseWebhookEvent = "unmapped_event"`

  - `WebhookHeaders map[string, string]`

    Custom HTTP headers sent with each request.

  - `WebhookOutputFormat WebhookConfigResponseWebhookOutputFormat`

    Response format sent to the webhook.

    - `const WebhookConfigResponseWebhookOutputFormatJson WebhookConfigResponseWebhookOutputFormat = "json"`

    - `const WebhookConfigResponseWebhookOutputFormatString WebhookConfigResponseWebhookOutputFormat = "string"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  webhookConfigResponses, err := client.WebhookConfigs.List(context.TODO(), llamacloud.WebhookConfigListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", webhookConfigResponses)
}
```

#### 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

`client.WebhookConfigs.Get(ctx, configID, query) (*WebhookConfigResponse, error)`

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

Get a single webhook configuration by ID.

### Parameters

- `configID string`

- `query WebhookConfigGetParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type WebhookConfigResponse struct{…}`

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

  - `ID string`

    Unique identifier for the webhook configuration.

  - `HasSecret bool`

    Whether a signing secret is configured for this endpoint.

  - `TenantID string`

    Owner tenant ID.

  - `TenantType Project`

    Owner tenant type.

    - `const ProjectProject Project = "project"`

  - `WebhookURL string`

    URL that receives webhook POST notifications.

  - `CreatedAt Time`

    Creation datetime

  - `UpdatedAt Time`

    Update datetime

  - `WebhookEvents []string`

    Subscribed events (null = all events).

    - `const WebhookConfigResponseWebhookEventBatchCancelled WebhookConfigResponseWebhookEvent = "batch.cancelled"`

    - `const WebhookConfigResponseWebhookEventBatchError WebhookConfigResponseWebhookEvent = "batch.error"`

    - `const WebhookConfigResponseWebhookEventBatchPending WebhookConfigResponseWebhookEvent = "batch.pending"`

    - `const WebhookConfigResponseWebhookEventBatchRunning WebhookConfigResponseWebhookEvent = "batch.running"`

    - `const WebhookConfigResponseWebhookEventBatchSuccess WebhookConfigResponseWebhookEvent = "batch.success"`

    - `const WebhookConfigResponseWebhookEventClassifyCancelled WebhookConfigResponseWebhookEvent = "classify.cancelled"`

    - `const WebhookConfigResponseWebhookEventClassifyError WebhookConfigResponseWebhookEvent = "classify.error"`

    - `const WebhookConfigResponseWebhookEventClassifyPartialSuccess WebhookConfigResponseWebhookEvent = "classify.partial_success"`

    - `const WebhookConfigResponseWebhookEventClassifyPending WebhookConfigResponseWebhookEvent = "classify.pending"`

    - `const WebhookConfigResponseWebhookEventClassifyRunning WebhookConfigResponseWebhookEvent = "classify.running"`

    - `const WebhookConfigResponseWebhookEventClassifySuccess WebhookConfigResponseWebhookEvent = "classify.success"`

    - `const WebhookConfigResponseWebhookEventExtractCancelled WebhookConfigResponseWebhookEvent = "extract.cancelled"`

    - `const WebhookConfigResponseWebhookEventExtractError WebhookConfigResponseWebhookEvent = "extract.error"`

    - `const WebhookConfigResponseWebhookEventExtractPartialSuccess WebhookConfigResponseWebhookEvent = "extract.partial_success"`

    - `const WebhookConfigResponseWebhookEventExtractPending WebhookConfigResponseWebhookEvent = "extract.pending"`

    - `const WebhookConfigResponseWebhookEventExtractSuccess WebhookConfigResponseWebhookEvent = "extract.success"`

    - `const WebhookConfigResponseWebhookEventParseCancelled WebhookConfigResponseWebhookEvent = "parse.cancelled"`

    - `const WebhookConfigResponseWebhookEventParseError WebhookConfigResponseWebhookEvent = "parse.error"`

    - `const WebhookConfigResponseWebhookEventParsePartialSuccess WebhookConfigResponseWebhookEvent = "parse.partial_success"`

    - `const WebhookConfigResponseWebhookEventParsePending WebhookConfigResponseWebhookEvent = "parse.pending"`

    - `const WebhookConfigResponseWebhookEventParseRunning WebhookConfigResponseWebhookEvent = "parse.running"`

    - `const WebhookConfigResponseWebhookEventParseSuccess WebhookConfigResponseWebhookEvent = "parse.success"`

    - `const WebhookConfigResponseWebhookEventSheetsCancelled WebhookConfigResponseWebhookEvent = "sheets.cancelled"`

    - `const WebhookConfigResponseWebhookEventSheetsError WebhookConfigResponseWebhookEvent = "sheets.error"`

    - `const WebhookConfigResponseWebhookEventSheetsPartialSuccess WebhookConfigResponseWebhookEvent = "sheets.partial_success"`

    - `const WebhookConfigResponseWebhookEventSheetsPending WebhookConfigResponseWebhookEvent = "sheets.pending"`

    - `const WebhookConfigResponseWebhookEventSheetsSuccess WebhookConfigResponseWebhookEvent = "sheets.success"`

    - `const WebhookConfigResponseWebhookEventSplitCancelled WebhookConfigResponseWebhookEvent = "split.cancelled"`

    - `const WebhookConfigResponseWebhookEventSplitError WebhookConfigResponseWebhookEvent = "split.error"`

    - `const WebhookConfigResponseWebhookEventSplitPending WebhookConfigResponseWebhookEvent = "split.pending"`

    - `const WebhookConfigResponseWebhookEventSplitProcessing WebhookConfigResponseWebhookEvent = "split.processing"`

    - `const WebhookConfigResponseWebhookEventSplitSuccess WebhookConfigResponseWebhookEvent = "split.success"`

    - `const WebhookConfigResponseWebhookEventUnmappedEvent WebhookConfigResponseWebhookEvent = "unmapped_event"`

  - `WebhookHeaders map[string, string]`

    Custom HTTP headers sent with each request.

  - `WebhookOutputFormat WebhookConfigResponseWebhookOutputFormat`

    Response format sent to the webhook.

    - `const WebhookConfigResponseWebhookOutputFormatJson WebhookConfigResponseWebhookOutputFormat = "json"`

    - `const WebhookConfigResponseWebhookOutputFormatString WebhookConfigResponseWebhookOutputFormat = "string"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  webhookConfigResponse, err := client.WebhookConfigs.Get(
    context.TODO(),
    "config_id",
    llamacloud.WebhookConfigGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", webhookConfigResponse.ID)
}
```

#### 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

`client.WebhookConfigs.Update(ctx, configID, params) (*WebhookConfigResponse, error)`

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

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

### Parameters

- `configID string`

- `params WebhookConfigUpdateParams`

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `WebhookEvents param.Field[[]string]`

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

    - `const WebhookConfigUpdateParamsWebhookEventBatchCancelled WebhookConfigUpdateParamsWebhookEvent = "batch.cancelled"`

    - `const WebhookConfigUpdateParamsWebhookEventBatchError WebhookConfigUpdateParamsWebhookEvent = "batch.error"`

    - `const WebhookConfigUpdateParamsWebhookEventBatchPending WebhookConfigUpdateParamsWebhookEvent = "batch.pending"`

    - `const WebhookConfigUpdateParamsWebhookEventBatchRunning WebhookConfigUpdateParamsWebhookEvent = "batch.running"`

    - `const WebhookConfigUpdateParamsWebhookEventBatchSuccess WebhookConfigUpdateParamsWebhookEvent = "batch.success"`

    - `const WebhookConfigUpdateParamsWebhookEventClassifyCancelled WebhookConfigUpdateParamsWebhookEvent = "classify.cancelled"`

    - `const WebhookConfigUpdateParamsWebhookEventClassifyError WebhookConfigUpdateParamsWebhookEvent = "classify.error"`

    - `const WebhookConfigUpdateParamsWebhookEventClassifyPartialSuccess WebhookConfigUpdateParamsWebhookEvent = "classify.partial_success"`

    - `const WebhookConfigUpdateParamsWebhookEventClassifyPending WebhookConfigUpdateParamsWebhookEvent = "classify.pending"`

    - `const WebhookConfigUpdateParamsWebhookEventClassifyRunning WebhookConfigUpdateParamsWebhookEvent = "classify.running"`

    - `const WebhookConfigUpdateParamsWebhookEventClassifySuccess WebhookConfigUpdateParamsWebhookEvent = "classify.success"`

    - `const WebhookConfigUpdateParamsWebhookEventExtractCancelled WebhookConfigUpdateParamsWebhookEvent = "extract.cancelled"`

    - `const WebhookConfigUpdateParamsWebhookEventExtractError WebhookConfigUpdateParamsWebhookEvent = "extract.error"`

    - `const WebhookConfigUpdateParamsWebhookEventExtractPartialSuccess WebhookConfigUpdateParamsWebhookEvent = "extract.partial_success"`

    - `const WebhookConfigUpdateParamsWebhookEventExtractPending WebhookConfigUpdateParamsWebhookEvent = "extract.pending"`

    - `const WebhookConfigUpdateParamsWebhookEventExtractSuccess WebhookConfigUpdateParamsWebhookEvent = "extract.success"`

    - `const WebhookConfigUpdateParamsWebhookEventParseCancelled WebhookConfigUpdateParamsWebhookEvent = "parse.cancelled"`

    - `const WebhookConfigUpdateParamsWebhookEventParseError WebhookConfigUpdateParamsWebhookEvent = "parse.error"`

    - `const WebhookConfigUpdateParamsWebhookEventParsePartialSuccess WebhookConfigUpdateParamsWebhookEvent = "parse.partial_success"`

    - `const WebhookConfigUpdateParamsWebhookEventParsePending WebhookConfigUpdateParamsWebhookEvent = "parse.pending"`

    - `const WebhookConfigUpdateParamsWebhookEventParseRunning WebhookConfigUpdateParamsWebhookEvent = "parse.running"`

    - `const WebhookConfigUpdateParamsWebhookEventParseSuccess WebhookConfigUpdateParamsWebhookEvent = "parse.success"`

    - `const WebhookConfigUpdateParamsWebhookEventSheetsCancelled WebhookConfigUpdateParamsWebhookEvent = "sheets.cancelled"`

    - `const WebhookConfigUpdateParamsWebhookEventSheetsError WebhookConfigUpdateParamsWebhookEvent = "sheets.error"`

    - `const WebhookConfigUpdateParamsWebhookEventSheetsPartialSuccess WebhookConfigUpdateParamsWebhookEvent = "sheets.partial_success"`

    - `const WebhookConfigUpdateParamsWebhookEventSheetsPending WebhookConfigUpdateParamsWebhookEvent = "sheets.pending"`

    - `const WebhookConfigUpdateParamsWebhookEventSheetsSuccess WebhookConfigUpdateParamsWebhookEvent = "sheets.success"`

    - `const WebhookConfigUpdateParamsWebhookEventSplitCancelled WebhookConfigUpdateParamsWebhookEvent = "split.cancelled"`

    - `const WebhookConfigUpdateParamsWebhookEventSplitError WebhookConfigUpdateParamsWebhookEvent = "split.error"`

    - `const WebhookConfigUpdateParamsWebhookEventSplitPending WebhookConfigUpdateParamsWebhookEvent = "split.pending"`

    - `const WebhookConfigUpdateParamsWebhookEventSplitProcessing WebhookConfigUpdateParamsWebhookEvent = "split.processing"`

    - `const WebhookConfigUpdateParamsWebhookEventSplitSuccess WebhookConfigUpdateParamsWebhookEvent = "split.success"`

    - `const WebhookConfigUpdateParamsWebhookEventUnmappedEvent WebhookConfigUpdateParamsWebhookEvent = "unmapped_event"`

  - `WebhookHeaders param.Field[map[string, string]]`

    Body param: Updated headers.

  - `WebhookOutputFormat param.Field[WebhookConfigUpdateParamsWebhookOutputFormat]`

    Body param: Updated output format.

    - `const WebhookConfigUpdateParamsWebhookOutputFormatJson WebhookConfigUpdateParamsWebhookOutputFormat = "json"`

    - `const WebhookConfigUpdateParamsWebhookOutputFormatString WebhookConfigUpdateParamsWebhookOutputFormat = "string"`

  - `WebhookSigningSecret param.Field[string]`

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

  - `WebhookURL param.Field[string]`

    Body param: Updated webhook URL.

### Returns

- `type WebhookConfigResponse struct{…}`

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

  - `ID string`

    Unique identifier for the webhook configuration.

  - `HasSecret bool`

    Whether a signing secret is configured for this endpoint.

  - `TenantID string`

    Owner tenant ID.

  - `TenantType Project`

    Owner tenant type.

    - `const ProjectProject Project = "project"`

  - `WebhookURL string`

    URL that receives webhook POST notifications.

  - `CreatedAt Time`

    Creation datetime

  - `UpdatedAt Time`

    Update datetime

  - `WebhookEvents []string`

    Subscribed events (null = all events).

    - `const WebhookConfigResponseWebhookEventBatchCancelled WebhookConfigResponseWebhookEvent = "batch.cancelled"`

    - `const WebhookConfigResponseWebhookEventBatchError WebhookConfigResponseWebhookEvent = "batch.error"`

    - `const WebhookConfigResponseWebhookEventBatchPending WebhookConfigResponseWebhookEvent = "batch.pending"`

    - `const WebhookConfigResponseWebhookEventBatchRunning WebhookConfigResponseWebhookEvent = "batch.running"`

    - `const WebhookConfigResponseWebhookEventBatchSuccess WebhookConfigResponseWebhookEvent = "batch.success"`

    - `const WebhookConfigResponseWebhookEventClassifyCancelled WebhookConfigResponseWebhookEvent = "classify.cancelled"`

    - `const WebhookConfigResponseWebhookEventClassifyError WebhookConfigResponseWebhookEvent = "classify.error"`

    - `const WebhookConfigResponseWebhookEventClassifyPartialSuccess WebhookConfigResponseWebhookEvent = "classify.partial_success"`

    - `const WebhookConfigResponseWebhookEventClassifyPending WebhookConfigResponseWebhookEvent = "classify.pending"`

    - `const WebhookConfigResponseWebhookEventClassifyRunning WebhookConfigResponseWebhookEvent = "classify.running"`

    - `const WebhookConfigResponseWebhookEventClassifySuccess WebhookConfigResponseWebhookEvent = "classify.success"`

    - `const WebhookConfigResponseWebhookEventExtractCancelled WebhookConfigResponseWebhookEvent = "extract.cancelled"`

    - `const WebhookConfigResponseWebhookEventExtractError WebhookConfigResponseWebhookEvent = "extract.error"`

    - `const WebhookConfigResponseWebhookEventExtractPartialSuccess WebhookConfigResponseWebhookEvent = "extract.partial_success"`

    - `const WebhookConfigResponseWebhookEventExtractPending WebhookConfigResponseWebhookEvent = "extract.pending"`

    - `const WebhookConfigResponseWebhookEventExtractSuccess WebhookConfigResponseWebhookEvent = "extract.success"`

    - `const WebhookConfigResponseWebhookEventParseCancelled WebhookConfigResponseWebhookEvent = "parse.cancelled"`

    - `const WebhookConfigResponseWebhookEventParseError WebhookConfigResponseWebhookEvent = "parse.error"`

    - `const WebhookConfigResponseWebhookEventParsePartialSuccess WebhookConfigResponseWebhookEvent = "parse.partial_success"`

    - `const WebhookConfigResponseWebhookEventParsePending WebhookConfigResponseWebhookEvent = "parse.pending"`

    - `const WebhookConfigResponseWebhookEventParseRunning WebhookConfigResponseWebhookEvent = "parse.running"`

    - `const WebhookConfigResponseWebhookEventParseSuccess WebhookConfigResponseWebhookEvent = "parse.success"`

    - `const WebhookConfigResponseWebhookEventSheetsCancelled WebhookConfigResponseWebhookEvent = "sheets.cancelled"`

    - `const WebhookConfigResponseWebhookEventSheetsError WebhookConfigResponseWebhookEvent = "sheets.error"`

    - `const WebhookConfigResponseWebhookEventSheetsPartialSuccess WebhookConfigResponseWebhookEvent = "sheets.partial_success"`

    - `const WebhookConfigResponseWebhookEventSheetsPending WebhookConfigResponseWebhookEvent = "sheets.pending"`

    - `const WebhookConfigResponseWebhookEventSheetsSuccess WebhookConfigResponseWebhookEvent = "sheets.success"`

    - `const WebhookConfigResponseWebhookEventSplitCancelled WebhookConfigResponseWebhookEvent = "split.cancelled"`

    - `const WebhookConfigResponseWebhookEventSplitError WebhookConfigResponseWebhookEvent = "split.error"`

    - `const WebhookConfigResponseWebhookEventSplitPending WebhookConfigResponseWebhookEvent = "split.pending"`

    - `const WebhookConfigResponseWebhookEventSplitProcessing WebhookConfigResponseWebhookEvent = "split.processing"`

    - `const WebhookConfigResponseWebhookEventSplitSuccess WebhookConfigResponseWebhookEvent = "split.success"`

    - `const WebhookConfigResponseWebhookEventUnmappedEvent WebhookConfigResponseWebhookEvent = "unmapped_event"`

  - `WebhookHeaders map[string, string]`

    Custom HTTP headers sent with each request.

  - `WebhookOutputFormat WebhookConfigResponseWebhookOutputFormat`

    Response format sent to the webhook.

    - `const WebhookConfigResponseWebhookOutputFormatJson WebhookConfigResponseWebhookOutputFormat = "json"`

    - `const WebhookConfigResponseWebhookOutputFormatString WebhookConfigResponseWebhookOutputFormat = "string"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  webhookConfigResponse, err := client.WebhookConfigs.Update(
    context.TODO(),
    "config_id",
    llamacloud.WebhookConfigUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", webhookConfigResponse.ID)
}
```

#### 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

`client.WebhookConfigs.Delete(ctx, configID, body) error`

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

Delete a webhook configuration.

### Parameters

- `configID string`

- `body WebhookConfigDeleteParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Example

```go
package main

import (
  "context"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.WebhookConfigs.Delete(
    context.TODO(),
    "config_id",
    llamacloud.WebhookConfigDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

## Domain Types

### Webhook Config Create

- `type WebhookConfigCreate struct{…}`

  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.

  - `WebhookURL string`

    URL to receive webhook POST notifications.

  - `WebhookEvents []string`

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

    - `const WebhookConfigCreateWebhookEventBatchCancelled WebhookConfigCreateWebhookEvent = "batch.cancelled"`

    - `const WebhookConfigCreateWebhookEventBatchError WebhookConfigCreateWebhookEvent = "batch.error"`

    - `const WebhookConfigCreateWebhookEventBatchPending WebhookConfigCreateWebhookEvent = "batch.pending"`

    - `const WebhookConfigCreateWebhookEventBatchRunning WebhookConfigCreateWebhookEvent = "batch.running"`

    - `const WebhookConfigCreateWebhookEventBatchSuccess WebhookConfigCreateWebhookEvent = "batch.success"`

    - `const WebhookConfigCreateWebhookEventClassifyCancelled WebhookConfigCreateWebhookEvent = "classify.cancelled"`

    - `const WebhookConfigCreateWebhookEventClassifyError WebhookConfigCreateWebhookEvent = "classify.error"`

    - `const WebhookConfigCreateWebhookEventClassifyPartialSuccess WebhookConfigCreateWebhookEvent = "classify.partial_success"`

    - `const WebhookConfigCreateWebhookEventClassifyPending WebhookConfigCreateWebhookEvent = "classify.pending"`

    - `const WebhookConfigCreateWebhookEventClassifyRunning WebhookConfigCreateWebhookEvent = "classify.running"`

    - `const WebhookConfigCreateWebhookEventClassifySuccess WebhookConfigCreateWebhookEvent = "classify.success"`

    - `const WebhookConfigCreateWebhookEventExtractCancelled WebhookConfigCreateWebhookEvent = "extract.cancelled"`

    - `const WebhookConfigCreateWebhookEventExtractError WebhookConfigCreateWebhookEvent = "extract.error"`

    - `const WebhookConfigCreateWebhookEventExtractPartialSuccess WebhookConfigCreateWebhookEvent = "extract.partial_success"`

    - `const WebhookConfigCreateWebhookEventExtractPending WebhookConfigCreateWebhookEvent = "extract.pending"`

    - `const WebhookConfigCreateWebhookEventExtractSuccess WebhookConfigCreateWebhookEvent = "extract.success"`

    - `const WebhookConfigCreateWebhookEventParseCancelled WebhookConfigCreateWebhookEvent = "parse.cancelled"`

    - `const WebhookConfigCreateWebhookEventParseError WebhookConfigCreateWebhookEvent = "parse.error"`

    - `const WebhookConfigCreateWebhookEventParsePartialSuccess WebhookConfigCreateWebhookEvent = "parse.partial_success"`

    - `const WebhookConfigCreateWebhookEventParsePending WebhookConfigCreateWebhookEvent = "parse.pending"`

    - `const WebhookConfigCreateWebhookEventParseRunning WebhookConfigCreateWebhookEvent = "parse.running"`

    - `const WebhookConfigCreateWebhookEventParseSuccess WebhookConfigCreateWebhookEvent = "parse.success"`

    - `const WebhookConfigCreateWebhookEventSheetsCancelled WebhookConfigCreateWebhookEvent = "sheets.cancelled"`

    - `const WebhookConfigCreateWebhookEventSheetsError WebhookConfigCreateWebhookEvent = "sheets.error"`

    - `const WebhookConfigCreateWebhookEventSheetsPartialSuccess WebhookConfigCreateWebhookEvent = "sheets.partial_success"`

    - `const WebhookConfigCreateWebhookEventSheetsPending WebhookConfigCreateWebhookEvent = "sheets.pending"`

    - `const WebhookConfigCreateWebhookEventSheetsSuccess WebhookConfigCreateWebhookEvent = "sheets.success"`

    - `const WebhookConfigCreateWebhookEventSplitCancelled WebhookConfigCreateWebhookEvent = "split.cancelled"`

    - `const WebhookConfigCreateWebhookEventSplitError WebhookConfigCreateWebhookEvent = "split.error"`

    - `const WebhookConfigCreateWebhookEventSplitPending WebhookConfigCreateWebhookEvent = "split.pending"`

    - `const WebhookConfigCreateWebhookEventSplitProcessing WebhookConfigCreateWebhookEvent = "split.processing"`

    - `const WebhookConfigCreateWebhookEventSplitSuccess WebhookConfigCreateWebhookEvent = "split.success"`

    - `const WebhookConfigCreateWebhookEventUnmappedEvent WebhookConfigCreateWebhookEvent = "unmapped_event"`

  - `WebhookHeaders map[string, string]`

    Custom HTTP headers sent with each webhook request.

  - `WebhookOutputFormat WebhookConfigCreateWebhookOutputFormat`

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

    - `const WebhookConfigCreateWebhookOutputFormatJson WebhookConfigCreateWebhookOutputFormat = "json"`

    - `const WebhookConfigCreateWebhookOutputFormatString WebhookConfigCreateWebhookOutputFormat = "string"`

  - `WebhookSigningSecret string`

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

### Webhook Config Response

- `type WebhookConfigResponse struct{…}`

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

  - `ID string`

    Unique identifier for the webhook configuration.

  - `HasSecret bool`

    Whether a signing secret is configured for this endpoint.

  - `TenantID string`

    Owner tenant ID.

  - `TenantType Project`

    Owner tenant type.

    - `const ProjectProject Project = "project"`

  - `WebhookURL string`

    URL that receives webhook POST notifications.

  - `CreatedAt Time`

    Creation datetime

  - `UpdatedAt Time`

    Update datetime

  - `WebhookEvents []string`

    Subscribed events (null = all events).

    - `const WebhookConfigResponseWebhookEventBatchCancelled WebhookConfigResponseWebhookEvent = "batch.cancelled"`

    - `const WebhookConfigResponseWebhookEventBatchError WebhookConfigResponseWebhookEvent = "batch.error"`

    - `const WebhookConfigResponseWebhookEventBatchPending WebhookConfigResponseWebhookEvent = "batch.pending"`

    - `const WebhookConfigResponseWebhookEventBatchRunning WebhookConfigResponseWebhookEvent = "batch.running"`

    - `const WebhookConfigResponseWebhookEventBatchSuccess WebhookConfigResponseWebhookEvent = "batch.success"`

    - `const WebhookConfigResponseWebhookEventClassifyCancelled WebhookConfigResponseWebhookEvent = "classify.cancelled"`

    - `const WebhookConfigResponseWebhookEventClassifyError WebhookConfigResponseWebhookEvent = "classify.error"`

    - `const WebhookConfigResponseWebhookEventClassifyPartialSuccess WebhookConfigResponseWebhookEvent = "classify.partial_success"`

    - `const WebhookConfigResponseWebhookEventClassifyPending WebhookConfigResponseWebhookEvent = "classify.pending"`

    - `const WebhookConfigResponseWebhookEventClassifyRunning WebhookConfigResponseWebhookEvent = "classify.running"`

    - `const WebhookConfigResponseWebhookEventClassifySuccess WebhookConfigResponseWebhookEvent = "classify.success"`

    - `const WebhookConfigResponseWebhookEventExtractCancelled WebhookConfigResponseWebhookEvent = "extract.cancelled"`

    - `const WebhookConfigResponseWebhookEventExtractError WebhookConfigResponseWebhookEvent = "extract.error"`

    - `const WebhookConfigResponseWebhookEventExtractPartialSuccess WebhookConfigResponseWebhookEvent = "extract.partial_success"`

    - `const WebhookConfigResponseWebhookEventExtractPending WebhookConfigResponseWebhookEvent = "extract.pending"`

    - `const WebhookConfigResponseWebhookEventExtractSuccess WebhookConfigResponseWebhookEvent = "extract.success"`

    - `const WebhookConfigResponseWebhookEventParseCancelled WebhookConfigResponseWebhookEvent = "parse.cancelled"`

    - `const WebhookConfigResponseWebhookEventParseError WebhookConfigResponseWebhookEvent = "parse.error"`

    - `const WebhookConfigResponseWebhookEventParsePartialSuccess WebhookConfigResponseWebhookEvent = "parse.partial_success"`

    - `const WebhookConfigResponseWebhookEventParsePending WebhookConfigResponseWebhookEvent = "parse.pending"`

    - `const WebhookConfigResponseWebhookEventParseRunning WebhookConfigResponseWebhookEvent = "parse.running"`

    - `const WebhookConfigResponseWebhookEventParseSuccess WebhookConfigResponseWebhookEvent = "parse.success"`

    - `const WebhookConfigResponseWebhookEventSheetsCancelled WebhookConfigResponseWebhookEvent = "sheets.cancelled"`

    - `const WebhookConfigResponseWebhookEventSheetsError WebhookConfigResponseWebhookEvent = "sheets.error"`

    - `const WebhookConfigResponseWebhookEventSheetsPartialSuccess WebhookConfigResponseWebhookEvent = "sheets.partial_success"`

    - `const WebhookConfigResponseWebhookEventSheetsPending WebhookConfigResponseWebhookEvent = "sheets.pending"`

    - `const WebhookConfigResponseWebhookEventSheetsSuccess WebhookConfigResponseWebhookEvent = "sheets.success"`

    - `const WebhookConfigResponseWebhookEventSplitCancelled WebhookConfigResponseWebhookEvent = "split.cancelled"`

    - `const WebhookConfigResponseWebhookEventSplitError WebhookConfigResponseWebhookEvent = "split.error"`

    - `const WebhookConfigResponseWebhookEventSplitPending WebhookConfigResponseWebhookEvent = "split.pending"`

    - `const WebhookConfigResponseWebhookEventSplitProcessing WebhookConfigResponseWebhookEvent = "split.processing"`

    - `const WebhookConfigResponseWebhookEventSplitSuccess WebhookConfigResponseWebhookEvent = "split.success"`

    - `const WebhookConfigResponseWebhookEventUnmappedEvent WebhookConfigResponseWebhookEvent = "unmapped_event"`

  - `WebhookHeaders map[string, string]`

    Custom HTTP headers sent with each request.

  - `WebhookOutputFormat WebhookConfigResponseWebhookOutputFormat`

    Response format sent to the webhook.

    - `const WebhookConfigResponseWebhookOutputFormatJson WebhookConfigResponseWebhookOutputFormat = "json"`

    - `const WebhookConfigResponseWebhookOutputFormatString WebhookConfigResponseWebhookOutputFormat = "string"`
