# Payload de ejemplo de un evento

GET `https://api.bydomu.com/v1/webhooks/sample/{type}`

This reference is generated from the API’s code, so descriptions are in Spanish. Names, parameters and examples are the same in every language.

El sobre exacto que recibiría un webhook para ese tipo. Usa el último evento REAL de la organización cuando existe (`meta.synthetic: false`); si no, arma uno con la forma del catálogo y valores nulos (`meta.synthetic: true`). Un tipo que no está en el catálogo responde `404`.

Permission required

`webhooks:write`

Required header

`X-API-Key` · secret key

Access level

Level 3 · with support review

## Path parameters

1 · required

`type` string · **required**

Tipo exacto del catálogo

## Response 200

`object` · 7 fields

**`data` id · type · timestamp · organizationId · livemode · actor · data**

`id` string `evt_sample` en los ejemplos sintéticos

`type` string

`timestamp` string

`organizationId` string

`livemode` boolean `false` si el evento salió de la organización de prueba (clave `_test_`)

**`actor` kind · userId**

`kind` string USER, NOA, SYSTEM, API, AUTOMATION, INTEGRATION

`userId` string

`data` any Payload del evento: un objeto por cada objeto del catálogo

**`meta` synthetic**

`synthetic` boolean `true` si es un ejemplo armado con valores nulos

## Possible errors

shaped as `{ "error": { "code", "message" } }`

- **401** UNAUTHORIZED
- **403** FORBIDDEN
- **404** NOT_FOUND
- **429** RATE_LIMITED
- **500** INTERNAL_ERROR

cURL:

```bash
curl "https://api.bydomu.com/v1/webhooks/sample/deal.won" \
  -H "X-API-Key: $BYDOMU_API_KEY"
```

JavaScript:

```js
import { ByDomu } from "@bydomu/sdk";

const bydomu = new ByDomu({
  apiKey: process.env.BYDOMU_API_KEY,
});

const { data } = await bydomu.webhooks.getSample("deal.won");
```

Python:

```python
import os, requests

r = requests.get(
    "https://api.bydomu.com/v1/webhooks/sample/deal.won",
    headers={"X-API-Key": os.environ["BYDOMU_API_KEY"]}
)
data = r.json()
```

**Response · 200 · example**

```json
{
  "data": {
    "id": "5f3a0c1e-7d2b-4f7e-9a51-0b6c1d2e3f40",
    "type": "deal.won",
    "timestamp": "2026-09-22T14:30:00.000Z",
    "organizationId": "clx1org001",
    "livemode": true,
    "actor": {
      "kind": "USER",
      "userId": "clx1usr001"
    },
    "data": {
      "deal": {
        "id": "clx1deal001",
        "title": "Venta Apto Chapinero"
      },
      "contact": {
        "id": "clx1con001",
        "firstName": "María"
      }
    }
  },
  "meta": {
    "synthetic": false
  }
}
```
