Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

POST /v1/agents Creates a new Agent configuration.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>
Content-TypeYesapplication/json
Idempotency-KeyNoIdempotency key to prevent duplicate creation. See Idempotency.

Request body

FieldTypeRequiredDescription
namestringYesAgent name, 1–256 characters
modelstring/objectYesModel identifier; either a string (such as "ultimate") or an object
systemstringNoSystem prompt
descriptionstringNoAgent description
toolsarrayNoTool configuration list
mcp_serversarrayNoMCP server configuration list
metadataobjectNoCustom metadata key-value pairs

Example request

curl -X POST "https://openapi.qoder.sh/api/v1/cloud/agents" \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "doc-test-agent",
    "model": "ultimate",
    "system": "You are a documentation testing assistant."
  }'

Example response

HTTP 201 Created
{
  "type": "agent",
  "id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "name": "doc-test-agent",
  "description": "",
  "model": "ultimate",
  "system": "You are a documentation testing assistant.",
  "instructions": "You are a documentation testing assistant.",
  "tools": [],
  "mcp_servers": [],
  "default_environment": "",
  "version": 1,
  "created_at": "2026-05-18T15:26:39.61669Z",
  "updated_at": "2026-05-18T15:26:39.61669Z"
}

Response fields

FieldTypeDescription
typestringAlways "agent"
idstringAgent unique identifier with the agent_ prefix
namestringAgent name
descriptionstringAgent description
modelstringModel identifier
systemstringSystem prompt
instructionsstringInstruction content (kept in sync with system)
toolsarrayTool configuration list
mcp_serversarrayMCP server configuration
default_environmentstringDefault runtime environment
versionintegerCurrent version, starting at 1
created_atstringCreation time (ISO 8601)
updated_atstringLast update time (ISO 8601)

Errors

HTTPTypeTrigger
400invalid_request_errorMissing required field name
400invalid_request_errorname exceeds 256 characters
400invalid_request_errorMissing required field model
400invalid_request_errorInvalid mcp_servers or skills configuration
401authentication_errorPAT invalid or expired
403permission_errorNot authorized for this operation
See Errors for the full error envelope.

Error response example

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "name must be between 1 and 256 characters"
  }
}