Tasks

Promote a draft task out of the pre-dispatch draft state

Transitions a draft task (#1240 — created with attachments still uploading) to its normal dispatch-eligible status: offered if it was offered to an agent, pending if it has an owning agent (the common case — UI-composer tasks default to Lead), otherwise unassigned. Called by the UI composer once its attachment upload batch settles, whether every file uploaded, some failed, or all failed — a draft must never be stranded by an upload error. Idempotent: calling it on a task that already left draft returns the current task unchanged rather than erroring, so a retried request is safe.

post/api/tasks/{id}/promote-draft

Path parameters

idstring required

Response

Task promoted (or already out of draft)

idstring uuid required
keystring required

Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.

agentIdstring nullable required
creatorAgentIdstring
taskstring required
titlestring
status'draft' | 'backlog' | 'unassigned' | 'offered' | 'reviewing' | 'pending' | 'in_progress' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'superseded' required
source'mcp' | 'slack' | 'api' | 'ui' | 'github' | 'gitlab' | 'agentmail' | 'system' | 'schedule' | 'workflow' | 'linear' | 'jira'
taskTypestring
tagsstring[]
priorityinteger
dependsOnstring[]
offeredTostring
offeredAtstring date-time
acceptedAtstring date-time
rejectionReasonstring
createdAtstring date-time required
lastUpdatedAtstring date-time required
finishedAtstring date-time
notifiedAtstring date-time
failureReasonstring
outputstring
progressstring
slackChannelIdstring
slackThreadTsstring
slackTriggerMessageTsstring
slackUserIdstring
slackReplySentboolean
slackProgressMessageTsstring
slackTreeRootMessageTsstring
vcsProvider'github' | 'gitlab'
vcsRepostring
vcsEventTypestring
vcsNumberinteger
vcsCommentIdinteger
vcsAuthorstring
vcsUrlstring
vcsInstallationIdinteger
vcsNodeIdstring
agentmailInboxIdstring
agentmailMessageIdstring
agentmailThreadIdstring
mentionMessageIdstring
mentionChannelIdstring
dirstring
parentTaskIdstring
claudeSessionIdstring
modelstring
modelTier'smol' | 'regular' | 'smart' | 'ultra'
effort'off' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'
scheduleIdstring
workflowRunIdstring uuid nullable
workflowRunStepIdstring uuid nullable
contextKeystring
outputSchemaobject
wasPausedboolean
compactionCountinteger
peakContextPercentnumber
peakContextTokensinteger
contextWindowSizeinteger
credentialKeySuffixstring
credentialKeyTypestring
requestedByUserIdstring
swarmVersionstring
provider'claude' | 'codex' | 'pi' | 'devin' | 'claude-managed' | 'opencode' | 'acp'
providerMetaobject
harnessVariantstring
harnessVariantMetaobject
totalCostUsdnumber
routingAffinityInvalidboolean

Changes

Changed in 3 of the 104 revisions of this API.23

    • added the new acp enum value to the response property for the response status

      response-property-enum-value-added

    • added the new acp enum value to the / response property for the response status

      response-property-enum-value-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • endpoint added

      endpoint-added