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.

Create an anonymous idea

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

Submits an idea as an anonymous widget user. Moderation follows the project’s require_approval setting: the idea is published only when it is explicitly off, and stays pending review (pending=true) when moderation is on or the setting can’t be read. With moderation off, the moderation brake holds it too (pending=true) once the project received 20 widget ideas and comments in the last hour. Pending ideas are not listed until approved. With an Idempotency-Key header, a request sent again with the same key in the same project creates nothing and answers 200 with the first request’s { idea, pending } (Stripe’s pattern, draft-ietf-httpapi-idempotency-key-header). The re-send is spent from the IP rate limit, but not from the daily submissions cap. When the anonymous_id reached the project’s daily idea cap (max_submissions_per_day over the last 24 hours, counted across the organization), the 429’s error names the cap, for example “You’ve reached the limit of 3 ideas per day. Please try again later.”, and is meant to be shown as is. Keys are kept as long as their idea exists, and for 30 days after it is deleted.

Idempotency-Key
string format: uuid

A UUID (any case) generated once per idea and sent with every attempt to submit it. Without it, every request creates an idea.

Media typeapplication/json
object
anonymous_id
required
string
<= 255 characters
title
required
string
>= 1 characters <= 200 characters
description

Optional, unless the config says settings.require_description: then at least 20 characters once trimmed (for now not from the native SDK; see that setting)

string
<= 5000 characters
email
string format: email
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",
"title": "example",
"description": "example",
"email": "[email protected]",
"org": "example",
"project": "example"
}

Re-send of a request already answered (same Idempotency-Key, author, title and description): nothing is created. { idea, pending }, with the idea as it is now and pending=true while it waits in moderation

Idea created: { idea, pending } (pending=true if moderation is on, the project’s setting can’t be read, or the moderation brake holds it)

Validation error, missing required email, missing or short required description, or an Idempotency-Key that is not a UUID

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, project’s 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 submissions off, or anonymous_id banned from this board

Organization or project not found

Another request with the same Idempotency-Key is still being processed: retry later

The idea this Idempotency-Key created was rejected, made private or deleted. The idea is not returned and nothing is created

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"
}

The Idempotency-Key was already used by another author, or with another title or description. Nothing about that request is revealed and nothing is created

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