> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chargefy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Obter um endpoint de webhook

> Retorna um endpoint de webhook pelo ID.

Retorna o `webhook_endpoint` pelo ID. A resposta **não inclui o `secret`** —
ele aparece apenas na resposta do
[create](/api-reference/webhook-endpoints/create).

## Autenticação

Use a API key da organização com escopo `read`. A API key de plataforma não
gerencia endpoints e o header `Organization` não é aceito neste recurso.

## Parâmetros de caminho

<ParamField path="id" type="string" required>
  ID do endpoint (`we_*`).
</ParamField>

<RequestExample>
  ```bash cURL theme={"theme":"css-variables"}
  curl "https://api.chargefy.io/v1/webhook-endpoints/we_wDEweXBTADKnr18D" \
    -H "Authorization: Bearer {{API_KEY}}"
  ```
</RequestExample>

## Resposta

`200 OK` com o objeto [`webhook_endpoint`](/api-reference/webhook-endpoints/object)
completo, sem o `secret`.

<ResponseExample>
  ```json 200 theme={"theme":"css-variables"}
  {
    "id": "we_wDEweXBTADKnr18D",
    "object": "webhook_endpoint",
    "created_at": "2026-07-19T12:00:00Z",
    "events": [
      "payment.intent.succeeded",
      "charge.refunded"
    ],
    "events_from": "organization",
    "livemode": true,
    "metadata": {},
    "name": "Servidor principal",
    "updated_at": null,
    "url": "https://meusite.com/webhooks/chargefy"
  }
  ```

  ```json 401 theme={"theme":"css-variables"}
  {
    "error": {
      "code": "authentication_failed",
      "message": "Unauthorized — invalid api key",
      "type": "authentication_error"
    }
  }
  ```

  ```json 404 theme={"theme":"css-variables"}
  {
    "error": {
      "code": "resource_missing",
      "message": "Webhook endpoint not found",
      "type": "invalid_request_error"
    }
  }
  ```
</ResponseExample>

## Erros

| Status | Quando                                                                       |
| ------ | ---------------------------------------------------------------------------- |
| `401`  | Credencial ausente, inválida, revogada ou expirada.                          |
| `404`  | Endpoint não existe nesta organização ou neste ambiente, ou já foi removido. |
