API reference / Workers and bridges
Record the agent process outcome
Requires an unexpired running lease.
/api/v1/worker/jobs/{jobId}/completeAuthorization
worker:run; owning key and workerIdSend Authorization: Bearer <FLEETDECK_API_KEY> with the scope above. The key must also grant access to the target device. Authentication guide ↗
Request example
curl --request POST \
--url 'https://fleetdeck.co/api/v1/worker/jobs/job_123/complete' \
--header "Authorization: Bearer $FLEETDECK_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"workerId": "worker-01",
"status": "completed",
"summary": "Agent finished; consult its retained screenshot evidence."
}'Replace example IDs with returned values. Read credentials from your private environment.
Response examples
{
"recorded": true
}Path parameters
jobIdstringrequiredJob ID returned by Schedule a job or List jobs, owned by the current key.
"job_123"Validation pattern
^[A-Za-z0-9._:-]+$Request body application/json
workerIdstringrequiredStable identifier for this worker process. Reuse it for claim, heartbeat and completion calls.
"worker-01"Validation pattern
^[A-Za-z0-9._:-]+$statusstringrequiredCurrent state. A completed action means the driver finished; verify the intended screen or app effect separately.
"completed""failed""cancelled"summarystringoptionalWorker's completion summary. It describes the process outcome, not independently verified app success.
"""Agent finished; consult its retained screenshot evidence."Unknown fields are rejected.
Behavior and limits
Requires an unexpired running lease. status is completed, failed or cancelled; summary defaults to empty and is at most 2,000 characters. A requested cancellation overrides status to cancelled. Revokes the child token and closes child sessions. completed describes process exit, not verified publication or app outcome. Do not rerun the job if completion reporting fails.
Response 200
Recorded · application/json
recordedbooleanalways presentTrue when the completion report has been recorded.
trueErrors
Expand a code for its recovery steps. Responses use error and code; validation errors also include issues.
401UNAUTHORIZEDMissing, malformed, expired or revoked credential; user verification/password state can also deny access.
Recovery: Use Authorization: Bearer with a valid scoped key. For dashboard routes, sign in. Job children require an active parent job and timely renewal.
Full error reference ↗403FORBIDDENRequired scope, device grant, account membership or worker identity is missing.
Recovery: Check the endpoint’s scopes, exact device, owning key and workerId. A different key cannot access the original key’s sessions or jobs.
Full error reference ↗409LEASE_EXPIREDCompletion report no longer owns a live action/job lease.
Recovery: Do not rerun the work. Inspect action/job status and the device; record the uncertainty in agent evidence.
Full error reference ↗400INVALID_JSONMissing or malformed JSON.
Recovery: Use valid JSON. Body-less routes should omit the body; required routes need their documented object.
Full error reference ↗415CONTENT_TYPEA supplied JSON body lacks application/json content type.
Recovery: Set Content-Type: application/json; charset parameters are accepted.
Full error reference ↗413TOO_LARGERequest body exceeds its byte limit.
Recovery: Keep /api/v1 bodies at or below 3,000,000 bytes and key creation at or below 16,384. Use media_chunk for large files.
Full error reference ↗422VALIDATIONA field, type, bound or unknown property failed validation.
Recovery: Read issues[].path and issues[].message. Match the endpoint schema; strict objects reject extra fields.
Full error reference ↗500INTERNALUnexpected service error.
Recovery: Save nonsecret request context and time for support. Query action status before repeating a mutation; never assume it did not execute.
Full error reference ↗Example error messages are illustrative. Match the code and HTTP status; do not depend on exact message wording.
