Peeve Webhooks API
Register and manage the endpoints Peeve delivers events to. Equivalent to the Connectors UI — an endpoint created here is the same row, with the same guarantees.
Register and manage the endpoints Peeve delivers events to. Equivalent to the Connectors UI — an endpoint created here is the same row, with the same guarantees.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/peeve-ai:peeve-ai-webhooks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Peeve Webhooks API
version: '2026-08-17'
description: 'The `/v1` API. Server-to-server only — no CORS headers are sent, no `Origin` is checked, and publishable keys are rejected everywhere.
Most endpoints take a **API token** (`pv_ut_…`), which carries its owner''s live workspace role. `/v1/users` and `/v1/answer` take the **workspace secret key** (`sk_…`). The credential and the required role are stated on every operation — they are not uniform.'
servers:
- url: https://api.peeve.ai
security:
- userToken: []
tags:
- name: Webhooks
description: Register and manage the endpoints Peeve delivers events to. Equivalent to the Connectors UI — an endpoint created here is the same row, with the same guarantees.
paths:
/v1/webhooks:
get:
operationId: listWebhookEndpoints
summary: List webhook endpoints
tags:
- Webhooks
description: '**Credential:** API token · **Role:** any (`read`)
The signing secret is never included; `secret_hint` gives its last 4 characters.'
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/cursor'
responses:
'200':
description: A page of endpoints.
content:
application/json:
schema:
$ref: '#/components/schemas/ListEnvelope'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
x-mint:
metadata:
description: 'List webhook endpoints. Credential: API token · Role: any (read). The signing secret is never included; secret_hint gives its last 4 characters.'
post:
operationId: createWebhookEndpoint
summary: Create a webhook endpoint
tags:
- Webhooks
description: 'Register a destination. An endpoint created here is identical to one created in **Connectors → Webhooks**, including flipping the connector card to connected.
**Credential:** API token · **Role:** owner or admin (`manage_team`)
> **Warning**
>
> **`events` is required.** Omitting it is a `400` naming the field — not a subscription to everything. Pass `["*"]` if you genuinely want every event, including ones added later. `handoff.*` payloads carry real customer message text, so subscribing a new URL to them because a field was left blank is not a convenience.
`channels` **is** optional and defaults to every channel, precisely because a channel filter can only ever narrow an event selection. The four `billing.*` events have no channel, so a channel filter never hides them.
> **Warning**
>
> **The signing secret is returned by this response only** (and by rotate-secret). It is never on a list, a GET or a PATCH, and there is no way to recover it later — store it now.'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- url
- events
additionalProperties: false
properties:
url:
type: string
maxLength: 2048
description: HTTPS only. Private, loopback, link-local and `.internal` destinations are refused.
label:
type:
- string
- 'null'
maxLength: 80
events:
type: array
minItems: 1
items:
type: string
enum:
- session.started
- session.resolved
- handoff.created
- handoff.message.created
- handoff.status.changed
- lead.created
- lead.status.changed
- meeting.booked
- meeting.status.changed
- billing.payment_failed
- billing.subscription.changed
- billing.credits_low
- billing.credits_expiring
- '*'
description: Required. `[]` is refused; `["*"]` means everything.
channels:
type:
- array
- 'null'
items:
type: string
enum:
- human
- agent
- whatsapp
- messenger
- instagram
- email
description: Optional. Omit or `null` for every channel.
enabled:
type: boolean
default: true
description: '`false` creates it paused.'
example:
url: https://example.com/hooks/peeve
label: Prod
events:
- handoff.created
- handoff.message.created
responses:
'200':
description: Created. **The only response that carries the secret**, besides rotate-secret.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEndpointWithSecret'
'400':
description: 'A refused destination (`invalid_webhook_url`), a missing `events`, an empty `events: []`, an unknown body key, or the endpoint cap.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: invalid_request_error
code: invalid_webhook_url
message: Webhook destinations must use https://.
param: url
request_id: req_xxx
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
x-mint:
metadata:
description: Register a webhook endpoint for Peeve events. The events list is required; channels is optional and defaults to all. Needs an owner or admin API token.
/v1/webhooks/{id}:
get:
operationId: getWebhookEndpoint
summary: Get a webhook endpoint
tags:
- Webhooks
description: '**Credential:** API token · **Role:** any (`read`)'
parameters:
- $ref: '#/components/parameters/id'
responses:
'200':
description: The endpoint.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEndpointObject'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
x-mint:
metadata:
description: Get one webhook endpoint by ID with GET /v1/webhooks/{id}. The signing secret is never returned here; you see it only on create and on rotate.
patch:
operationId: updateWebhookEndpoint
summary: Update or pause a webhook endpoint
tags:
- Webhooks
description: '**Credential:** API token · **Role:** owner or admin (`manage_team`)
`enabled: false` **pauses** — reversible, and it keeps the signing secret and the delivery history. For a hard delete use DELETE. There is no third lifecycle state; this matches the connector UI exactly.
Destination validation runs on PATCH as well as create, so you cannot edit an endpoint into a private address.'
parameters:
- $ref: '#/components/parameters/id'
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
properties:
url:
type: string
maxLength: 2048
label:
type:
- string
- 'null'
maxLength: 80
events:
type: array
items:
type: string
enum:
- session.started
- session.resolved
- handoff.created
- handoff.message.created
- handoff.status.changed
- lead.created
- lead.status.changed
- meeting.booked
- meeting.status.changed
- billing.payment_failed
- billing.subscription.changed
- billing.credits_low
- billing.credits_expiring
- '*'
channels:
type:
- array
- 'null'
items:
type: string
enum:
- human
- agent
- whatsapp
- messenger
- instagram
- email
enabled:
type: boolean
example:
enabled: false
responses:
'200':
description: The updated endpoint. Never carries the secret.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEndpointObject'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
x-mint:
metadata:
description: 'Update a webhook endpoint, or pause it with enabled: false, which keeps its signing secret and delivery history. Needs an owner or admin API token.'
delete:
operationId: deleteWebhookEndpoint
summary: Delete a webhook endpoint
tags:
- Webhooks
description: 'Permanent. Discards the endpoint id and its delivery history.
**Credential:** API token · **Role:** owner or admin (`manage_team`)
> **Note**
>
> To stop deliveries temporarily, PATCH `enabled: false` instead. To replace a leaked secret, use rotate-secret — deleting and re-creating changes the endpoint id and throws away its history.'
parameters:
- $ref: '#/components/parameters/id'
responses:
'200':
description: Deleted.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjectEnvelope'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
x-mint:
metadata:
description: 'Permanently delete a webhook endpoint and its delivery history. To stop deliveries for a while, set enabled: false; to replace a secret, rotate it.'
/v1/webhooks/{id}/rotate-secret:
post:
operationId: rotateWebhookSecret
summary: Rotate a signing secret
tags:
- Webhooks
description: 'Mint a new signing secret for this endpoint, keeping its id, its subscription and its delivery history. This exists so a leaked secret does not force a delete-and-recreate.
**Credential:** API token · **Role:** owner or admin (`manage_team`)
> **Warning**
>
> **The signing secret is returned by this response only** (and by rotate-secret). It is never on a list, a GET or a PATCH, and there is no way to recover it later — store it now.'
parameters:
- $ref: '#/components/parameters/id'
responses:
'200':
description: The endpoint, with the new secret.
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookEndpointWithSecret'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
x-mint:
metadata:
description: 'Rotate a webhook signing secret and keep the endpoint ID, subscription and delivery history. The new secret is shown once in the response: store it now.'
/v1/webhooks/{id}/test:
post:
operationId: sendWebhookTest
summary: Send a test delivery
tags:
- Webhooks
description: 'Deliver a signed test event so you can confirm your receiver verifies signatures before relying on it. The delivery carries `livemode: false` and a `Peeve-Test: true` header — never create real records from it.
**Credential:** API token · **Role:** owner or admin (`manage_team`)
> **Warning**
>
> Capped at **20 test sends per endpoint per hour**. The UI''s button never needed a cap; a scripted loop against a public URL is an outbound amplifier wearing Peeve''s IP address. Over the cap is a `429`.'
parameters:
- $ref: '#/components/parameters/id'
responses:
'200':
description: The test result, including your endpoint's response code.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ObjectEnvelope'
- type: object
properties:
data:
type: object
properties:
object:
type: string
const: webhook_test
additionalProperties: true
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
description: Over 20 test sends for this endpoint this hour.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
headers:
Retry-After:
schema:
type: integer
x-mint:
metadata:
description: 'Send a signed test event to a webhook endpoint to check that your receiver verifies signatures. It carries livemode: false. Capped at 20 sends an hour.'
/v1/webhooks/{id}/deliveries:
get:
operationId: listWebhookDeliveries
summary: List deliveries for an endpoint
tags:
- Webhooks
description: 'The delivery log: what was sent, the outcome, your response code and the attempts taken.
**Credential:** API token · **Role:** any (`read`)'
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/created_after'
- $ref: '#/components/parameters/created_before'
- name: status
in: query
schema:
type: string
enum:
- delivered
- failed
- suppressed
- blocked
- name: event
in: query
schema:
type: string
enum:
- session.started
- session.resolved
- handoff.created
- handoff.message.created
- handoff.status.changed
- lead.created
- lead.status.changed
- meeting.booked
- meeting.status.changed
- billing.payment_failed
- billing.subscription.changed
- billing.credits_low
- billing.credits_expiring
- name: is_test
in: query
schema:
type: boolean
responses:
'200':
description: A page of deliveries.
content:
application/json:
schema:
$ref: '#/components/schemas/ListEnvelope'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimited'
components:
responses:
RateLimited:
description: Over the per-credential ceiling. Carries `Retry-After`. All `/v1` endpoints share one bucket per credential.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: rate_limit_error
code: rate_limit_exceeded
message: Too many requests (key limit). Retry in 60s.
request_id: req_xxx
headers:
Retry-After:
schema:
type: integer
description: Seconds to wait.
Unauthorized:
description: 'Missing, invalid or revoked credential — or the wrong **kind** of credential.
Note the API''s own wording: the code is `user_token_required` and the message says "user token". That is the same thing the dashboard calls an **API token** (`pv_ut_…`), under Settings → API keys.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
examples:
wrongKind:
summary: A secret key on a user-token endpoint
value:
error:
type: authentication_error
code: user_token_required
message: This endpoint requires a user token (pv_ut_…), not a workspace secret key. A shared key cannot express a person's role, so it cannot be used to read workspace data or change configuration. Create your own token in Settings → API keys.
request_id: req_xxx
publishable:
summary: A publishable key
value:
error:
type: authentication_error
code: publishable_key_not_allowed
message: Publishable keys (pk_…) are public by construction and can never read or write workspace data.
request_id: req_xxx
invalid:
summary: Revoked, unknown, or the owner left the workspace
value:
error:
type: authentication_error
code: invalid_credential
message: That credential is not valid, has been revoked, or its owner is no longer a member of this workspace.
request_id: req_xxx
NotFound:
description: No such record **in this workspace**. Identical whether the id belongs to another tenant or does not exist — a distinguishable response would be an existence oracle.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: not_found_error
code: resource_not_found
message: No lead with id '00000000-0000-4000-8000-000000000000' in this workspace.
param: id
request_id: req_xxx
Forbidden:
description: The credential is valid but its **role** is insufficient. The message names the role it resolved to and the capability it lacked.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: invalid_request_error
code: insufficient_role
message: This credential acts as 'viewer', which cannot change workspace settings (owner or admin). An API token carries its owner's workspace role, so this needs a teammate whose role holds 'manage_team'.
request_id: req_xxx
BadRequest:
description: An unknown or duplicated parameter, a bad value, a backwards date window, or a rejected unknown body key. The `param` field names the offender.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
type: invalid_request_error
code: unknown_parameter
message: 'Unknown query parameter ''since''. This endpoint accepts: created_after, created_before, cursor, limit, order, sort.'
param: since
request_id: req_xxx
parameters:
id:
name: id
in: path
required: true
schema:
type: string
format: uuid
order:
name: order
in: query
schema:
type: string
enum:
- asc
- desc
default: desc
cursor:
name: cursor
in: query
schema:
type: string
description: An opaque `next_cursor` from a previous page. Do not parse or construct it. Reusing a cursor under a different `sort`/`order` is rejected.
limit:
name: limit
in: query
schema:
type: integer
default: 50
maximum: 200
minimum: 1
description: Page size. Over 200 is a `400`, not a silent clamp.
created_before:
name: created_before
in: query
schema:
type: string
format: date-time
created_after:
name: created_after
in: query
schema:
type: string
format: date-time
schemas:
WebhookEndpoint:
type: object
properties:
id:
type: string
format: uuid
object:
type: string
const: webhook_endpoint
url:
type: string
format: uri
label:
type:
- string
- 'null'
maxLength: 80
events:
type: array
items:
type: string
enum:
- session.started
- session.resolved
- handoff.created
- handoff.message.created
- handoff.status.changed
- lead.created
- lead.status.changed
- meeting.booked
- meeting.status.changed
- billing.payment_failed
- billing.subscription.changed
- billing.credits_low
- billing.credits_expiring
- '*'
channels:
type:
- array
- 'null'
items:
type: string
enum:
- human
- agent
- whatsapp
- messenger
- instagram
- email
description: '`null` means every channel.'
enabled:
type: boolean
description: '`false` is paused — reversible, keeps the secret and delivery history.'
secret_hint:
type:
- string
- 'null'
description: Last 4 characters of the signing secret, so a rotation can be confirmed without exposing it.
secret_set_at:
type:
- string
- 'null'
format: date-time
last_delivery_at:
type:
- string
- 'null'
format: date-time
last_status:
type:
- string
- 'null'
last_response_code:
type:
- integer
- 'null'
ListEnvelope:
type: object
required:
- object
- data
- has_more
- next_cursor
- request_id
properties:
object:
type: string
const: list
data:
type: array
items:
type: object
additionalProperties: true
has_more:
type: boolean
description: Always present, so a paging loop never branches.
next_cursor:
type:
- string
- 'null'
description: Pass as `cursor` for the next page. `null` on the last page.
request_id:
type: string
ObjectEnvelope:
type: object
required:
- object
- data
- request_id
properties:
object:
type: string
description: The resource type, e.g. `lead`.
data:
type: object
additionalProperties: true
request_id:
type: string
description: Echoed in the `X-Request-Id` header. Quote it to support.
WebhookEndpointWithSecret:
allOf:
- $ref: '#/components/schemas/ObjectEnvelope'
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/WebhookEndpoint'
- type: object
properties:
secret:
type: string
description: The signing secret (`whsec_…`). **Returned only here and on rotate-secret. It cannot be recovered later.**
WebhookEndpointObject:
allOf:
- $ref: '#/components/schemas/ObjectEnvelope'
- type: object
properties:
data:
$ref: '#/components/schemas/WebhookEndpoint'
ErrorEnvelope:
type: object
required:
- error
- request_id
properties:
error:
type: object
required:
- type
- code
- message
properties:
type:
type: string
enum:
- authentication_error
- invalid_request_error
- not_found_error
- rate_limit_error
- api_error
description: The coarse family. Branch on this.
code:
type: string
description: The stable machine label.
message:
type: string
param:
type: string
description: The offending query parameter or dotted body path.
request_id:
type: string
securitySchemes:
userToken:
type: http
scheme: bearer
description: 'An API token (`pv_ut_…`) as `Authorization: Bearer pv_ut_…`. `X-Peeve-Key` is accepted too. **Never a query parameter** — URLs end up in proxy logs and `Referer` headers.
The token carries its owner''s **live** workspace role, re-read on every call.'
secretKey:
type: http
scheme: bearer
description: 'The workspace secret key (`sk_…`) as `Authorization: Bearer sk_…`. `X-Peeve-Key` is accepted too.'