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.

Report an idea

POST
/api/widget/reports
curl --request POST \
--url https://feedzzie.com/api/widget/reports \
--header 'Content-Type: application/json' \
--header 'X-Feedzzie-Key: <X-Feedzzie-Key>' \
--header 'X-Widget-Anonymous-Id: example' \
--data '{ "idea_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "reason": "spam", "detail": "example" }'

Reports a public idea of the key’s project to the project’s team, who see it in the panel’s Reports queue and get an email (at most one per idea and hour). A report never hides, moves or changes the idea, whatever the number of reports. Nothing about who reported is kept: no anonymous_id, IP or user agent is stored, and no response carries the anonymous_id. Brakes, in Upstash and keyed by an HMAC of the anonymous_id: the same person and idea within 24 hours saves nothing and sends no email, and is answered exactly like a new report (201), so the answer never tells whether that person had already reported; at most 20 reports per person every 24 hours (429), and the same person and idea again counts against them like a new report, so what is left never tells a repeat apart either; a re-send of a 201 under the same Idempotency-Key gets the 201 again and does not count; and 10 per IP and hour (429). When Upstash cannot be reached nothing is saved (503). Auth via public key (X-Feedzzie-Key) only; without it the answer is 401.

X-Widget-Anonymous-Id
required
string
>= 1 characters <= 255 characters

The person’s anonymous_id, the one the SDK sends as anonymous_id elsewhere: 1 to 255 characters, never starting with board:. Only this header is read: an anonymous_id in the query or the body is ignored, and the server answers 400 without the header

Idempotency-Key
string format: uuid

A UUID (any case) that makes a retry safe for 24 hours: the same key and body answer 201, as the first time, and save nothing; the same key with another body answers 422

Media typeapplication/json
object
idea_id
required
string format: uuid
reason
required

Illegal is accepted for a later SDK; FeedzzieKit 0.5.0 sends the other four

string
Allowed values: spam offensive personal_data illegal other
detail

Optional text for the team, never public: trimmed, at most 500 characters (Unicode code points); empty or blank is saved as none

string
nullable <= 500 characters

Report received: saved, or a repeat (the same person already reported this idea in the last 24 hours, or a retry under the same Idempotency-Key) that saves nothing and sends no email. Both answers are the same, so the response never tells whether that person had already reported

Media typeapplication/json
object
received
required
boolean

Example

{
"received": true
}

Missing or invalid X-Widget-Anonymous-Id, a body that is not JSON, an invalid idea_id or reason, a detail over the limit, 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 or without settings, or domain not allowed (a browser using the key must come from one of the project’s allowed_domains)

No idea with this id in the project of the key

The idea is no longer public: waiting for review, rejected, private or merged

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 with another body

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