# Update Endpoint Headers

> Webhooks API, PUT /endpoint/{endpoint_id}/headers: Set the additional headers to be sent with the webhook This can be used in case your infrastructure requires additional security.

`PUT /endpoint/{endpoint_id}/headers` on the Webhooks API. Base URL: `https://api.sinay.ai/webhook/api/v1`.

Set the additional headers to be sent with the webhook This can be used in case your infrastructure requires additional security. This will replace all previously sent headers. Use PATCH to update the headers partially.

## Path parameters

::api-parameters{location="path"}
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `endpoint_id` | string | Yes | The ep's ID or UID To retrieve your endpoints ids, use GET /endpoint. Example: `unique-ep-identifier`. |
::

## Request body

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `headers` | object | Yes | — |
| `headers.<key>` | string | No | — |

::api-request-body
Example request body:

```json
{
  "headers": {
    "X-Example": "123",
    "X-Foobar": "Bar"
  }
}
```
::

## Responses

::api-response
---
status: "204"
description: no content
---

No body.

::

::api-response
---
status: "400"
description: Bad request
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "403"
description: Forbidden
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "404"
description: Not Found. Endpoint not found
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "409"
description: Conflict
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "422"
description: Validation Error
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `detail` | array of object | Yes | — |
| `detail[].loc` | array of string | Yes | The location as a [`Vec`] of [`String`]s -- often in the form `["body", "field_name"]`, `["query", "field_name"]`, etc. They may, however, be arbitrarily deep. |
| `detail[].msg` | string | Yes | The message accompanying the validation error item. |
| `detail[].type` | string | Yes | The type of error, often "type_error" or "value_error", but sometimes with more context like as "value_error.number.not_ge". |

::

::api-response
---
status: "429"
description: Too Many Requests
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::

::api-response
---
status: "500"
description: Internal Error
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | — |
| `detail` | string | Yes | — |

::
