Set up a project's report button
curl --request PUT \ --url https://example.com/api/v1/projects/example/bug-report-settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "acceptsAnonymous": true, "allowedDomains": [ "example" ], "isActive": true }'Turns the project’s report button on or off and replaces its list of allowed sites. The first save mints the project’s public key. A site is typed as shop.example.com, or *.example.com for every subdomain; turning the button on needs at least one, and a list holds at most 50. acceptsAnonymous left out keeps its value and starts true. Reporting as a signed-in contact from a site is not available yet, so acceptsAnonymous: false makes the report button refuse every report until it is. Records an audit entry. Requires projects.manage and projects.view, and a project the caller reaches; nothing is saved without both. Refused with 422 for a site that is not a website address, more than 50 sites, no site while turning it on (each with its message under fieldErrors.allowedDomains), or a personal project (no field errors).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Resource identifier (CUID2).
Resource identifier (CUID2).
Request Body
Section titled “Request Body”object
Whether a report from a visitor with no portal session is taken. Omit to keep it. Starts true. Reporting as a signed-in contact from a site is not available yet, so false makes the report button refuse every report until it is.
The sites allowed to send reports, as typed (shop.example.com, or *.example.com for every subdomain), at most 50. Replaces the list.
True to let the project’s report button file reports, which needs at least one allowed site; false to stop it.
Example generated
{ "acceptsAnonymous": true, "allowedDomains": [ "example" ], "isActive": true}Responses
Section titled “Responses”The settings after the change.
object
How a project’s report button is set up.
object
Whether a report from a visitor with no portal session is taken. Signed-in reporting from a site is not available yet, so false refuses every report until it is.
The sites allowed to send reports.
Whether the caller may change these settings.
Whether the report button may file reports.
The key the report button sends. It is read from the client’s page source by design; null until the project turns reports on.
The project’s own site as an allowed domain, to start the list from.
Example generated
{ "data": { "acceptsAnonymous": true, "allowedDomains": [ "example" ], "canManage": true, "isActive": true, "publicKey": "example", "suggestedDomain": "example" }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Not found.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Invalid input, with field-level messages.
Error envelope with field-level messages.
object
object
Stable machine-readable error code.
Message per offending field; a list item is keyed <field>.<index>.<key>.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC