# Get a webhook endpoint

One webhook endpoint, without its secret.

## Authentication

Send `Authorization: Bearer gtk_…`. Create the key under **Connect assistant → API keys**. A missing, invalid or revoked key is **401**. A valid key while this API is not enabled for your organization answers **403** `api_not_enabled`, with what the key can do instead. Every response includes `mySDR-Api-Version`, `mySDR-Request-Id` and `Cache-Control: no-store`, and a response to an accepted key also `X-RateLimit-*` (so not a 401, a 405, an OPTIONS or a 404 for an unknown path).

### Path parameters

- **`webhook_endpoint_id`** `string` · **required** — An endpoint id (`whe_…`).

## Response

- **`id`** `string` · **required** — Endpoint id, `whe_…`.
- **`object`** `string` · **required** — Always `webhook_endpoint`.
- **`url`** `string` · **required** — Where events are POSTed.
- **`events`** `string[]` · **required** — Subscribed types. `ping` is not in this list; the test always sends it.
- **`status`** `string` · **required** — `enabled`, `disabled` or `deleted`. Disabled after 3 events in a row that used every delivery attempt. One of: `enabled`, `disabled`, `deleted`.
- **`disabled_reason`** `string | null` — `failing`, or null.

## Credits

Free.

## Errors

- **404** `not_found` — No webhook endpoint with this id exists for your organization.
- **401** `authentication_error` — The Authorization header is missing, or the key is unknown or revoked.
- **403** `permission_error` — API access is not part of your plan, or your account is suspended.
- **403** `api_not_enabled` — The key is valid, but the Signals API or the Company API is not enabled for your organization yet. The error says what this key can do.
- **429** `rate_limit_error` — More than 60 requests per minute, or more than 3 at the same time, on one key. Wait for the Retry-After header.
- **500** `internal_error` — Something went wrong on our side.

## Example

### cURL

```bash
curl "https://mysdr.app/api/v1/webhook_endpoints/whe_01J9Z6P8C8V0K3W6T2N8R5M1XH" \
  -H "Authorization: Bearer $MYSDR_API_KEY"
```

### JavaScript

```javascript
const response = await fetch('https://mysdr.app/api/v1/webhook_endpoints/whe_01J9Z6P8C8V0K3W6T2N8R5M1XH', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.MYSDR_API_KEY}`
  }
});
const body = await response.json();
```

### Python

```python
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://mysdr.app/api/v1/webhook_endpoints/whe_01J9Z6P8C8V0K3W6T2N8R5M1XH",
    headers={
    "Authorization": f"Bearer {os.environ['MYSDR_API_KEY']}"
    },
    method="GET",
)
with urllib.request.urlopen(request) as response:
    body = json.load(response)
```

### Example response

```json
{
  "id": "whe_01J9Z6P8C8V0K3W6T2N8R5M1XH",
  "object": "webhook_endpoint",
  "status": "enabled",
  "disabled_reason": null
}
```
