Skip to main content
POST
https://agentgate.mynewapi.com
/
v1
/
work-orders
curl -X POST https://agentgate.mynewapi.com/v1/work-orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskPrompt": "Add input validation to the user registration endpoint",
    "workspaceSource": {
      "type": "git",
      "repository": "https://github.com/your-org/your-repo",
      "branch": "main"
    },
    "maxIterations": 5,
    "tenantContext": {
      "tenantId": "acme-corp",
      "tenantUserId": "user_123"
    }
  }'
{
  "workOrderId": "wo_abc123xyz",
  "runId": "run_def456uvw",
  "status": "pending",
  "createdAt": "2024-01-15T10:30:00Z"
}
taskPrompt
string
required
Description of the task to accomplish. Be specific and include context.
workspaceSource
object
required
Source for the workspace files.
maxIterations
integer
default:10
Maximum number of iterations before failing.
gatePlan
object
Verification configuration.
webhookUrl
string
URL to receive completion webhook.
tenantContext
object
B2B2C tenant information.
metadata
object
Custom metadata to attach to the work order.
workOrderId
string
Unique identifier for the work order.
runId
string
Unique identifier for the created run.
status
string
Initial status (always pending).
createdAt
string
ISO 8601 timestamp of creation.
curl -X POST https://agentgate.mynewapi.com/v1/work-orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskPrompt": "Add input validation to the user registration endpoint",
    "workspaceSource": {
      "type": "git",
      "repository": "https://github.com/your-org/your-repo",
      "branch": "main"
    },
    "maxIterations": 5,
    "tenantContext": {
      "tenantId": "acme-corp",
      "tenantUserId": "user_123"
    }
  }'
{
  "workOrderId": "wo_abc123xyz",
  "runId": "run_def456uvw",
  "status": "pending",
  "createdAt": "2024-01-15T10:30:00Z"
}