# Webhooks

### Overview

It's often helpful to know when your deployment is complete, regardless of its state `READY` or `ERROR`. You can use a webhook with a deployment. Here's how it works:

We will make an HTTP POST request to the provided URL when your deployment is complete. This request contains a JSON body with the same data provided by our route `/v1/status/{request_id}`. We expect no response from your side.

{% hint style="warning" %}
The default timeout for the webhook is 10 seconds. If the webhook does not respond within this time, you will not receive any further notifications.
{% endhint %}

### Deployment Webhook Example

`POST` request to `/v1/deploy` ([API Reference](https://docs.edgegap.com/docs/api))

Include your [API Token](https://docs.edgegap.com/docs/deployment/broken-reference) in your Headers like this:

```json
{
  "Content-Type": "application/json",
  "Authorization": "token super_secret_token_1234"
}
```

REST payload:

```json
{
  "app_name": "speedtest",
  "version_name": "v1",
  "ip_list": ["1.1.1.1"],
  "webhook_url": "https://ptsv2.com/t/0n7by-1652897234/post"
}
```

### Deployment Webhook Callflow

The following sequence diagram shows the call-flow of a Deployment webhook.

<figure><img src="https://3027732442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR0dHSFv9ymoC0DO5G8J%2Fuploads%2Fgit-blob-414bdc54920e91653a634052addc6ae63ab5fb1f%2Farbitrium_deploy_webhook_flow.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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.edgegap.com/docs/deployment/arbitrium-deploy-webhook.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.
