FoxCue API: Scripts and Script versions and Jobs and more

Request examples, parameters, scopes and response statuses for FoxCue API scripts and script versions and jobs and more.

These operations are copied from the live OpenAPI schema at GET /api/v1/openapi.json (2026-10-28, 297 operations). Each example request is built from that operation's schema: required fields, and optional fields when the object is small. Response bodies are not in that schema. Where the JSON shape is known, it is listed below with an example. Shared errors are on Limits and errors.

Send Authorization: Bearer <workspace API key>. Base URL: https://app.foxcue.com/api/v1.

Scripts

GET /scripts

List scripts in this workspace

Scope: scripts:read.

Parameters

NameInRequiredTypeRules
project_idquerynostring
script_idquerynostring
collection_idquerynostring
scope_typequerynostring
scope_idquerynostring
kindquerynostring
limitquerynostring
offsetquerynostring

Example request

curl -X GET "https://app.foxcue.com/api/v1/scripts?project_id=example&script_id=example&collection_id=example&scope_type=example&scope_id=example&kind=example" \
  -H "Authorization: Bearer <workspace API key>"

Response

The body is a JSON array of these fields. limit is 1–100 (default 50) and offset starts at 0. The array has no total.

FieldType
idstring
org_idstring
titlestring
bodystring
statusstring
tonestring
formatstring
length_targetstring
model_usedstring
source_post_urlstring
config_jsonstring
created_atstring
updated_atstring
source_group_idstring
style_idstring
generated_atstring
generation_modestring
window_startstring
window_endstring
ctastring
offering_idstring
folder_idstring
[
  {
    "id": "id",
    "org_id": "workspace_id",
    "title": "example",
    "body": "example",
    "status": "queued",
    "tone": "example",
    "format": "example",
    "length_target": "example",
    "model_used": "example",
    "source_post_url": "https://example.com",
    "config_json": "example",
    "created_at": "2026-10-28T00:00:00.000Z",
    "updated_at": "2026-10-28T00:00:00.000Z",
    "source_group_id": "id",
    "style_id": "id",
    "generated_at": "2026-10-28T00:00:00.000Z",
    "generation_mode": "example",
    "window_start": "2026-10-28T00:00:00.000Z",
    "window_end": "2026-10-28T00:00:00.000Z",
    "cta": "example",
    "offering_id": "id",
    "folder_id": "id"
  }
]
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

POST /scripts

Create scripts

Scope: scripts:write.

Example request

{
  "title": "example",
  "body": "example",
  "status": "draft"
}

Required fields: title.

curl -X POST "https://app.foxcue.com/api/v1/scripts" \
  -H "Authorization: Bearer <workspace API key>" \
  -H "Content-Type: application/json" \
  -d @body.json

Response

StatusMeaning
201Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

GET /scripts/{id}

Get scripts

Scope: scripts:read.

Parameters

NameInRequiredTypeRules
idpathyesstring

Example request

curl -X GET "https://app.foxcue.com/api/v1/scripts/example" \
  -H "Authorization: Bearer <workspace API key>"

Response

StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

PATCH /scripts/{id}

Update scripts

Scope: scripts:write.

Parameters

NameInRequiredTypeRules
idpathyesstring

Example request

{
  "expected_updated_at": "example",
  "title": "example",
  "body": "example",
  "status": "draft"
}

Required fields: expected_updated_at.

curl -X PATCH "https://app.foxcue.com/api/v1/scripts/example" \
  -H "Authorization: Bearer <workspace API key>" \
  -H "Content-Type: application/json" \
  -d @body.json

Response

StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

DELETE /scripts/{id}

Delete scripts

Scope: scripts:write.

Parameters

NameInRequiredTypeRules
idpathyesstring

Example request

curl -X DELETE "https://app.foxcue.com/api/v1/scripts/example" \
  -H "Authorization: Bearer <workspace API key>"

Response

Success returns no JSON body.

StatusMeaning
204Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

Script versions

GET /script-versions

List script version snapshots

Scope: scripts:read.

Parameters

