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

# Create webhook

> Create a webhook endpoint for a client to receive Sendforsign contract events in real time.

Webhooks are created for the specific client key you use when creating a webhook.

### Body parameters

**data** `object` *required*

**child attribute**

**action** `string` *required*

Action type.

**clientKey** `string` *required*

Key of the client.

**webhooks** `array` *required*

Array of webhooks.

**child attribute**

**url** `string` *required*

Webhook's endpoint.

**created** `boolean`

Event to listen: `contract.created`.

**seen** `boolean`

Event to listen: `contract.seen`.

**sent** `boolean`

Event to listen: `contract.sent`.

**approved** `boolean`

Event to listen: `contract.approved`.

**signed** `boolean`

Event to listen: `contract.signed`.

**fullySigned** `boolean`

Event to listen: `contract.fully_signed`.

### Response

**webhooks** `string`

Array of webhooks.

**child attribute**

**createTime** `string`

Create time.

**url** `string`

Webhook's endpoint.

**secret** `string`

Webhook's secret.

**webhookKey** `string`

Webhook's key.

**code** `string`

The code of the answer.

**message** `string`

The message of the answer.

```bash cURL theme={null}
curl -X POST 'https://api.sendforsign.com/api/webhook' \
     -H 'X-Sendforsign-Key: YOUR_API_KEY' \
     -H 'Content-Type: application/json' \
     -d '{
    "data": {
        "action": "create",
        "clientKey": "YOUR_CLIENT_KEY",
        "webhooks": [
            {
                "url": "URL",
                "created": true,
                "seen": true,
                "sent": false,
                "approved": false,
                "signed": false,
                "fullySigned": true
            }
        ]
    }
}'
```

```json Response theme={null}
{
    "webhooks": [
        {
            "createTime": "2024-04-08T08:58:54.000Z",
            "url": "testurl1",
            "secret": "whsec_123",
            "webhookKey": "WEBHOOK_KEY"
        }
    ],
    "code": "201",
    "message": "Webhooks created"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.