Opportunities

Enqueue guarded opportunity analysis without worker ticks

Reference for enqueueOpportunities.

POST/api/v1/projects/{projectId}/opportunities/refresh
On this page

Authentication and scopes

#

Send your workspace API key in the Authorization: Bearer YOUR_API_KEY header. This operation requires write and generate.

See Authentication for key setup and project access.

Path parameters

#
ParameterTypeRequirementDetails
projectIdstringRequiredFormat: uuid.

Request body

#

The JSON body accepts the schema below.

Complete request body schema
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Example values are placeholders. Replace resource IDs, content, and revision values with your own before sending the request.

Success response · 202

#

Selected response fields with illustrative values; other fields are omitted. A no-op instead returns enqueued:false and status:not_enqueued. Read opportunity state to inspect available results.

The response example shows the known HTTP 202 success path. It does not enumerate every outcome or returned field.

Successful JSON responses return the operation’s result under data and a request identifier under meta.requestId. Collection results include their own pagination or coverage metadata. The payload inside data varies by operation.

The OpenAPI document defines shared success and error envelopes. It does not define every operation’s returned data fields or promise that every operation returns every listed success status. See the request and response guide and workflow examples for documented payloads.

Errors and retries

#

Check the HTTP status and stable error.code. Keep meta.requestId when investigating a failed request. Follow Retry-After when it is present, and check existing job or resource state before retrying a write.

See Errors and limits for validation, permissions, conflicts, and temporary queue denials.

API documentation