NameInRequiredTypeRules
project_idquerynostring
script_idquerynostring
collection_idquerynostring
scope_typequerynostring
scope_idquerynostring
kindquerynostring
limitquerynostring
offsetquerynostring

Example request

curl -X GET "https://app.foxcue.com/api/v1/script-versions?project_id=example&script_id=example&collection_id=example&scope_type=example&scope_id=example&kind=example" \
  -H "Authorization: Bearer <workspace API key>"

Response

The body is a JSON array of these fields. limit is 1–100 (default 50) and offset starts at 0. The array has no total.

FieldType
idstring
org_idstring
script_idstring
version_nonumber
bodystring
sourcestring
model_usedstring
wordsnumber
est_secondsnumber
promptstring
settings_jsonstring
used_post_ids_jsonstring
input_tokensnumber
output_tokensnumber
providerstring
created_atstring
checks_jsonstring
verify_jsonstring
trace_jsonstring
[
  {
    "id": "id",
    "org_id": "workspace_id",
    "script_id": "id",
    "version_no": 0,
    "body": "example",
    "source": "example",
    "model_used": "example",
    "words": 0,
    "est_seconds": 0,
    "prompt": "example",
    "settings_json": "example",
    "used_post_ids_json": "example",
    "input_tokens": 0,
    "output_tokens": 0,
    "provider": "example",
    "created_at": "2026-10-28T00:00:00.000Z",
    "checks_json": "example",
    "verify_json": "example",
    "trace_json": "example"
  }
]
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

POST /script-versions

Save a manual script snapshot

Scope: scripts:write.

Example request

{
  "script_id": "example",
  "body": "example",
  "source": "edit"
}

Required fields: script_id.

curl -X POST "https://app.foxcue.com/api/v1/script-versions" \
  -H "Authorization: Bearer <workspace API key>" \
  -H "Content-Type: application/json" \
  -d @body.json

Response

The body is a JSON object with these fields.

FieldType
idstring
org_idstring
script_idstring
version_nonumber
bodystring
sourcestring
model_usedstring
wordsnumber
est_secondsnumber
promptstring
settings_jsonstring
used_post_ids_jsonstring
input_tokensnumber
output_tokensnumber
providerstring
created_atstring
checks_jsonstring
verify_jsonstring
trace_jsonstring
{
  "id": "id",
  "org_id": "workspace_id",
  "script_id": "id",
  "version_no": 0,
  "body": "example",
  "source": "example",
  "model_used": "example",
  "words": 0,
  "est_seconds": 0,
  "prompt": "example",
  "settings_json": "example",
  "used_post_ids_json": "example",
  "input_tokens": 0,
  "output_tokens": 0,
  "provider": "example",
  "created_at": "2026-10-28T00:00:00.000Z",
  "checks_json": "example",
  "verify_json": "example",
  "trace_json": "example"
}
StatusMeaning
201Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

GET /script-versions/{id}

Read a script snapshot

Scope: scripts:read.

Parameters

NameInRequiredTypeRules
idpathyesstring

Example request

curl -X GET "https://app.foxcue.com/api/v1/script-versions/example" \
  -H "Authorization: Bearer <workspace API key>"

Response

The body is a JSON object with these fields.

FieldType
idstring
org_idstring
script_idstring
version_nonumber
bodystring
sourcestring
model_usedstring
wordsnumber
est_secondsnumber
promptstring
settings_jsonstring
used_post_ids_jsonstring
input_tokensnumber
output_tokensnumber
providerstring
created_atstring
checks_jsonstring
verify_jsonstring
trace_jsonstring
{
  "id": "id",
  "org_id": "workspace_id",
  "script_id": "id",
  "version_no": 0,
  "body": "example",
  "source": "example",
  "model_used": "example",
  "words": 0,
  "est_seconds": 0,
  "prompt": "example",
  "settings_json": "example",
  "used_post_ids_json": "example",
  "input_tokens": 0,
  "output_tokens": 0,
  "provider": "example",
  "created_at": "2026-10-28T00:00:00.000Z",
  "checks_json": "example",
  "verify_json": "example",
  "trace_json": "example"
}
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

