Skip to content
Select themeSelect language

post_api_projects_id_automation_setup

POST
/api/projects/{id}/automation/setup
curl --request POST \
--url https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/automation/setup \
--header 'Content-Type: application/json' \
--cookie supacloud_session=<supacloud_session> \
--data '{ "auto_developer_enabled": true, "git_credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "git_default_branch": "example", "git_provider": "example", "git_repo_url": "example" }'
id
required
string format: uuid

Project id

Media typeapplication/json
object
auto_developer_enabled
required
boolean
git_credential_id
string | null format: uuid
git_default_branch
string | null
git_provider
string | null
git_repo_url
string | null
Examplegenerated
{
"auto_developer_enabled": true,
"git_credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"git_default_branch": "example",
"git_provider": "example",
"git_repo_url": "example"
}

Automation configured successfully

Media typeapplication/json
object
enabled_events
required
Array<string>
project
required
object
auto_developer_workflow_id

D1 — materialized Auto Developer workflow id.

string | null format: uuid
autonomy_level

ADR 0045 §3.1 Stage 4 — OPTIONAL project autonomy override (mig 214, nullable SMALLINT). None = inherit the workspace level (the precedence chain resolves the first non-null). #[serde(default)] keeps pre-214 rows readable.

integer | null format: int32
autonomy_overrides

ADR 0045 §3.1 — per-axis Advanced override vector (mig 214, JSONB NOT NULL DEFAULT '{}'). Empty {} = no per-axis override.

backlog_classifier

'llm' (default) or 'rules' — how items are classified/prioritized.

string
backlog_cursor_at

Timestamp of the last successful scan; None until the first sweep.

string | null format: date-time
backlog_daily_budget_usd

Per-sweep daily budget cap in USD; None leaves only the workspace cap.

number | null format: double
backlog_max_concurrent

Per-sweep fan-out bound. None → falls back to max_concurrent_runs.

integer | null format: int32
backlog_merge_policy

'pr_only' (default) | 'auto_on_green' | 'full_auto' (D5).

string
backlog_mode_enabled

Kill-switch: the ticker skips a project whose flag is false.

boolean
backlog_required_reviewers

N human approvals required on the in_review → done/merge step (D5).

integer format: int32
closeout_config
One of:
null
created_at
required
string format: date-time
daily_budget_usd

#708 M5 (mig 296) — the project-TOTAL daily/monthly $-budget caps that AND-gate EVERY task launch (not just backlog dispatch) under the workspace budget. None leaves only the workspace cap. FromRow auto-maps them from SELECT *.

number | null format: double
denied_tools

ADR 0045 Stage 1b — per-project blast-radius tool denylist (mig 210, TEXT[] NOT NULL DEFAULT '{}'). #[serde(default)] so pre-209 rows (and any Deserialize path without the field) read as [].

Array<string>
detected_stack
git_credential_id
string | null format: uuid
git_default_branch
string | null
git_provider
string | null
git_repo_url
string | null
id
required
string format: uuid
image_built_at
string | null format: date-time
image_config
image_error
string | null
image_size
integer | null format: int64
image_status
string | null
image_tag
string | null
issue_tracker

ADR 0029 — tracker provider/key, OAuth credential and state-name overrides.

string | null
issue_tracker_autodev_enabled
required

ADR 0029 Slice 7 — tracker auto-developer toggle + webhook HMAC secret.

boolean
issue_tracker_credential_id
string | null format: uuid
issue_tracker_key
string | null
issue_tracker_state_map
max_concurrent_runs

Issue #110: per-project concurrency cap. None = unlimited.

integer | null format: int32
memory_governance_policy

#708 W13 (ADR 0061) — the SPARSE per-project memory-governance override (mig 289, nullable JSONB). None (SQL NULL) = inherit the workspace policy entirely; an object overrides only the memory scopes it names (folded per-scope over the workspace via effective_memory_governance). #[serde(default)] keeps any non-SELECT * deserialize path readable.

monthly_budget_usd
number | null format: double
name
required
string
required_worker_group_ids

ADR 0046 RUNG 1b — OPTIONAL project worker-group affinity override (mig 227, nullable UUID[]). None = inherit (the column was NULL — contributes nothing to the first-non-null profile->project->task chain); Some(vec![]) = an explicit “no affinity from this source”. Resolved into the task’s required_labels by services::runners::groups. #[serde(default)] keeps pre-227 rows readable.

Array<string> | null
user_id
required
string format: uuid
workspace_id
string | null format: uuid
webhook_configured
required
boolean
webhook_url
string | null
Examplegenerated
{
"enabled_events": [
"example"
],
"project": {
"auto_developer_workflow_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"autonomy_level": 1,
"autonomy_overrides": "example",
"backlog_classifier": "example",
"backlog_cursor_at": "2026-04-15T12:00:00Z",
"backlog_daily_budget_usd": 1,
"backlog_max_concurrent": 1,
"backlog_merge_policy": "example",
"backlog_mode_enabled": true,
"backlog_required_reviewers": 1,
"closeout_config": {
"memory": true,
"project_docs": {
"condition": "example",
"enabled": true,
"globs": [
"example"
]
},
"user_docs": {
"condition": "example",
"enabled": true,
"globs": [
"example"
],
"langs": [
"example"
]
},
"wiki": {
"condition": "example",
"enabled": true
}
},
"created_at": "2026-04-15T12:00:00Z",
"daily_budget_usd": 1,
"denied_tools": [
"example"
],
"detected_stack": "example",
"git_credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"git_default_branch": "example",
"git_provider": "example",
"git_repo_url": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"image_built_at": "2026-04-15T12:00:00Z",
"image_config": "example",
"image_error": "example",
"image_size": 1,
"image_status": "example",
"image_tag": "example",
"issue_tracker": "example",
"issue_tracker_autodev_enabled": true,
"issue_tracker_credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"issue_tracker_key": "example",
"issue_tracker_state_map": "example",
"max_concurrent_runs": 1,
"memory_governance_policy": "example",
"monthly_budget_usd": 1,
"name": "example",
"required_worker_group_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
},
"webhook_configured": true,
"webhook_url": "example"
}

Structured client error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Permission denied

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}