Documentation menu
Agent Jobs

Create agent job

POST /api/v1/projects/{projectId}/environments/{environmentId}/agent-jobs

Create a new agent job schedule for a Project Agent in an Environment.

Parameters

path

NameTypeRequiredDescription
projectIdstringrequiredIdentifies the Project that owns the addressed resource. Applies to Create agent job.
environmentIdstringrequiredIdentifies the Project environment addressed by the operation. Applies to Create agent job.

Request body

Required — Request body for: Create agent job.

application/json

NameTypeRequiredDescription
namestringrequired
enabledbooleanoptional
kind"cron" | "event_driven" | "ad_hoc"required
schedulestring | nulloptional
targetone of 3 typesrequired

Responses

StatusDescriptionBody
201Response for status 201application/json — object — type: "agentJob" (required); id: string (required); name: string (required); enabled: boolean (required); kind: "cron" | "event_driven" | "ad_hoc" (required); schedule: string | null (required); target: one of 3 types (required); nextFireAt: string | null (required); scheduleSyncState: "pending" | "synced" | "error" (required); createdByUserId: string (required); updatedByUserId: string (required); createdAt: string (required); updatedAt: string (required)
400The request is malformed or cannot be processed.application/json — PublicApiError — error: object (required)
401Authentication failed. The Authorization header is missing, or the credential is invalid or expired.application/json — PublicApiError — error: object (required)
403Access denied. The authenticated user does not have permission to perform this action.application/json — PublicApiError — error: object (required)
404Resource not found.application/json — PublicApiError — error: object (required)
409Request conflicts with current state of the resource, including safe deployment conflict classifications.application/json — PublicApiError — error: object (required)
422Request validation failed. Check the request body, query parameters, or path parameters.application/json — PublicApiError — error: object (required)
429Too many requests.application/json — PublicApiError — error: object (required)
500The server could not complete the request.application/json — PublicApiError — error: object (required)
503Service temporarily unavailable (e.g. execution capacity exhausted). The response carries a Retry-After header; retry with backoff.application/json — PublicApiError — error: object (required)