Saved outputs

GET /artifacts

List saved outputs; filter with script_id, composition_id and kind

Scope: outputs:read.

Parameters

NameInRequiredTypeRules
project_idquerynostring
script_idquerynostring
collection_idquerynostring
scope_typequerynostring
scope_idquerynostring
kindquerynostring
limitquerynostring
offsetquerynostring

Example request

curl -X GET "https://app.foxcue.com/api/v1/artifacts?project_id=example&script_id=example&collection_id=example&scope_type=example&scope_id=example&kind=example" \
  -H "Authorization: Bearer <workspace API key>"

Response

The body is a JSON array of these fields. limit is 1–100 (default 50) and offset starts at 0. The array has no total.

FieldType
idstring
org_idstring
script_idstring
composition_idstring
version_idstring
kindstring
themestring
densitystring
deck_jsonstring
trace_jsonstring
model_usedstring
providerstring
input_tokensnumber
output_tokensnumber
video_pathstring
audio_pathstring
duration_secondsnumber
timings_jsonstring
settings_jsonstring
statusstring
trashed_atstring
created_atstring
updated_atstring
errorstring
[
  {
    "id": "id",
    "org_id": "workspace_id",
    "script_id": "id",
    "composition_id": "id",
    "version_id": "id",
    "kind": "example",
    "theme": "example",
    "density": "example",
    "deck_json": "example",
    "trace_json": "example",
    "model_used": "example",
    "provider": "example",
    "input_tokens": 0,
    "output_tokens": 0,
    "video_path": "example",
    "audio_path": "example",
    "duration_seconds": 0,
    "timings_json": "example",
    "settings_json": "example",
    "status": "queued",
    "trashed_at": "2026-10-28T00:00:00.000Z",
    "created_at": "2026-10-28T00:00:00.000Z",
    "updated_at": "2026-10-28T00:00:00.000Z",
    "error": "example"
  }
]
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

GET /artifacts/{id}

Read saved output metadata/content

Scope: outputs:read.

Parameters

NameInRequiredTypeRules
idpathyesstring

Example request

curl -X GET "https://app.foxcue.com/api/v1/artifacts/example" \
  -H "Authorization: Bearer <workspace API key>"

Response

The body is a JSON object with these fields.

FieldType
idstring
org_idstring
script_idstring
composition_idstring
version_idstring
kindstring
themestring
densitystring
deck_jsonstring
trace_jsonstring
model_usedstring
providerstring
input_tokensnumber
output_tokensnumber
video_pathstring
audio_pathstring
duration_secondsnumber
timings_jsonstring
settings_jsonstring
statusstring
trashed_atstring
created_atstring
updated_atstring
errorstring
{
  "id": "id",
  "org_id": "workspace_id",
  "script_id": "id",
  "composition_id": "id",
  "version_id": "id",
  "kind": "example",
  "theme": "example",
  "density": "example",
  "deck_json": "example",
  "trace_json": "example",
  "model_used": "example",
  "provider": "example",
  "input_tokens": 0,
  "output_tokens": 0,
  "video_path": "example",
  "audio_path": "example",
  "duration_seconds": 0,
  "timings_json": "example",
  "settings_json": "example",
  "status": "queued",
  "trashed_at": "2026-10-28T00:00:00.000Z",
  "created_at": "2026-10-28T00:00:00.000Z",
  "updated_at": "2026-10-28T00:00:00.000Z",
  "error": "example"
}
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

Jobs

GET /jobs

List public API jobs

Scope: jobs:read.

Parameters

NameInRequiredTypeRules
project_idquerynostring
script_idquerynostring
collection_idquerynostring
scope_typequerynostring
scope_idquerynostring
kindquerynostring
limitquerynostring
offsetquerynostring

Example request

curl -X GET "https://app.foxcue.com/api/v1/jobs?project_id=example&script_id=example&collection_id=example&scope_type=example&scope_id=example&kind=example" \
  -H "Authorization: Bearer <workspace API key>"

Response

