# POST Create New Callback

```
https://openapi.paveapi.com/v1/callbacks
```

This endpoint allows you to create a new callback for your requesting API Key.

| Headers             |        |                                                    |
| ------------------- | ------ | -------------------------------------------------- |
| **`API-Key`**       | string | The API-Key that was provided for your account     |
| **`API-Token`**     | string | The API-Token used when the session was created    |
| **`API-Timestamp`** | string | UTC Datetime string, example: 2021-05-30T12:49:19Z |

| Body Parameters          | Type   | Description                                                                                                                                                 |
| ------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`event`**              | string | Input one of the Supported Events: 1 - **`SESSION:SMS_PROCESS`**, 2 - **`SESSION:STAGE_CHANGE`** 3 - **`SESSION:STATUS_CHANGE`** 4 - **`SESSION:COMPLETE`** |
| **`url`**                | string | Your callback Endpoint URL to receive the events                                                                                                            |
| **`method`** (optional)  | string | The method to be used, POST is the default if not provided                                                                                                  |
| **`headers`** (optional) | string | Enter the authentication headers to be included (API key, token)                                                                                            |
| **`payload`** (optional) | string | Attributes to send along with the default payload for the Supported Events                                                                                  |

#### Sample Response (200:Ok)

```
{
    "api_key": "<your_request_api_key",
    "event": "SESSION:STAGE_CHANGE",
    "url": "https://your_sms_callback_url",
    "method": "POST",
    "headers": {
        "Authorization": "Bearer <jwt_token>"
    },
    "payload": {
        "source": "PAVE", // additional attributes to pass along; setting on create callback
    }
}
```

#### Sample Response (400:Bad Request)

```
{
    "message": "Missing required fields."
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paveapi.com/integrations/developer-docs/callbacks/set-a-new-callback.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
