Peeve Users API
Push your identified users into Peeve from your backend.
Push your identified users into Peeve from your backend.
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-users-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 Users 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: Users
description: Push your identified users into Peeve from your backend.
paths:
/v1/users:
post:
operationId: pushUser
summary: Create or update a user
tags:
- Users
security:
- secretKey: []
description: 'Create or update one of **your** users, keyed by `(workspace, external_user_id)`. Sending the same `external_user_id` again updates the record; omitted fields are left untouched — so this is both create and update.
> **Note**
>
> **Users are a subset of contacts.** A contact is anyone Peeve has seen. Those your product identified are `kind: "user"`; the rest are anonymous `kind: "visitor"` records Peeve mints itself. This endpoint writes users only — it requires a real `external_user_id`. To read them back, use `GET /v1/contacts` with `?kind=user`.
**Credential: workspace secret key (`sk_…`)** — not an API token. This runs in your backend on a signup hook or a schedule; tying a production pipeline to one employee''s token would break the day they leave.
Identity fields are encrypted at rest. `plan` is a plaintext display name. `attributes` is the server-side equivalent of the browser''s `setContext`.
> **Warning**
>
> This endpoint predates the `/v1` envelope and keeps its original response shape for compatibility with live callers. It is the one endpoint that does not return `{ object, data, request_id }`.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserPush'
example:
external_user_id: user_8412
email: dana@example.com
name: Dana Whitfield
company: Example Corp
plan: Growth
created_at: '2026-02-14T09:31:00Z'
attributes:
seats: 12
role: admin
responses:
'200':
description: Stored. Legacy shape — no envelope.
content:
application/json:
schema:
type: object
properties:
id:
type: string
format: uuid
external_user_id:
type: string
workspace:
type: string
example:
id: 00000000-0000-4000-8000-000000000000
external_user_id: user_8412
workspace: example-corp
'400':
description: Malformed JSON, or `external_user_id` missing.
content:
application/json:
schema:
$ref: '#/components/schemas/LegacyError'
example:
error: external_user_id is required
'401':
description: Not a valid secret key.
content:
application/json:
schema:
$ref: '#/components/schemas/LegacyError'
example:
error: a secret key (sk_*) is required
'500':
description: Could not store the user.
content:
application/json:
schema:
$ref: '#/components/schemas/LegacyError'
example:
error: could not store user
'503':
description: Persistence not configured.
content:
application/json:
schema:
$ref: '#/components/schemas/LegacyError'
x-mint:
metadata:
description: Create or update one of your users by external_user_id from your backend. Sending an ID again updates it; omitted fields stay. Uses the secret key.
components:
schemas:
UserPush:
type: object
required:
- external_user_id
properties:
external_user_id:
type: string
description: Your stable id for this user. The identity key — it ties the record to its history, so it must survive key rotation.
email:
type: string
format: email
description: Encrypted at rest, indexed by a keyed hash so lookup still works.
name:
type: string
description: Encrypted at rest.
company:
type: string
description: Encrypted at rest.
phone:
type: string
description: Encrypted at rest.
plan:
type: string
maxLength: 80
description: The user's plan in *your* product, as a display name. Plaintext; it does not affect your Peeve entitlements.
created_at:
type: string
description: When the account was created in your product. Distinguishes a new signup from a returning user browsing logged out.
vendor_token:
type: string
description: A token your backend issues for this user, stored encrypted so a Custom API connector can call your API as them. Never travels through the browser.
attributes:
type: object
additionalProperties: true
description: Free-form business context, merged into the user's stored attributes. Plaintext and non-secret — identity belongs in the fields above.
LegacyError:
type: object
description: '`/v1/users` and `/v1/answer` predate the envelope and return this flat shape.'
properties:
error:
type: string
reason:
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.'