The body is a JSON array of jobs. A job is JSON with these fields. operation is one of script.generate, script.generate_long, article.generate, slides.generate, or video.render. status is queued, running, done, error, or cancelled. limit is 1–100 (default 50) and offset starts at 0.

FieldType
idstring
operationstring
statusstring
stagestring
resultobject or null
error_codestring or null
created_atstring
updated_atstring
[
  {
    "id": "id",
    "operation": "script.generate",
    "status": "queued",
    "stage": "example",
    "result": null,
    "error_code": null,
    "created_at": "2026-10-28T00:00:00.000Z",
    "updated_at": "2026-10-28T00:00:00.000Z"
  }
]
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

POST /jobs

Queue generation or rendering; poll job for results

Scope: generation:write.

Parameters

NameInRequiredTypeRules
Idempotency-KeyheaderyesstringminLength 8; maxLength 128

Example request

The body is one of these operations. One example follows. Send the matching operation value.

Operations: script.generate, script.generate_long, article.generate, slides.generate, video.render.

{
  "operation": "script.generate",
  "input": {
    "topic": "example",
    "script_id": "example",
    "expected_updated_at": "example",
    "idempotency_key": "example-",
    "angle": "example",
    "supplied_brief": "example"
  }
}
curl -X POST "https://app.foxcue.com/api/v1/jobs" \
  -H "Authorization: Bearer <workspace API key>" \
  -H "Idempotency-Key: example-key-001" \
  -H "Content-Type: application/json" \
  -d @body.json

Response

A job is JSON with these fields. operation is one of script.generate, script.generate_long, article.generate, slides.generate, or video.render. status is queued, running, done, error, or cancelled.

FieldType
idstring
operationstring
statusstring
stagestring
resultobject or null
error_codestring or null
created_atstring
updated_atstring
{
  "id": "id",
  "operation": "script.generate",
  "status": "queued",
  "stage": "example",
  "result": null,
  "error_code": null,
  "created_at": "2026-10-28T00:00:00.000Z",
  "updated_at": "2026-10-28T00:00:00.000Z"
}

The response also sends Location: /api/v1/jobs/{id} and Idempotency-Replayed set to true or false.

StatusMeaning
202Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

GET /jobs/{id}

Poll job status, result and error code

Scope: jobs:read.

Parameters

NameInRequiredTypeRules
idpathyesstring

Example request

curl -X GET "https://app.foxcue.com/api/v1/jobs/example" \
  -H "Authorization: Bearer <workspace API key>"

Response

A job is JSON with these fields. operation is one of script.generate, script.generate_long, article.generate, slides.generate, or video.render. status is queued, running, done, error, or cancelled.

FieldType
idstring
operationstring
statusstring
stagestring
resultobject or null
error_codestring or null
created_atstring
updated_atstring
{
  "id": "id",
  "operation": "script.generate",
  "status": "queued",
  "stage": "example",
  "result": null,
  "error_code": null,
  "created_at": "2026-10-28T00:00:00.000Z",
  "updated_at": "2026-10-28T00:00:00.000Z"
}
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

POST /jobs/{id}/cancel

Cancel queued work or request cooperative cancellation

Scope: jobs:write.

Parameters

NameInRequiredTypeRules
idpathyesstring

Example request

curl -X POST "https://app.foxcue.com/api/v1/jobs/example/cancel" \
  -H "Authorization: Bearer <workspace API key>"

Response

A job is JSON with these fields. operation is one of script.generate, script.generate_long, article.generate, slides.generate, or video.render. status is queued, running, done, error, or cancelled.

FieldType
idstring
operationstring
statusstring
stagestring
resultobject or null
error_codestring or null
created_atstring
updated_atstring
{
  "id": "id",
  "operation": "script.generate",
  "status": "queued",
  "stage": "example",
  "result": null,
  "error_code": null,
  "created_at": "2026-10-28T00:00:00.000Z",
  "updated_at": "2026-10-28T00:00:00.000Z"
}
StatusMeaning
200Success
400Invalid request
401Invalid, expired or revoked key
403Missing scope
404Resource not found in workspace
409Revision or idempotency conflict
429Rate or active-job limit exceeded

On this page