201Successful Response
Schema: SuccessEnvelope_AgentRoleOut_
successbooleanmessagestringcodestringdataAgentRoleOut
/api/v1/agents/rolesAdd an agent to the team. The claude_code and codex engines run on the firm's own subscriptions and are for DayZero staff only (AGENT_003). Business admins only.
Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.
Schema: AgentRoleCreate
namestringrequiredShort role name, e.g. Bookkeeper.
titlestringinstructionsstringStanding instructions (markdown).
skillsarray · AgentSkillAgentSkillnamestringrequireddescriptionstringbodystringMarkdown the role reads when the skill applies.
enabledbooleanlearnedbooleanenginestringnative runs DayZero's own loop on Gemini (every role); claude_code and codex run the firm's CLIs on its subscriptions (DayZero staff only).
One of: native, claude_code, codex
modelstringModel id for the engine; null = the engine's default (google/gemini-4-argon).
scopestringread never proposes; changes files gated writes as proposed changes.
One of: read, changes
allowed_toolsarray · stringTool access: tool names, group:<mount> (a whole tool group) and server:<handle> (a connected MCP server); null = every tool its scope allows. AGENT_026 for a token it cannot hold.
paramsobjectspend_cap_usd_monthstringMonthly spend cap in USD; new runs refuse above it and a run in flight stops before its next turn once it is reached.
max_cost_usd_runstringDefault cost limit of one run in USD; null = no per-run limit.
browserbooleanDrives a real browser with saved logins (Claude Code or Codex only).
library_keystringpersonaAgentPersonaUpdateFace and vibe; what is left out gets the first color and body no other role on the team has, and the steady vibe.
Schema: SuccessEnvelope_AgentRoleOut_
successbooleanmessagestringcodestringdataAgentRoleOutSchema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.
Schema: ErrorResponse
errorstringrequiredError category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.
messagestringrequiredHuman-readable explanation, safe to show to end users.
codestringrequiredStable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).
request_idstringCorrelation id for support requests. Echoes the x-request-id request header when one was supplied.
errorsobjectField-level validation messages keyed by field name. Present on 400/422 validation failures only.