Ir al contenido
Esta referencia está solo en inglés. Las guías de la API están en español: primeros pasos con curl.

Identify a widget/SDK user

POST
/api/widget/users/identify
curl --request POST \
--url https://feedzzie.com/api/widget/users/identify \
--header 'Content-Type: application/json' \
--header 'X-Feedzzie-Key: <X-Feedzzie-Key>' \
--data '{ "anonymous_id": "example", "email": "[email protected]", "name": "example", "custom_id": "example", "payment_per_month": 1, "org": "example", "project": "example" }'

Idempotent upsert of an anonymous user profile keyed by (project, anonymous_id): a profile belongs to one app. Auth via public key (X-Feedzzie-Key), which gives the project and ignores org and project in the body, or the org slug (and optional project slug) in the body + Origin. Only provided fields are updated (sparse merge). email, name, custom_id and payment_per_month are declared by the visitor’s app and unsigned: do not use them for priority or segmentation until identify carries a signature from the customer’s server.

Media typeapplication/json
object
anonymous_id
required
string
<= 255 characters
email
string format: email
name
string
<= 200 characters
custom_id
string
<= 200 characters
payment_per_month

Optional MRR declared by the visitor’s app, unsigned: do not use it for priority or segmentation until identify carries a signature from the customer’s server

number
org

Org slug (only for the slug + Origin auth path)

string
project

Project slug inside the org (only for the slug + Origin auth path; defaults to the org’s default project)

string

Example generated

{
"anonymous_id": "example",
"email": "[email protected]",
"name": "example",
"custom_id": "example",
"payment_per_month": 1,
"org": "example",
"project": "example"
}

User identified. Returns only the profile identifiers, never email, name, custom_id or payment_per_month

Media typeapplication/json
object
user
object
id
string format: uuid
anonymous_id
string

Example generated

{
"user": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"anonymous_id": "example"
}
}

Validation error / missing org

The X-Feedzzie-Key public key is invalid, revoked or expired

Media typeapplication/json
object
error
string

Example

{
"error": "Invalid or revoked public key"
}

Public key not bound to a project, app bundle ID not allowed, widget disabled, domain not allowed (a write that carries an Origin header, with or without a key, must come from one of the project’s allowed_domains, so a project without them only takes writes by key without Origin), anonymous feedback off, or anonymous_id banned from this board

Organization or project not found

The body is over 64 KiB. With a Content-Length over the cap it is refused before the body is read; without one (a chunked body), reading stops at the cap

Media typeapplication/json
object
error
string

Example

{
"error": "Request body too large"
}

Too many requests: the per-IP limit, the per-IP limit of distinct anonymous_id values, the daily cap of this anonymous_id, or the 5 votes per idea and IP every 24 hours; an IPv6 client also shares each per-IP limit with its /48 network. Retry after Retry-After seconds.

Media typeapplication/json
object
error
required
string
retryAfter
required

The Retry-After value, readable from a browser on any origin

integer
>= 1

Example

{
"error": "Rate limit exceeded",
"retryAfter": 1830
}
Retry-After
integer
>= 1

Seconds to wait before retrying

The rate limiter (Upstash) could not be reached, or a read the widget needs (the public key, the organization, the project or its old slugs, the idea, a parent comment or the widget settings) failed, so the request was not processed. Retry after the given delay. A failed read is never answered as a 401, 403 or 404, so it says nothing about the key or the board. When only Upstash fails, reads are served without the rate limiter.

Media typeapplication/json
object
error
string
retryAfter
integer

Example

{
"error": "Service temporarily unavailable",
"retryAfter": 30
}
Retry-After
integer

Seconds to wait before retrying