{
  "openapi": "3.0.3",
  "info": {
    "title": "Feedzzie API",
    "version": "1.0.0",
    "description": "The Feedzzie API allows you to programmatically manage customer feedback, including ideas, comments, and votes.\n\n## Authentication\n\nAll API endpoints require authentication using Bearer tokens. Include your secret API key (`fz_live_…`) in the `Authorization` header; the scheme name is case-insensitive:\n\n```\nAuthorization: Bearer fz_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\nAPI keys can be created in Settings > API Keys with different permission scopes. A public key (`fz_pub_…`, for FeedzzieKit) gets `403` here.\n\n## Scopes\n\n| Scope | Description |\n|-------|-------------|\n| `read` | Read access to ideas, comments, topics and the key itself (`GET /me`) |\n| `write` | Create and update resources |\n| `admin` | Full access including delete and status changes |\n\n## Ideas that are not approved, and duplicates\n\nAn idea is approved unless it is awaiting moderation (`status: pending_review`) or was rejected (`status: rejected`); `is_approved` says which. An idea that is not approved may carry unreviewed content, so it exists only for an `admin` key, in every operation and also by id: any other key gets `404` for the idea, its comments and its votes, as for an idea that does not exist. Lists return only approved ideas unless an `admin` key sends `include_pending=true`.\n\nA duplicate is an idea merged into another one, the main idea: it has `status: duplicate`, and the main idea's id in `merged_into` and in `is_duplicate_of`; its votes, followers and comments moved to the main idea. A duplicate marked before merging existed has `is_duplicate_of` (`null` once the original is deleted) and no `merged_into`. A duplicate stays approved, so every key lists and reads it, and `status=duplicate` lists only duplicates. `duplicate` is a `status` update value only together with `merged_into`, which merges the idea (`PATCH /api/v1/ideas/{id}`).\n\n## Rate Limits\n\nRate limits vary by plan. Each API key and the organization as a whole get the plan's requests per minute, so a request passes only when both have room: more keys do not add up to more requests.\n\n| Plan | Requests/minute |\n|------|-----------------|\n| Free | 60 |\n| Starter | 100 |\n| Pro | 300 |\n| Business | 1000 |\n\nEvery response to a request the limiter counted carries (a `429` too):\n- `X-RateLimit-Limit`: Maximum requests allowed in the window\n- `X-RateLimit-Remaining`: Requests remaining in the current window\n- `X-RateLimit-Reset`: When the window resets, in Unix time in milliseconds\n\nA `429` also carries `Retry-After`: the whole seconds to wait before retrying. A request refused before the limiter (`401`, `403` for a public key, or the `503` of a key that could not be read) has no window to report. A request refused for a missing scope (`403`) is counted, so it carries them and can get the `429`.\n\nEvery `/api/v1` response, also a `204`, carries `X-Request-Id`: the `meta.request_id` of the body.\n\n### FeedzzieKit endpoints\n\nThe `/api/widget/*` endpoints count per client IP (an IPv6 client by its /64 network):\n\n| Requests | Limit per IP |\n|----------|--------------|\n| Reads | 60 per minute |\n| Votes (POST and DELETE) | 30 per minute |\n| Identify | 10 per minute |\n| Ideas | 5 per hour |\n| Comments | 15 per hour |\n\nOne IP may also use at most 10 distinct `anonymous_id` values per hour for votes, 20 for identify, and 8 for ideas and comments. Each `anonymous_id` also has daily caps: the project's `max_submissions_per_day` for ideas, the project's `max_votes_per_day` for votes, and 10 comments in every project. The `anonymous_id`'s rows are counted across the whole organization over the last 24 hours, so reaching a cap in one project of the organization also blocks it in the others.\n\nEach idea also takes at most 5 votes per IP every 24 hours, whatever the `anonymous_id`; removing a vote does not give it back.\n\nAn IPv6 client also shares each of these per-IP limits with its whole /48 network, at 4 times the limit: for example 120 votes per minute, 40 distinct `anonymous_id` values per hour for votes, and 20 votes per idea every 24 hours. IPv4 has a single level.\n\nEvery one of these limits answers `429` with `Retry-After` in seconds and the JSON body `{ \"error\", \"retryAfter\" }`.\n\n## Pagination\n\nList endpoints support pagination with the following query parameters:\n- `page`: Page number, a whole number from 1 to 90071992547409 (default: 1)\n- `per_page`: Items per page, a whole number from 1 to 100 (default: 20)\n\nA value outside its range answers `400`; it is never corrected silently. Responses include pagination metadata in the `meta.pagination` field, where `per_page` is the page size applied.\n\nA page past the last one is not an error: it answers `200` with an empty list, and the total still counts the whole result.\n\nLists are ordered by their sort and then by `id`, so ideas or comments with the same value keep one order from page to page: walking every page while nobody writes sees each item once. A write between two pages can still move an item to a page already read (a new vote moves an idea up in `most_votes`): to read every idea, walk by cursor.\n\n### Walking every idea by cursor\n\n`GET /ideas` also walks by cursor, in creation order (`created_at`, then `id`), an order no vote, edit or status change moves. Send `cursor=start` for the first page, then each page's `meta.cursor.next` as `cursor`, with the same filters, until `meta.cursor.has_more` is `false` (`next` is then `null`). Every idea that existed when the walk started is listed exactly once, however it is voted, commented or edited meanwhile; with `status`, `topic_id` or `search`, an idea an edit takes out of the filter while the walk runs is not listed. An idea created during the walk usually comes at its end, and the next sync brings back one that does not. A cursor page has `meta.cursor` (`next`, `has_more`, `per_page`) instead of `meta.pagination`, and no total. It takes `per_page` but not `page`, and `sort` only as `oldest`; a cursor the API did not issue, or sent with other filters (`status`, `topic_id`, `search`, `include_pending`, `updated_since`), answers `400` naming `cursor`. Without `cursor`, the list is paginated by page as before.\n\n### Syncing with updated_since\n\n`updated_since` lists only the ideas created or changed at or after a time (a vote, a comment count, an edit or a status change all change `updated_at`), by page or by cursor. To keep a copy in sync, walk every idea once, then on each sync walk with `updated_since` set a minute before the `meta.timestamp` of the previous walk's first page: the minute covers the clocks of the database and the API and an idea written while that page was read, and an idea can come twice, so match by `id`. A deleted idea is not listed: a full walk shows which ideas are gone. Renaming a topic or an author does not change their ideas' `updated_at`.\n\nA list's query string is strict: an unknown parameter, a repeated one, or a value outside its schema answers `400` naming the parameter in `error.details`, instead of a list that ignores it.\n\n## Errors\n\nThe API uses conventional HTTP status codes:\n- `400` - Validation error (check `error.details`): a body or query value outside its schema, or a malformed id in the path\n- `401` - Missing or invalid API key\n- `403` - Refused, with `error.code` saying why and `error.details` what would be accepted: `WRONG_KEY_TYPE` (a public key; the REST API accepts only secret keys, `details[0].expected` is `secret`), `INSUFFICIENT_SCOPE` (the operation, a parameter such as `include_pending` or a field such as `status` or `is_official` needs a wider scope, named in `details[0].expected`) or `PLAN_LIMIT_REACHED` (the write would take the organization past its plan: `details[0].field` is the resource and `details[0].limit` the plan's limit)\n- `404` - Resource not found. A path under `/api/v1` that no operation serves also answers `404` with this JSON body (`NOT_FOUND`), whatever the method\n- `405` - `METHOD_NOT_ALLOWED`: the path exists but not with this method; `Allow` lists the methods it serves\n- `409` - `CONFLICT`: the state does not allow the change (the status of an idea awaiting moderation), or another request with the same `Idempotency-Key` is still being processed (retry later)\n- `410` - `GONE`: the idea an `Idempotency-Key` created was deleted; nothing is created\n- `422` - `IDEMPOTENCY_KEY_REUSED`: the `Idempotency-Key` was already used with another request body; nothing is created\n- `429` - Rate limit exceeded\n- `500` - Server error, such as a write the database could not make\n- `503` - `SERVICE_UNAVAILABLE`, retry after `Retry-After`: a database read the request needs failed (the key, its organization or plan, the idea, a comment, a vote or a topic), on any operation, read or write; never the `401`, `404`, empty list or lower plan of what is not there. Also the rate limiter unavailable on a write (POST, PATCH, DELETE here, or a FeedzzieKit write); reads go through. A FeedzzieKit operation, read or write, also answers `503` when a read it needs (the public key, the organization, the project or its old slugs, the idea, a parent comment or the widget settings) fails: never the `401`, `403` or `404` of what does not exist",
    "contact": {
      "name": "Feedzzie Support",
      "email": "support@feedzzie.com",
      "url": "https://feedzzie.com"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://feedzzie.com/api/v1",
      "description": "API v1"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Ideas",
      "description": "Manage customer feedback and feature requests"
    },
    {
      "name": "Comments",
      "description": "Manage comments on ideas"
    },
    {
      "name": "Votes",
      "description": "Vote on ideas"
    },
    {
      "name": "Topics",
      "description": "The topics an idea can take"
    },
    {
      "name": "Account",
      "description": "The API key in use: its organization, plan, scopes and rate limit"
    },
    {
      "name": "FeedzzieKit",
      "description": "Mobile SDK endpoints (public fz_pub_* keys, served under /api/widget/*)"
    }
  ],
  "paths": {
    "/ideas": {
      "get": {
        "tags": [
          "Ideas"
        ],
        "summary": "List ideas",
        "description": "Retrieve a list of ideas for your organization, by page (`page`, with `meta.pagination`) or by cursor (`cursor`, with `meta.cursor`; see «Walking every idea by cursor»). Only approved ideas are returned (a `duplicate` idea is approved), unless `include_pending=true` is sent with an `admin` key: then also those awaiting moderation and the rejected ones.",
        "operationId": "listIdeas",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/PerPageParam"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by idea status: one of the lifecycle statuses, or `duplicate` for the ideas marked as a duplicate of another. Any other value answers 400.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/IdeaStatusFilter"
            }
          },
          {
            "name": "topic_id",
            "in": "query",
            "description": "Filter by topic UUID. A value that is not a UUID answers 400.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search in title and description. Case-insensitive, and the text is matched as written: `*`, `%` and `_` are plain characters, not wildcards. A value over 100 characters gets 400.",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort order, then `id`: `newest` and `oldest` by creation time, `most_votes` and `most_comments` by their count, highest first. Any other value answers 400. With `cursor`, only `oldest` (the walk's order) is accepted; leaving it out is the same.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "most_votes",
                "most_comments"
              ],
              "default": "most_votes"
            }
          },
          {
            "name": "include_pending",
            "in": "query",
            "description": "Also list the ideas that are not approved (`is_approved: false`: awaiting moderation, `pending_review`, or rejected, `rejected`) when `true`. Requires the `admin` scope; other keys get 403. Only `true` and `false` are accepted; any other value answers 400.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Only the ideas created or changed at or after this time: an ISO 8601 date-time with its offset (`2026-11-25T10:00:00Z`), read to the millisecond. A vote, a comment count, an edit or a status change changes an idea's `updated_at`. Any other value answers 400.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Walk by cursor instead of by page: `start` for the first page, then the `meta.cursor.next` of the page before, with the same filters. Not with `page`; `sort` only as `oldest`. A cursor the API did not issue, or issued with other filters, answers 400.",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response: `meta.pagination` by page, `meta.cursor` by cursor",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeasListResponse"
                },
                "example": {
                  "data": [
                    {
                      "id": "123e4567-e89b-12d3-a456-426614174000",
                      "title": "Add dark mode support",
                      "description": "It would be great to have a dark mode option for better visibility at night.",
                      "status": "in_progress",
                      "vote_count": 42,
                      "comment_count": 8,
                      "is_private": false,
                      "is_pinned": true,
                      "is_approved": true,
                      "created_at": "2024-01-15T10:30:00Z",
                      "updated_at": "2024-01-20T14:45:00Z",
                      "author": {
                        "id": "user_abc123",
                        "full_name": "John Doe",
                        "avatar_url": "https://example.com/avatar.jpg"
                      },
                      "topic": {
                        "id": "456e7890-e89b-12d3-a456-426614174000",
                        "name": "Feature Requests",
                        "color": "#3B82F6"
                      }
                    }
                  ],
                  "meta": {
                    "request_id": "req_abc123xyz",
                    "timestamp": "2024-01-22T10:00:00Z",
                    "pagination": {
                      "page": 1,
                      "per_page": 20,
                      "total": 156,
                      "total_pages": 8,
                      "has_more": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Ideas"
        ],
        "summary": "Create an idea",
        "description": "Create a new idea in the organization's default project. Ideas created via API are automatically approved and have no user author (`author: null`). Requires `write` scope. When the project requires a topic for new ideas, a request without `topic_id` answers 400. The idea is open, so it counts toward the plan's active ideas limit: when the organization has reached it, the request answers 403 `PLAN_LIMIT_REACHED` and no idea is created. Two requests at once cannot both take the last place: the second answers 403 `PLAN_LIMIT_REACHED`. Safe to retry with an `Idempotency-Key` header: the same request sent again with the same key and the same API key creates nothing and answers `200` with the idea, as it is now, also when the plan has filled up since; the same key with another body answers `422` `IDEMPOTENCY_KEY_REUSED`, and once the idea it created was deleted, `410` `GONE` (for 30 days after the delete). Without the header, every request creates an idea.",
        "operationId": "createIdea",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIdeaRequest"
              },
              "example": {
                "title": "Add keyboard shortcuts",
                "description": "Adding keyboard shortcuts would improve productivity for power users.",
                "topic_id": "456e7890-e89b-12d3-a456-426614174000",
                "is_private": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Re-send of a request already answered (same Idempotency-Key, API key and body): nothing is created. The idea, as it is now",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaResponse"
                }
              }
            }
          },
          "201": {
            "description": "Idea created successfully",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyKeyInProgress"
          },
          "410": {
            "description": "The idea this Idempotency-Key created was deleted: nothing is created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "GONE",
                    "message": "The idea this Idempotency-Key created was deleted"
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyKeyReused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      }
    },
    "/ideas/{id}": {
      "get": {
        "tags": [
          "Ideas"
        ],
        "summary": "Get an idea",
        "description": "Retrieve a single idea by ID. Includes detailed information including ETA dates, `is_approved` and, for a duplicate, `is_duplicate_of`. A malformed ID answers 400; an idea that does not exist or belongs to another organization answers 404. An idea that is not approved (awaiting moderation or rejected) exists only for an `admin` key: any other key gets `404`, as for an idea that does not exist.",
        "operationId": "getIdea",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdeaIdParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      },
      "patch": {
        "tags": [
          "Ideas"
        ],
        "summary": "Update an idea",
        "description": "Update an existing idea. Requires `write` scope; changing `status` requires `admin` scope. A `topic_id` must be a topic of the idea's own project; `topic_id: null` removes the topic, except when the project requires one (400). The status is the lifecycle of an approved idea: an idea awaiting moderation or rejected keeps its review state until a moderator approves it in the moderation queue, so a request with `status` on it answers 409 and changes nothing, not even its other fields. An idea that is not approved (awaiting moderation or rejected) exists only for an `admin` key: any other key gets `404`, as for an idea that does not exist. Moving an idea back to an active status (`open`, `under_consideration`, `planned`, `in_progress`) counts toward the plan's active ideas limit: with the organization at its limit it answers 403 `PLAN_LIMIT_REACHED` and nothing changes.\n\n**Merging a duplicate** (requires `admin` scope): `{\"status\": \"duplicate\", \"merged_into\": \"<main idea id>\"}`, or `merged_into` alone, merges this idea into the main one: its status becomes `duplicate`, and its votes, followers and comments move to the main idea, each person counted once (a member, a widget or SDK visitor, your organization through the API). Both ideas must be approved and in the same project; the main idea cannot be merged itself, this idea cannot already have ideas merged into it, nor be linked to an announcement (409). `merged_into` cannot go with other fields (400), and `status: duplicate` needs it (400). `{\"merged_into\": null}` undoes the merge: the idea gets back the status it had and what came from it, and any other field sent is applied after. With `status`, `{\"merged_into\": null, \"status\": \"open\"}`, the undo sets that status instead, in the same transaction. Like reopening, it answers 403 `PLAN_LIMIT_REACHED` when the status it leaves would pass the plan's active ideas limit, and then nothing changes: the idea stays merged. A merged idea takes no other change: 409, naming the idea it is merged into.",
        "operationId": "updateIdea",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdeaIdParam"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIdeaRequest"
              },
              "examples": {
                "update": {
                  "summary": "Update fields",
                  "value": {
                    "title": "Updated title",
                    "status": "in_progress"
                  }
                },
                "merge": {
                  "summary": "Merge into another idea",
                  "value": {
                    "status": "duplicate",
                    "merged_into": "123e4567-e89b-12d3-a456-426614174000"
                  }
                },
                "undo": {
                  "summary": "Undo the merge",
                  "value": {
                    "merged_into": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Idea updated successfully",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The idea is awaiting moderation or rejected: its status changes only once approved. Or the merge is refused by the state of either idea, or the idea is merged and the request does not undo it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "CONFLICT",
                    "message": "Idea is not approved: its status changes only after moderation approves it"
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Ideas"
        ],
        "summary": "Delete an idea",
        "description": "Permanently delete an idea and all associated votes and comments. Requires `admin` scope. While other ideas are merged into it, it holds their votes, followers and comments, so the request answers 409 and nothing is deleted: undo those merges first (`PATCH` with `merged_into: null`). Deleting a merged idea leaves what it gave the main idea there for good.",
        "operationId": "deleteIdea",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdeaIdParam"
          }
        ],
        "responses": {
          "204": {
            "description": "Idea deleted successfully",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      }
    },
    "/ideas/{id}/comments": {
      "get": {
        "tags": [
          "Comments"
        ],
        "summary": "List comments for an idea",
        "description": "Retrieve all comments for a specific idea with pagination, oldest first and then by `id`. A flat list: a reply carries its `parent_id`. `page` and `per_page` are the only query parameters. An idea that is not approved (awaiting moderation or rejected) exists only for an `admin` key: any other key gets `404`, as for an idea that does not exist.",
        "operationId": "listIdeaComments",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdeaIdParam"
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/PerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentsListResponse"
                },
                "example": {
                  "data": [
                    {
                      "id": "789e0123-e89b-12d3-a456-426614174000",
                      "idea_id": "123e4567-e89b-12d3-a456-426614174000",
                      "content": "This would be really helpful for our team!",
                      "parent_id": null,
                      "is_official": false,
                      "created_at": "2024-01-16T10:30:00Z",
                      "updated_at": "2024-01-16T10:30:00Z",
                      "author": {
                        "id": "user_xyz789",
                        "full_name": "Jane Smith",
                        "avatar_url": null
                      }
                    }
                  ],
                  "meta": {
                    "request_id": "req_def456xyz",
                    "timestamp": "2024-01-22T10:00:00Z",
                    "pagination": {
                      "page": 1,
                      "per_page": 20,
                      "total": 8,
                      "total_pages": 1,
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "Comments"
        ],
        "summary": "Create a comment",
        "description": "Add a new comment to an idea. Setting `is_official` requires `admin` scope. Requires `write` scope. The comment is signed by the person who created the API key (`author`), and the comment remembers the key: only that same key, with `admin` scope, can later update it (`PATCH /comments/{id}`). An idea that is not approved (awaiting moderation or rejected) exists only for an `admin` key: any other key gets `404`, as for an idea that does not exist. Safe to retry with an `Idempotency-Key` header: the same request sent again with the same key and the same API key creates nothing and answers `200` with the comment, as it is now; the same key with another body or on another idea answers `422` `IDEMPOTENCY_KEY_REUSED`. A re-send after the comment was deleted creates it again. Without the header, every request creates a comment. A merged idea takes no comment: 409, naming the idea it is merged into, whose comments include its own.",
        "operationId": "createComment",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdeaIdParam"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKeyHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommentRequest"
              },
              "example": {
                "content": "Thanks for the feedback! We're actively working on this feature.",
                "is_official": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Re-send of a request already answered (same Idempotency-Key, API key and body): nothing is created. The comment, as it is now",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentResponse"
                }
              }
            }
          },
          "201": {
            "description": "Comment created successfully",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The idea is merged into another one (the message names it), or another request with the same Idempotency-Key is still being processed: retry later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyKeyReused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      }
    },
    "/comments/{id}": {
      "patch": {
        "tags": [
          "Comments"
        ],
        "summary": "Update a comment",
        "description": "Update the text of a comment that this same API key created. A comment another key created, also one of the same organization, or one a person wrote (in the panel or the widget) is never updated: `403` with `FORBIDDEN`. Requires `admin` scope. The comment of an idea that is not approved exists only for an `admin` key: any other key gets `404`. To remove a comment, see `DELETE`.",
        "operationId": "updateComment",
        "parameters": [
          {
            "$ref": "#/components/parameters/CommentIdParam"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommentRequest"
              },
              "example": {
                "content": "Updated comment content with more details."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Comment updated successfully",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Comments"
        ],
        "summary": "Delete a comment",
        "description": "Permanently delete a comment. Requires `admin` scope. The comment of an idea that is not approved exists only for an `admin` key: any other key gets `404`.",
        "operationId": "deleteComment",
        "parameters": [
          {
            "$ref": "#/components/parameters/CommentIdParam"
          }
        ],
        "responses": {
          "204": {
            "description": "Comment deleted successfully",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      }
    },
    "/ideas/{id}/votes": {
      "post": {
        "tags": [
          "Votes"
        ],
        "summary": "Vote for an idea",
        "description": "Add your organization's API vote to an idea. An organization votes an idea at most once through the API, whichever of its keys calls: once it has voted, voting again with any of its keys changes nothing and answers `200` with the count, also after the key that voted is revoked, so a retry is safe. A merged idea takes no vote: `409`, naming the idea it is merged into, which has its votes. Requires `write` scope. An idea that is not approved (awaiting moderation or rejected) exists only for an `admin` key: any other key gets `404`, as for an idea that does not exist.",
        "operationId": "voteForIdea",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdeaIdParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Vote added, or already there (a retry): the idea now has the vote",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoteResponse"
                },
                "example": {
                  "data": {
                    "idea_id": "123e4567-e89b-12d3-a456-426614174000",
                    "vote_count": 43,
                    "voted": true
                  },
                  "meta": {
                    "request_id": "req_ghi789xyz",
                    "timestamp": "2024-01-22T10:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      },
      "delete": {
        "tags": [
          "Votes"
        ],
        "summary": "Remove vote from an idea",
        "description": "Remove your organization's API vote from an idea, whichever of its keys cast it. `204` also when the organization has not voted, so a retry is safe; `404` only when the idea does not exist; `409` on a merged idea, naming the idea it is merged into. Requires `write` scope. An idea that is not approved (awaiting moderation or rejected) exists only for an `admin` key: any other key gets `404`, as for an idea that does not exist.",
        "operationId": "removeVote",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdeaIdParam"
          }
        ],
        "responses": {
          "204": {
            "description": "Vote removed, or there was none (a retry)",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      }
    },
    "/topics": {
      "get": {
        "tags": [
          "Topics"
        ],
        "summary": "List topics",
        "description": "The topics of the organization's default project, where `POST /ideas` creates ideas: each `id` is a `topic_id` that operation accepts. In the panel's order (`position`, then `id`), paginated by page. Requires the `read` scope.",
        "operationId": "listTopics",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/PerPageParam"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopicsListResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      }
    },
    "/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The API key in use",
        "description": "Who the request is: the key (its id, name, type and visible prefix, never the key or its hash), its scopes, its organization and that organization's plan and rate limit. Any key the API accepts can read it (`read` scope). Takes no query parameter.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/ApiServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/config": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "get": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Get the widget configuration",
        "description": "The board of the project: its organization, the project's name, logo and color, and the project's widget settings. Auth via public key (X-Feedzzie-Key), which gives the project and ignores org and project in the query, or the org slug (and optional project slug) in the query + Origin, which must be in the project's allowed_domains when it has them. settings.require_approval tells whether a new idea waits for moderation, by the rule POST /api/widget/ideas applies: false only when the project's require_approval is explicitly off, true when it is on or can't be read.",
        "operationId": "getWidgetConfig",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "org",
            "in": "query",
            "description": "Org slug (only for the slug + Origin auth path)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "query",
            "description": "Project slug inside the org (only for the slug + Origin auth path; defaults to the org's default project)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The widget configuration of the project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization",
                    "project",
                    "settings"
                  ],
                  "properties": {
                    "organization": {
                      "type": "object",
                      "description": "Kept for FeedzzieKit 0.1.1; logo_url is the project's logo when it has one, else the organization's",
                      "required": [
                        "name",
                        "slug",
                        "logo_url"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "logo_url": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    },
                    "project": {
                      "type": "object",
                      "required": [
                        "name",
                        "slug",
                        "logo_url",
                        "primary_color"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        },
                        "logo_url": {
                          "type": "string",
                          "nullable": true
                        },
                        "primary_color": {
                          "type": "string"
                        }
                      }
                    },
                    "settings": {
                      "type": "object",
                      "required": [
                        "is_enabled",
                        "primary_color",
                        "position",
                        "button_text",
                        "show_branding",
                        "require_email",
                        "require_description",
                        "allow_anonymous_votes",
                        "allow_anonymous_submissions",
                        "branding",
                        "require_approval",
                        "reports",
                        "data_deletion"
                      ],
                      "properties": {
                        "is_enabled": {
                          "type": "boolean"
                        },
                        "primary_color": {
                          "type": "string",
                          "description": "The widget color, else the project's color"
                        },
                        "position": {
                          "type": "string",
                          "enum": [
                            "bottom-right",
                            "bottom-left",
                            "top-right",
                            "top-left"
                          ]
                        },
                        "button_text": {
                          "type": "string"
                        },
                        "show_branding": {
                          "type": "boolean",
                          "description": "Show \"Powered by Feedzzie\". Always true on the Free plan; a paid plan uses the widget setting"
                        },
                        "require_email": {
                          "type": "boolean"
                        },
                        "require_description": {
                          "type": "boolean",
                          "description": "True when POST /api/widget/ideas needs a description of at least 20 characters (Unicode code points of the trimmed text); without one it answers 400 { error: \"Description is required\" }, and below the minimum 400 { error: \"Description must be at least 20 characters\" }. Temporarily, a request from the native SDK (public key, no Origin header) is not held to it until FeedzzieKit marks the field. Always present, never null."
                        },
                        "allow_anonymous_votes": {
                          "type": "boolean"
                        },
                        "allow_anonymous_submissions": {
                          "type": "boolean"
                        },
                        "branding": {
                          "type": "object",
                          "nullable": true,
                          "description": "Visual overrides as saved (accent_color, background_color, text_color, border_radius, font_family), or null"
                        },
                        "require_approval": {
                          "type": "boolean",
                          "description": "True when a new idea waits for moderation (POST /api/widget/ideas answers pending=true); false when it is published at once. Always present, never null: true when the project's require_approval is on or can't be read. It reflects the setting when the config is read, not the moderation brake, which can hold a new idea of a project with moderation off once it received 20 widget ideas and comments in the last hour; for each idea, the pending field of POST /api/widget/ideas is the authoritative answer."
                        },
                        "reports": {
                          "type": "boolean",
                          "description": "True when POST /api/widget/reports takes reports and the panel has its Reports queue (FeedzzieKit 0.5.0). Always present: an older server, without the field, takes none, and the SDK keeps reports to itself."
                        },
                        "data_deletion": {
                          "type": "boolean",
                          "description": "True when DELETE /api/widget/ideas/{id} and DELETE /api/widget/me delete a person's own data (FeedzzieKit 0.5.0). Always present: an older server, without the field, deletes nothing, and the SDK does not offer it."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing org parameter"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "Public key not bound to a project, app bundle ID not allowed, project's widget disabled, or domain not allowed"
          },
          "404": {
            "description": "Organization or project not found"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/users/identify": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "post": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Identify a widget/SDK user",
        "description": "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.",
        "operationId": "identifyWidgetUser",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "anonymous_id"
                ],
                "properties": {
                  "anonymous_id": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "custom_id": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "payment_per_month": {
                    "type": "number",
                    "description": "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"
                  },
                  "org": {
                    "type": "string",
                    "description": "Org slug (only for the slug + Origin auth path)"
                  },
                  "project": {
                    "type": "string",
                    "description": "Project slug inside the org (only for the slug + Origin auth path; defaults to the org's default project)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User identified. Returns only the profile identifiers, never email, name, custom_id or payment_per_month",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "anonymous_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error / missing org"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "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"
          },
          "404": {
            "description": "Organization or project not found"
          },
          "413": {
            "$ref": "#/components/responses/WidgetBodyTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/ideas": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "get": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "List public ideas",
        "description": "Approved, public ideas of the project in the requested sort order, with standard pagination meta. A merged idea is not listed: it lives on in the idea it is merged into, which has its votes and comments (GET /api/widget/ideas/status names it). The sort order does not change the pagination. With ids, only those ideas: an id that is pending, private, merged, from another project or missing is left out, with no error, and total and pagination describe the filtered result. counts gives the number of ideas in each status tab (all is the total of the list without a status filter, a status with no ideas is 0) and does not depend on the requested page, status filter, ids or sort order.",
        "operationId": "listWidgetIdeas",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "Only these ideas: comma-separated idea UUIDs, 1 to 20, matched case-insensitively, with no spaces or empty segments. Composes with status, sort and pagination. Present but empty, more than 20 ids, or a segment that is not a UUID is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only ideas in this status",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "under_consideration",
                "planned",
                "in_progress",
                "shipped",
                "closed",
                "unlikely_to_build",
                "duplicate"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "top: most voted first (vote_count desc, ties by id). recent: newest first (created_at desc, ties by id). Any other value is a 400.",
            "schema": {
              "type": "string",
              "enum": [
                "top",
                "recent"
              ],
              "default": "top"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "org",
            "in": "query",
            "description": "Org slug (only for the slug + Origin auth path)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "query",
            "description": "Project slug inside the org (only for the slug + Origin auth path; defaults to the org's default project)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of ideas, its pagination meta and the counts per status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ideas": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "hasMore": {
                      "type": "boolean"
                    },
                    "pagination": {
                      "type": "object"
                    },
                    "counts": {
                      "type": "object",
                      "required": [
                        "all",
                        "open",
                        "under_consideration",
                        "planned",
                        "in_progress",
                        "shipped",
                        "closed",
                        "unlikely_to_build",
                        "duplicate"
                      ],
                      "properties": {
                        "all": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "open": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "under_consideration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "planned": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "in_progress": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "shipped": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "closed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "unlikely_to_build": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "duplicate": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing org parameter, invalid sort or invalid ids"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "Public key not bound to a project, app bundle ID not allowed, project's widget disabled, or domain not allowed"
          },
          "404": {
            "description": "Organization or project not found"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Create an anonymous idea",
        "description": "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.",
        "operationId": "createWidgetIdea",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A UUID (any case) generated once per idea and sent with every attempt to submit it. Without it, every request creates an idea.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "anonymous_id",
                  "title"
                ],
                "properties": {
                  "anonymous_id": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 5000,
                    "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)"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "org": {
                    "type": "string",
                    "description": "Org slug (only for the slug + Origin auth path)"
                  },
                  "project": {
                    "type": "string",
                    "description": "Project slug inside the org (only for the slug + Origin auth path; defaults to the org's default project)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "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"
          },
          "201": {
            "description": "Idea created: { idea, pending } (pending=true if moderation is on, the project's setting can't be read, or the moderation brake holds it)"
          },
          "400": {
            "description": "Validation error, missing required email, missing or short required description, or an Idempotency-Key that is not a UUID"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "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"
          },
          "404": {
            "description": "Organization or project not found"
          },
          "409": {
            "description": "Another request with the same Idempotency-Key is still being processed: retry later"
          },
          "410": {
            "description": "The idea this Idempotency-Key created was rejected, made private or deleted. The idea is not returned and nothing is created"
          },
          "413": {
            "$ref": "#/components/responses/WidgetBodyTooLarge"
          },
          "422": {
            "description": "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"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/ideas/{id}/comments": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "get": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "List comments for an idea",
        "description": "Paginated list of approved anonymous comments. The commenter anonymous_id is never returned. Every comment has deleted: false, except one whose author deleted their data (DELETE /api/widget/me) and that still has replies: it stays as the place of its replies, with deleted: true, content \"\" and author_name null. A deleted comment without replies is not listed.",
        "operationId": "listWidgetComments",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comments with standard pagination meta"
          },
          "400": {
            "description": "Invalid idea id"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "Public key not bound to a project, app bundle ID not allowed, project's widget disabled, or domain not allowed"
          },
          "404": {
            "description": "Idea not found"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Create an anonymous comment",
        "description": "Posts a comment as an anonymous widget user. For now the comment is published at once (pending=false) whatever the project's require_approval setting, which covers ideas; comments will follow it once the dashboard has a review queue for them. The moderation brake holds it (pending=true) once 20 widget entries that are published at once reached the project in the last hour (its comments and, only when require_approval is off, its ideas; with it on, only comments count), or when it cannot count them.",
        "operationId": "createWidgetComment",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "anonymous_id",
                  "content"
                ],
                "properties": {
                  "anonymous_id": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  },
                  "parent_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Comment created (pending=true only when the moderation brake holds it)"
          },
          "400": {
            "description": "Validation error"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "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"
          },
          "404": {
            "description": "Idea not found"
          },
          "413": {
            "$ref": "#/components/responses/WidgetBodyTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/ideas/status": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "get": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Review state of ideas by id",
        "description": "Tells the SDK whether ideas it submitted are still waiting for review. One entry per requested id (repeats included), in request order, echoing the id as sent (matched case-insensitively): approved (approved and not private, the same rule as the widget list), pending (waiting in the moderation queue) or gone (rejected, deleted, private, merged, or not in the project of the key). A merged idea's entry also has merged_into, the id of the idea that now has its votes and comments; no other field of the idea is ever returned. Auth via public key (X-Feedzzie-Key) only, which gives the organization and project; without it the answer is 401.",
        "operationId": "getWidgetIdeaStatuses",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "description": "Comma-separated idea UUIDs, 1 to 20, with no spaces or empty segments",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The state of each requested idea",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ideas": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "approved",
                              "pending",
                              "gone"
                            ]
                          },
                          "merged_into": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Only on a merged idea (status gone): the idea it is now part of"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing ids, more than 20 ids, or a segment that is not a UUID (including empty or padded ones)"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "Public key not bound to a project, app bundle ID not allowed, or project's widget disabled"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/reports": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "post": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Report an idea",
        "description": "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.",
        "operationId": "createWidgetReport",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-Widget-Anonymous-Id",
            "in": "header",
            "required": true,
            "description": "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",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "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",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "idea_id",
                  "reason"
                ],
                "properties": {
                  "idea_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "spam",
                      "offensive",
                      "personal_data",
                      "illegal",
                      "other"
                    ],
                    "description": "illegal is accepted for a later SDK; FeedzzieKit 0.5.0 sends the other four"
                  },
                  "detail": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 500,
                    "description": "Optional text for the team, never public: trimmed, at most 500 characters (Unicode code points); empty or blank is saved as none"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "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",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "received"
                  ],
                  "properties": {
                    "received": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "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"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "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)"
          },
          "404": {
            "description": "No idea with this id in the project of the key"
          },
          "410": {
            "description": "The idea is no longer public: waiting for review, rejected, private or merged"
          },
          "413": {
            "$ref": "#/components/responses/WidgetBodyTooLarge"
          },
          "422": {
            "description": "The Idempotency-Key was already used with another body"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/ideas/{id}": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "delete": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Delete one of the person's own ideas",
        "description": "Deletes an idea the person sent from this project, published or not, with its votes and comments, in one transaction, and answers { deleted: true }. Ideas merged into it come back to the board on their own (or closed, when the plan has no room for another active idea). The idea's open reports close. Sends one idea.deleted webhook. An idea the team has already taken (status planned, in_progress or shipped, and not merged into another) is not deleted: the person is unlinked from it instead. Their submission record with its email, their vote, their comments on it and the description they wrote go (description becomes null, also in the idea's events still kept for webhook delivery), and the idea loses its author reference; it stays on the roadmap as anonymous, with its title only and everyone else's votes and comments. The answer is then { unlinked: true }, which the SDK treats as a deletion on the device, and no webhook is sent. The person's ban, if any, stays, and a banned person can still delete. Works with the project's widget disabled. Auth via public key (X-Feedzzie-Key) only; without it the answer is 401.",
        "operationId": "deleteWidgetIdea",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Widget-Anonymous-Id",
            "in": "header",
            "required": true,
            "description": "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",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Idea deleted ({ deleted: true }), or, when the team had already taken it, kept with its title only, without the person or their description ({ unlinked: true })",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "deleted"
                      ],
                      "properties": {
                        "deleted": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "unlinked"
                      ],
                      "properties": {
                        "unlinked": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid X-Widget-Anonymous-Id, or an id that is not a UUID"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "Public key not bound to a project, app bundle ID not allowed, or domain not allowed (a browser using the key must come from one of the project's allowed_domains). A disabled widget does not refuse"
          },
          "404": {
            "description": "No idea of this person with this id in the project: not theirs, not there, already deleted or already unlinked (a repeat answers 404)"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "500": {
            "description": "The deletion failed; nothing was deleted"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/api/widget/me": {
      "servers": [
        {
          "url": "https://feedzzie.com"
        }
      ],
      "delete": {
        "tags": [
          "FeedzzieKit"
        ],
        "summary": "Delete everything of the person in the project",
        "description": "Deletes, in one transaction, all or nothing, what this anonymous_id has in the key's project: its ideas, published or not (each with its votes and comments, merged ideas coming back on their own), its votes and the counts they fed, its widget profile and its survey answers. The ideas the team has already taken (status planned, in_progress or shipped, and not merged into another) are not deleted: the person is unlinked from them, as DELETE /api/widget/ideas/{id} does: they stay on the roadmap as anonymous, with their title only (description becomes null). Its comments are deleted, except one that has replies: it is emptied and stays as the place of its replies (GET .../comments lists it with deleted: true). A repeat answers zeros. The person's ban, if any, stays. Works with the project's widget disabled. Sends one idea.deleted webhook per deleted idea and nothing for unlinked ideas, votes or comments. Auth via public key (X-Feedzzie-Key) only; without it the answer is 401.",
        "operationId": "deleteWidgetPerson",
        "security": [
          {
            "PublicKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-Widget-Anonymous-Id",
            "in": "header",
            "required": true,
            "description": "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",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What was deleted, and how many ideas were kept without the person; zeros when there was nothing left",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "deleted"
                  ],
                  "properties": {
                    "deleted": {
                      "type": "object",
                      "required": [
                        "ideas",
                        "votes",
                        "comments",
                        "unlinked"
                      ],
                      "properties": {
                        "ideas": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Ideas deleted whole"
                        },
                        "votes": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "The person's votes deleted, those on unlinked ideas included"
                        },
                        "comments": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "The person's comments deleted or emptied, those on unlinked ideas included"
                        },
                        "unlinked": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Ideas the team had taken, kept on the roadmap with their title only, without the person or their description; an idea counts in ideas or here, never both"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "deleted": {
                    "ideas": 2,
                    "votes": 5,
                    "comments": 1,
                    "unlinked": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid X-Widget-Anonymous-Id"
          },
          "401": {
            "$ref": "#/components/responses/InvalidPublicKey"
          },
          "403": {
            "description": "Public key not bound to a project, app bundle ID not allowed, or domain not allowed. A disabled widget does not refuse"
          },
          "429": {
            "$ref": "#/components/responses/WidgetRateLimited"
          },
          "500": {
            "description": "The deletion failed; nothing was deleted"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Secret API key in format `fz_live_xxx`; the scheme name is case-insensitive. Create keys in Settings > API Keys."
      },
      "PublicKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Feedzzie-Key",
        "description": "Public key in format `fz_pub_xxx` for the FeedzzieKit SDK / mobile apps. Optionally paired with the `X-Feedzzie-Bundle-Id` header for bundle allowlisting."
      }
    },
    "headers": {
      "XRequestId": {
        "description": "The request id, the same as the body's `meta.request_id` (a `204` has no body)",
        "schema": {
          "type": "string"
        }
      },
      "XRateLimitLimit": {
        "description": "Maximum requests allowed in the window (when the rate limiter counted the request)",
        "schema": {
          "type": "integer"
        }
      },
      "XRateLimitRemaining": {
        "description": "Requests remaining in the current window (when the rate limiter counted the request)",
        "schema": {
          "type": "integer"
        }
      },
      "XRateLimitReset": {
        "description": "When the window resets, in Unix time in milliseconds (when the rate limiter counted the request)",
        "schema": {
          "type": "integer"
        }
      }
    },
    "parameters": {
      "PageParam": {
        "name": "page",
        "in": "query",
        "description": "Page number for pagination. Out of range or not a whole number answers 400.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 90071992547409,
          "default": 1
        }
      },
      "PerPageParam": {
        "name": "per_page",
        "in": "query",
        "description": "Number of items per page. Out of range or not a whole number answers 400.",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 20
        }
      },
      "IdeaIdParam": {
        "name": "id",
        "in": "path",
        "description": "Idea UUID",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CommentIdParam": {
        "name": "id",
        "in": "path",
        "description": "Comment UUID",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "IdempotencyKeyHeader": {
        "name": "Idempotency-Key",
        "in": "header",
        "description": "A UUID (any case) generated once per create and sent with every attempt of it, as for the widget (Stripe's pattern, draft-ietf-httpapi-idempotency-key-header). Keys are scoped to the API key that sends them. Anything else answers 400 on the field `Idempotency-Key`.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "schemas": {
      "IdeaStatus": {
        "type": "string",
        "enum": [
          "open",
          "under_consideration",
          "planned",
          "in_progress",
          "shipped",
          "closed",
          "unlikely_to_build"
        ],
        "description": "Status of an idea in the feedback workflow"
      },
      "IdeaStatusFilter": {
        "type": "string",
        "enum": [
          "open",
          "under_consideration",
          "planned",
          "in_progress",
          "shipped",
          "closed",
          "unlikely_to_build",
          "duplicate"
        ],
        "description": "A list filter: a lifecycle status, or `duplicate` for the ideas marked as a duplicate of another"
      },
      "Author": {
        "type": "object",
        "description": "The person who wrote it. `null` when there is no user author: an idea created through the API or by an anonymous visitor of the widget",
        "properties": {
          "id": {
            "type": "string",
            "description": "User ID"
          },
          "full_name": {
            "type": "string",
            "nullable": true,
            "description": "User full name"
          },
          "avatar_url": {
            "type": "string",
            "nullable": true,
            "description": "URL to user avatar"
          }
        },
        "nullable": true
      },
      "Topic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Topic UUID"
          },
          "name": {
            "type": "string",
            "description": "Topic name"
          },
          "color": {
            "type": "string",
            "description": "Topic color hex code"
          }
        },
        "nullable": true
      },
      "Idea": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier"
          },
          "title": {
            "type": "string",
            "description": "Idea title",
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Detailed description"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IdeaStatus"
              },
              {
                "type": "string",
                "enum": [
                  "pending_review",
                  "rejected",
                  "duplicate"
                ]
              }
            ],
            "description": "`pending_review` is an idea awaiting moderation and `rejected` one a moderator rejected: both are not approved, so only an `admin` key sees them (listed with `include_pending=true`, and by id); their status changes only once a moderator approves them. `duplicate` is an idea merged into another (`merged_into` and `is_duplicate_of` name it); it stays approved, so every key lists and reads it, and it is accepted as a `status` filter. Of the three, only `duplicate`, with `merged_into`, is a `status` update value"
          },
          "vote_count": {
            "type": "integer",
            "description": "Number of votes"
          },
          "comment_count": {
            "type": "integer",
            "description": "Number of comments"
          },
          "is_private": {
            "type": "boolean",
            "description": "Whether the idea is private to the organization"
          },
          "is_pinned": {
            "type": "boolean",
            "description": "Whether the idea is pinned"
          },
          "is_approved": {
            "type": "boolean",
            "description": "False for an idea awaiting moderation (status `pending_review`) and for a rejected one (status `rejected`), which only an `admin` key sees; true otherwise, including a `duplicate` idea"
          },
          "is_duplicate_of": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The id of the idea this one is a duplicate of (the main idea, for a merged idea), or `null`. It is also `null` for an idea with status `duplicate` whose original was deleted"
          },
          "merged_into": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "The idea this one is merged into (its status is then `duplicate`), or null; a duplicate marked before merging existed has `is_duplicate_of` and no `merged_into`. Undo with `PATCH` and `merged_into: null`"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp"
          },
          "author": {
            "$ref": "#/components/schemas/Author"
          },
          "topic": {
            "$ref": "#/components/schemas/Topic"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "status",
          "vote_count",
          "comment_count",
          "is_private",
          "is_pinned",
          "is_approved",
          "is_duplicate_of",
          "merged_into",
          "created_at",
          "updated_at",
          "author",
          "topic"
        ]
      },
      "IdeaDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Idea"
          },
          {
            "type": "object",
            "properties": {
              "follower_count": {
                "type": "integer",
                "description": "Number of followers"
              },
              "start_date": {
                "type": "string",
                "format": "date",
                "nullable": true,
                "description": "Planned start date"
              },
              "target_date": {
                "type": "string",
                "format": "date",
                "nullable": true,
                "description": "Target completion date"
              },
              "actual_date": {
                "type": "string",
                "format": "date",
                "nullable": true,
                "description": "Actual completion date"
              }
            },
            "required": [
              "follower_count",
              "start_date",
              "target_date",
              "actual_date"
            ]
          }
        ]
      },
      "CreateIdeaRequest": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Idea title. Trimmed, then 1-200 characters: a title of only spaces answers 400, as does a NUL or an unpaired surrogate"
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true,
            "description": "Detailed description, trimmed (empty or only spaces is stored as null). A NUL or an unpaired surrogate answers 400"
          },
          "topic_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Topic UUID (must belong to your organization's default project). Required when that project requires a topic for new ideas"
          },
          "is_private": {
            "type": "boolean",
            "default": false,
            "description": "Whether the idea should be private"
          }
        }
      },
      "UpdateIdeaRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Idea title. Trimmed, then 1-200 characters: a title of only spaces answers 400, as does a NUL or an unpaired surrogate"
          },
          "description": {
            "type": "string",
            "maxLength": 5000,
            "nullable": true,
            "description": "Detailed description, trimmed; `null`, empty or only spaces clears it. A NUL or an unpaired surrogate answers 400"
          },
          "topic_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Topic UUID of the idea's own project; `null` removes the topic, except when the project requires one (400)"
          },
          "is_private": {
            "type": "boolean",
            "description": "Whether the idea should be private"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IdeaStatus"
              },
              {
                "type": "string",
                "enum": [
                  "duplicate"
                ]
              }
            ],
            "description": "New lifecycle status (requires admin scope). Only for an approved idea: on one awaiting moderation or rejected it answers 409. `duplicate` only together with `merged_into`"
          },
          "merged_into": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Requires admin scope. The id of the main idea merges this one into it (alone, or with `status: duplicate`); `null` undoes the merge"
          }
        }
      },
      "Comment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier"
          },
          "idea_id": {
            "type": "string",
            "format": "uuid",
            "description": "Parent idea ID"
          },
          "content": {
            "type": "string",
            "description": "Comment content"
          },
          "parent_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Parent comment ID for replies"
          },
          "is_official": {
            "type": "boolean",
            "description": "Whether this is an official team response"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp"
          },
          "author": {
            "$ref": "#/components/schemas/Author"
          }
        },
        "required": [
          "id",
          "idea_id",
          "content",
          "parent_id",
          "is_official",
          "created_at",
          "updated_at",
          "author"
        ]
      },
      "CreateCommentRequest": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "Comment content. Trimmed, then 1-5000 characters: only spaces answers 400, as does a NUL or an unpaired surrogate"
          },
          "parent_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Parent comment ID for replies, a comment of the same idea. A top-level comment is level 0, and replies nest down to level 3: replying to a comment at level 3 answers 400"
          },
          "is_official": {
            "type": "boolean",
            "default": false,
            "description": "Mark as official response (requires admin scope)"
          }
        }
      },
      "UpdateCommentRequest": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "Comment content. Trimmed, then 1-5000 characters: only spaces answers 400, as does a NUL or an unpaired surrogate"
          }
        }
      },
      "VoteData": {
        "type": "object",
        "properties": {
          "idea_id": {
            "type": "string",
            "format": "uuid",
            "description": "Idea ID"
          },
          "vote_count": {
            "type": "integer",
            "description": "Updated vote count"
          },
          "voted": {
            "type": "boolean",
            "description": "Whether the vote was added"
          }
        },
        "required": [
          "idea_id",
          "vote_count",
          "voted"
        ]
      },
      "PaginationMeta": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "description": "Current page number"
          },
          "per_page": {
            "type": "integer",
            "description": "Items per page: the request's `per_page`, or its default"
          },
          "total": {
            "type": "integer",
            "description": "Total number of items"
          },
          "total_pages": {
            "type": "integer",
            "description": "Total number of pages"
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether there are more pages"
          }
        },
        "required": [
          "page",
          "per_page",
          "total",
          "total_pages",
          "has_more"
        ]
      },
      "CursorMeta": {
        "type": "object",
        "description": "Where a walk by cursor is (`GET /ideas` with `cursor`)",
        "properties": {
          "next": {
            "type": "string",
            "nullable": true,
            "description": "The `cursor` of the next page, with the same filters; `null` on the last page"
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether another page follows"
          },
          "per_page": {
            "type": "integer",
            "description": "Items per page: the request's `per_page`, or its default"
          }
        },
        "required": [
          "next",
          "has_more",
          "per_page"
        ]
      },
      "ResponseMeta": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Unique request identifier for debugging"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Response timestamp"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          "cursor": {
            "$ref": "#/components/schemas/CursorMeta"
          }
        },
        "required": [
          "request_id",
          "timestamp"
        ]
      },
      "IdeasListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Idea"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "IdeaResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Idea"
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "IdeaDetailResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IdeaDetail"
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "CommentsListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Comment"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "CommentResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Comment"
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "TopicListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Topic UUID: a `topic_id` of `POST /ideas`"
          },
          "name": {
            "type": "string",
            "description": "Topic name"
          },
          "color": {
            "type": "string",
            "nullable": true,
            "description": "Topic color hex code"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Topic description"
          },
          "position": {
            "type": "integer",
            "nullable": true,
            "description": "The topic's place in the panel's order"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "description",
          "position"
        ]
      },
      "TopicsListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TopicListItem"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "key": {
            "type": "object",
            "description": "The key in use, never the key itself or its hash",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Key id, as in the panel"
              },
              "name": {
                "type": "string",
                "description": "The name given to the key in the panel"
              },
              "type": {
                "type": "string",
                "enum": [
                  "secret"
                ],
                "description": "Key type: the REST API takes only secret keys"
              },
              "prefix": {
                "type": "string",
                "description": "The visible start of the key, as the panel shows it (`fz_live_` and 8 characters)"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "`null` when the key does not expire"
              },
              "last_used_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "The last request before this one, written at most every 5 minutes; `null` for a key never used"
              }
            },
            "required": [
              "id",
              "name",
              "type",
              "prefix",
              "created_at",
              "expires_at",
              "last_used_at"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "admin"
              ]
            },
            "description": "The key's scopes: `admin` includes `write`, and `write` includes `read`"
          },
          "organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "slug"
            ]
          },
          "plan": {
            "type": "string",
            "enum": [
              "trial",
              "starter",
              "pro",
              "business"
            ],
            "description": "The organization's plan, the one its limits use"
          },
          "rate_limit": {
            "type": "object",
            "properties": {
              "requests_per_minute": {
                "type": "integer",
                "description": "The plan's requests per minute, for this key and for the whole organization"
              }
            },
            "required": [
              "requests_per_minute"
            ]
          }
        },
        "required": [
          "key",
          "scopes",
          "organization",
          "plan",
          "rate_limit"
        ]
      },
      "MeResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Me"
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "VoteResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/VoteData"
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ]
      },
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Field name with the error"
          },
          "message": {
            "type": "string",
            "description": "Error message for this field"
          },
          "expected": {
            "type": "string",
            "description": "The value that would be accepted: the scope (`INSUFFICIENT_SCOPE`, field `scope`) or the key type (`WRONG_KEY_TYPE`, field `key_type`)"
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "description": "The plan's limit for the resource named in `field` (`PLAN_LIMIT_REACHED`)"
          }
        },
        "required": [
          "field",
          "message"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Error code",
                "enum": [
                  "VALIDATION_ERROR",
                  "UNAUTHORIZED",
                  "FORBIDDEN",
                  "WRONG_KEY_TYPE",
                  "INSUFFICIENT_SCOPE",
                  "PLAN_LIMIT_REACHED",
                  "NOT_FOUND",
                  "METHOD_NOT_ALLOWED",
                  "CONFLICT",
                  "GONE",
                  "IDEMPOTENCY_KEY_REUSED",
                  "RATE_LIMITED",
                  "INTERNAL_ERROR",
                  "SERVICE_UNAVAILABLE"
                ]
              },
              "message": {
                "type": "string",
                "description": "Human-readable error message"
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ErrorDetail"
                },
                "description": "What the error is about: the fields of a validation error, or the scope, key type or plan limit of a 403"
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "error",
          "meta"
        ]
      }
    },
    "responses": {
      "ValidationError": {
        "description": "Validation error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "VALIDATION_ERROR",
                "message": "Title is required",
                "details": [
                  {
                    "field": "title",
                    "message": "Title is required"
                  }
                ]
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Authentication required",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "UNAUTHORIZED",
                "message": "Missing or invalid API key"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Refused: `WRONG_KEY_TYPE` for a public key, `INSUFFICIENT_SCOPE` when the key lacks the scope in `details[0].expected`, (creating an idea, making one active again, or deleting one whose merged ideas become active) `PLAN_LIMIT_REACHED`, with the resource and the limit in `details`, or (updating a comment the key did not create) `FORBIDDEN`",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "INSUFFICIENT_SCOPE",
                "message": "Admin scope required to change idea status",
                "details": [
                  {
                    "field": "scope",
                    "message": "Requires an API key with the admin scope",
                    "expected": "admin"
                  }
                ]
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "NOT_FOUND",
                "message": "Idea not found"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "Conflict with the current state of the resource",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "CONFLICT",
                "message": "Resource already exists"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "IdempotencyKeyInProgress": {
        "description": "Another request with the same Idempotency-Key is still being processed: retry later",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "CONFLICT",
                "message": "A request with this Idempotency-Key is in progress: retry later"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "IdempotencyKeyReused": {
        "description": "The Idempotency-Key was already used with another request body: nothing about that request is revealed and nothing is created",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "IDEMPOTENCY_KEY_REUSED",
                "message": "Idempotency-Key was already used for another request"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded",
        "headers": {
          "X-RateLimit-Limit": {
            "schema": {
              "type": "integer"
            },
            "description": "Maximum requests allowed"
          },
          "X-RateLimit-Remaining": {
            "schema": {
              "type": "integer"
            },
            "description": "Requests remaining in current window"
          },
          "X-RateLimit-Reset": {
            "schema": {
              "type": "integer"
            },
            "description": "When the window resets, in Unix time in milliseconds"
          },
          "Retry-After": {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Seconds to wait before retrying"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "RATE_LIMITED",
                "message": "Rate limit exceeded"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "WidgetRateLimited": {
        "description": "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.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Seconds to wait before retrying"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error",
                "retryAfter"
              ],
              "properties": {
                "error": {
                  "type": "string"
                },
                "retryAfter": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "The Retry-After value, readable from a browser on any origin"
                }
              }
            },
            "example": {
              "error": "Rate limit exceeded",
              "retryAfter": 1830
            }
          }
        }
      },
      "WidgetBodyTooLarge": {
        "description": "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",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              }
            },
            "example": {
              "error": "Request body too large"
            }
          }
        }
      },
      "InvalidPublicKey": {
        "description": "The X-Feedzzie-Key public key is invalid, revoked or expired",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              }
            },
            "example": {
              "error": "Invalid or revoked public key"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "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.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait before retrying"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                },
                "retryAfter": {
                  "type": "integer"
                }
              }
            },
            "example": {
              "error": "Service temporarily unavailable",
              "retryAfter": 30
            }
          }
        }
      },
      "ApiServiceUnavailable": {
        "description": "A database read the request needs failed (the key, its organization or plan, or a resource the operation reads), or the rate limiter (Upstash) could not be reached on a write, so the request was not processed. Retry after the given delay. A failed read is never answered as a 401, 404, an empty list or a lower plan. When only Upstash fails, reads are served without the rate limiter. A vote whose updated count cannot be read answers 503 although the vote is stored: retrying it answers 409.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait before retrying"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "SERVICE_UNAVAILABLE",
                "message": "Service temporarily unavailable"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "INTERNAL_ERROR",
                "message": "An unexpected error occurred"
              },
              "meta": {
                "request_id": "req_abc123",
                "timestamp": "2024-01-22T10:00:00Z"
              }
            }
          }
        }
      }
    }
  }
}
