# Update Endpoint

> Webhooks API, PUT /endpoint/{endpoint_id}: Update an endpoint.

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

Update an endpoint. This will replace all your endpoint parameters with the one you specify. If you don't specify a parameter, it will be erased. If you wish to update an endpoint partially, use PATCH /endpoint/{endpoint_id}

## 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 |
| --- | --- | --- | --- |
| `description` | string | No | Description of your endpoint. Default: ``. |
| `rateLimit` | integer (uint16), nullable | No | Rate limit of your endpoint in messages per second. This is an advanced field. Be aware that setting a low rateLimit can lead to a congestion queue and create delay in webhooks. |
| `uid` | string, nullable | No | Optional unique identifier for the endpoint. |
| `url` | string (uri) | Yes | Public url in your services where you plan to receive our webhooks. |
| `disabled` | boolean | No | When disabled is true, no messages will be sent to your endpoint. This can be used to deactivate a development or a testing endpoint when not in use. Default: `false`. |
| `filterTypes` | array of string, nullable | No | — |
| `channels` | array of string, nullable | No | List of message channels this endpoint listens to (omit for all). |
| `metadata` | object | No | Optional additional properties for your endpoint. Default: `{}`. |
| `metadata.<key>` | string | No | — |

::api-request-body
Example request body:

```json
{
  "description": "Production endpoint",
  "rateLimit": 0,
  "uid": "unique-ep-identifier",
  "url": "https://example.com/webhook/",
  "disabled": false,
  "filterTypes": [
    "shipment.added.to.endpoint",
    "container.new.event.detected"
  ],
  "channels": [
    "project_123",
    "group_2"
  ],
  "metadata": {}
}
```
::

## Responses

::api-response
---
status: "200"
description: ""
---

Body: `application/json`, object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The ep's ID. |
| `metadata` | object | Yes | Optional additional properties for your endpoint. |
| `metadata.<key>` | string | No | — |
| `description` | string | Yes | An example endpoint name. |
| `rateLimit` | integer (uint16), nullable | No | Rate limit of your endpoint in messages per second. This is an advanced field. Be aware that setting a low rateLimit can lead to a congestion queue and create delay in webhooks. |
| `uid` | string, nullable | No | Optional unique identifier for the endpoint. |
| `url` | string (uri) | Yes | Public url in your services where you plan to receive our webhooks. If you don't have a public url ready yet, you can use Svix play to test our webhooks https://www.svix.com/play/. |
| `version` | integer (int32) | Yes | — |
| `disabled` | boolean | No | When disabled is true, no messages will be sent to your endpoint. This can be used to deactivate a development or a testing endpoint when not in use. Default: `false`. |
| `filterTypes` | array of string, nullable | No | — |
| `channels` | array of string, nullable | No | List of message channels this endpoint listens to (omit for all). |
| `createdAt` | string (date-time) | Yes | — |
| `updatedAt` | string (date-time) | Yes | — |

::

::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. This endpoint id was not found.
---

Body: `application/json`, object.

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

::

::api-response
---
status: "422"
description: Validation Error. The payload does not have the necessary information or format.
---

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 | — |

::
