Skip to main content
POST
create agent authoring content

Authorizations

Authorization
string
header
required

Workspace API key created in Erstan Settings. Keys carry scopes (agents:list, agents:read, agents:write, agents:run, runs:read, tasks:execute, documents:read, documents:write, files:read, files:write). Agent access follows the key creator's current workspace, team, and agent permissions. Agent draft creation requires agents:write; update, validation, and publishing require both agents:read and agents:write; draft testing also requires agents:run. Keys with tasks:execute must include at least one allowed project or team (allowedProjectIds / allowedTeamIds); keys with document or file scopes must include at least one allowed team. Empty allowlists mean no access — the API fails closed.

Headers

Idempotency-Key
string
required

1–200 visible ASCII characters. Reuse with identical content and If-Match after response loss. Committed responses are encrypted and recoverable for 24 hours; expired/pending keys are never blindly reused.

Required string length: 1 - 200

Body

application/json
name
string
required
nodes
object[]
required
edges
object[]
required
teamId
string
required
description
string | null
category
string | null
tags
string[]
difficulty
string | null
estimatedTime
string | null
behaviorType
enum<string>
Available options:
interactive,
pipeline
runAsSelf
boolean

Response

Success.

agent
object
required
builderUrl
string
required
selectedVersion
integer

Present for explicit version reads. These responses are read-only; their history_ revision cannot authorize a current draft write.

issuedWebhookCredentials
object[]