## Create Webhook Config

`WebhookConfigResponse webhookConfigs().create(WebhookConfigCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())`

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

Create a reusable webhook configuration for the current project.

### Parameters

- `WebhookConfigCreateParams params`

  - `Optional<String> organizationId`

  - `Optional<String> projectId`

  - `WebhookConfigCreate webhookConfigCreate`

    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.

### Returns

- `class WebhookConfigResponse:`

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

  - `String id`

    Unique identifier for the webhook configuration.

  - `boolean hasSecret`

    Whether a signing secret is configured for this endpoint.

  - `String tenantId`

    Owner tenant ID.

  - `JsonValue; tenantType "project"constant`

    Owner tenant type.

    - `PROJECT("project")`

  - `String webhookUrl`

    URL that receives webhook POST notifications.

  - `Optional<LocalDateTime> createdAt`

    Creation datetime

  - `Optional<LocalDateTime> updatedAt`

    Update datetime

  - `Optional<List<WebhookEvent>> webhookEvents`

    Subscribed events (null = all events).

    - `BATCH_CANCELLED("batch.cancelled")`

    - `BATCH_ERROR("batch.error")`

    - `BATCH_PENDING("batch.pending")`

    - `BATCH_RUNNING("batch.running")`

    - `BATCH_SUCCESS("batch.success")`

    - `CLASSIFY_CANCELLED("classify.cancelled")`

    - `CLASSIFY_ERROR("classify.error")`

    - `CLASSIFY_PARTIAL_SUCCESS("classify.partial_success")`

    - `CLASSIFY_PENDING("classify.pending")`

    - `CLASSIFY_RUNNING("classify.running")`

    - `CLASSIFY_SUCCESS("classify.success")`

    - `EXTRACT_CANCELLED("extract.cancelled")`

    - `EXTRACT_ERROR("extract.error")`

    - `EXTRACT_PARTIAL_SUCCESS("extract.partial_success")`

    - `EXTRACT_PENDING("extract.pending")`

    - `EXTRACT_SUCCESS("extract.success")`

    - `PARSE_CANCELLED("parse.cancelled")`

    - `PARSE_ERROR("parse.error")`

    - `PARSE_PARTIAL_SUCCESS("parse.partial_success")`

    - `PARSE_PENDING("parse.pending")`

    - `PARSE_RUNNING("parse.running")`

    - `PARSE_SUCCESS("parse.success")`

    - `SHEETS_CANCELLED("sheets.cancelled")`

    - `SHEETS_ERROR("sheets.error")`

    - `SHEETS_PARTIAL_SUCCESS("sheets.partial_success")`

    - `SHEETS_PENDING("sheets.pending")`

    - `SHEETS_SUCCESS("sheets.success")`

    - `SPLIT_CANCELLED("split.cancelled")`

    - `SPLIT_ERROR("split.error")`

    - `SPLIT_PENDING("split.pending")`

    - `SPLIT_PROCESSING("split.processing")`

    - `SPLIT_SUCCESS("split.success")`

    - `UNMAPPED_EVENT("unmapped_event")`

  - `Optional<WebhookHeaders> webhookHeaders`

    Custom HTTP headers sent with each request.

  - `Optional<WebhookOutputFormat> webhookOutputFormat`

    Response format sent to the webhook.

    - `JSON("json")`

    - `STRING("string")`

### Example

```java
package ai.llamaindex.llamacloud.example;

import ai.llamaindex.llamacloud.client.LlamaCloudClient;
import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;
import ai.llamaindex.llamacloud.models.webhookconfigs.WebhookConfigCreate;
import ai.llamaindex.llamacloud.models.webhookconfigs.WebhookConfigCreateParams;
import ai.llamaindex.llamacloud.models.webhookconfigs.WebhookConfigResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        WebhookConfigCreate params = WebhookConfigCreate.builder()
            .webhookUrl("https://example.com/webhooks/llamacloud")
            .build();
        WebhookConfigResponse webhookConfigResponse = client.webhookConfigs().create(params);
    }
}
```

#### 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"
}
```
