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
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
project_id | query | no | string | |
script_id | query | no | string | |
collection_id | query | no | string | |
scope_type | query | no | string | |
scope_id | query | no | string | |
kind | query | no | string | |
limit | query | no | string | |
offset | query | no | string |
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.
| Field | Type |
|---|---|
id | string |
org_id | string |
title | string |
body | string |
status | string |
tone | string |
format | string |
length_target | string |
model_used | string |
source_post_url | string |
config_json | string |
created_at | string |
updated_at | string |
source_group_id | string |
style_id | string |
generated_at | string |
generation_mode | string |
window_start | string |
window_end | string |
cta | string |
offering_id | string |
folder_id | string |
[
{
"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"
}
]| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate 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.jsonResponse
| Status | Meaning |
|---|---|
201 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
GET /scripts/{id}
Get scripts
Scope: scripts:read.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
id | path | yes | string |
Example request
curl -X GET "https://app.foxcue.com/api/v1/scripts/example" \
-H "Authorization: Bearer <workspace API key>"Response
| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
PATCH /scripts/{id}
Update scripts
Scope: scripts:write.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
id | path | yes | string |
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.jsonResponse
| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
DELETE /scripts/{id}
Delete scripts
Scope: scripts:write.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
id | path | yes | string |
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.
| Status | Meaning |
|---|---|
204 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
Script versions
GET /script-versions
List script version snapshots
Scope: scripts:read.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
project_id | query | no | string | |
script_id | query | no | string | |
collection_id | query | no | string | |
scope_type | query | no | string | |
scope_id | query | no | string | |
kind | query | no | string | |
limit | query | no | string | |
offset | query | no | string |
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.
| Field | Type |
|---|---|
id | string |
org_id | string |
script_id | string |
version_no | number |
body | string |
source | string |
model_used | string |
words | number |
est_seconds | number |
prompt | string |
settings_json | string |
used_post_ids_json | string |
input_tokens | number |
output_tokens | number |
provider | string |
created_at | string |
checks_json | string |
verify_json | string |
trace_json | string |
[
{
"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"
}
]| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate 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.jsonResponse
The body is a JSON object with these fields.
| Field | Type |
|---|---|
id | string |
org_id | string |
script_id | string |
version_no | number |
body | string |
source | string |
model_used | string |
words | number |
est_seconds | number |
prompt | string |
settings_json | string |
used_post_ids_json | string |
input_tokens | number |
output_tokens | number |
provider | string |
created_at | string |
checks_json | string |
verify_json | string |
trace_json | string |
{
"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"
}| Status | Meaning |
|---|---|
201 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
GET /script-versions/{id}
Read a script snapshot
Scope: scripts:read.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
id | path | yes | string |
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.
| Field | Type |
|---|---|
id | string |
org_id | string |
script_id | string |
version_no | number |
body | string |
source | string |
model_used | string |
words | number |
est_seconds | number |
prompt | string |
settings_json | string |
used_post_ids_json | string |
input_tokens | number |
output_tokens | number |
provider | string |
created_at | string |
checks_json | string |
verify_json | string |
trace_json | string |
{
"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"
}| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
Saved outputs
GET /artifacts
List saved outputs; filter with script_id, composition_id and kind
Scope: outputs:read.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
project_id | query | no | string | |
script_id | query | no | string | |
collection_id | query | no | string | |
scope_type | query | no | string | |
scope_id | query | no | string | |
kind | query | no | string | |
limit | query | no | string | |
offset | query | no | string |
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.
| Field | Type |
|---|---|
id | string |
org_id | string |
script_id | string |
composition_id | string |
version_id | string |
kind | string |
theme | string |
density | string |
deck_json | string |
trace_json | string |
model_used | string |
provider | string |
input_tokens | number |
output_tokens | number |
video_path | string |
audio_path | string |
duration_seconds | number |
timings_json | string |
settings_json | string |
status | string |
trashed_at | string |
created_at | string |
updated_at | string |
error | string |
[
{
"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"
}
]| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
GET /artifacts/{id}
Read saved output metadata/content
Scope: outputs:read.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
id | path | yes | string |
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.
| Field | Type |
|---|---|
id | string |
org_id | string |
script_id | string |
composition_id | string |
version_id | string |
kind | string |
theme | string |
density | string |
deck_json | string |
trace_json | string |
model_used | string |
provider | string |
input_tokens | number |
output_tokens | number |
video_path | string |
audio_path | string |
duration_seconds | number |
timings_json | string |
settings_json | string |
status | string |
trashed_at | string |
created_at | string |
updated_at | string |
error | string |
{
"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"
}| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
Jobs
GET /jobs
List public API jobs
Scope: jobs:read.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
project_id | query | no | string | |
script_id | query | no | string | |
collection_id | query | no | string | |
scope_type | query | no | string | |
scope_id | query | no | string | |
kind | query | no | string | |
limit | query | no | string | |
offset | query | no | string |
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.
| Field | Type |
|---|---|
id | string |
operation | string |
status | string |
stage | string |
result | object or null |
error_code | string or null |
created_at | string |
updated_at | string |
[
{
"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"
}
]| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
POST /jobs
Queue generation or rendering; poll job for results
Scope: generation:write.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
Idempotency-Key | header | yes | string | minLength 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.jsonResponse
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.
| Field | Type |
|---|---|
id | string |
operation | string |
status | string |
stage | string |
result | object or null |
error_code | string or null |
created_at | string |
updated_at | string |
{
"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.
| Status | Meaning |
|---|---|
202 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
GET /jobs/{id}
Poll job status, result and error code
Scope: jobs:read.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
id | path | yes | string |
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.
| Field | Type |
|---|---|
id | string |
operation | string |
status | string |
stage | string |
result | object or null |
error_code | string or null |
created_at | string |
updated_at | string |
{
"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"
}| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |
POST /jobs/{id}/cancel
Cancel queued work or request cooperative cancellation
Scope: jobs:write.
Parameters
| Name | In | Required | Type | Rules |
|---|---|---|---|---|
id | path | yes | string |
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.
| Field | Type |
|---|---|
id | string |
operation | string |
status | string |
stage | string |
result | object or null |
error_code | string or null |
created_at | string |
updated_at | string |
{
"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"
}| Status | Meaning |
|---|---|
200 | Success |
400 | Invalid request |
401 | Invalid, expired or revoked key |
403 | Missing scope |
404 | Resource not found in workspace |
409 | Revision or idempotency conflict |
429 | Rate or active-job limit exceeded |