For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Creates a conversation with the awork Agent or a custom agent.
POST
https://api.awork.com/api/v1/agents/threads
Creates a conversation with the awork Agent or a custom agent and optionally submits the first message.
Supply content or attachments to submit the first message and start processing.
awork Agent threads can be created without a message. Custom Agent threads require text or an attachment.
The response contains the thread and accepted first-message identifiers, not the agent’s reply.
See GET /agents/threads/{threadId}/messages to retrieve replies.
Each request creates a new thread. Retrying after a lost response can create another thread.
Required Permissions
Any authenticated user.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
The thread creation payload.
typeenumRequired
Select personal-agent for the awork Agent, or custom-agent for a configured workspace agent.
Allowed values:
contentstring or nullOptional
The message text. Required when no attachments are supplied.
attachmentslist of objects or nullOptional
Up to 20 distinct files attached to this message. Each file can contain up to 20 MiB.
Upload new files before submitting their identifiers.
modelProviderstring or nullOptional
The provider for a model override. Supply it together with modelName.
modelNamestring or nullOptional
The model to use for this message. It must be available in the workspace.
reasoningLevelstring or nullOptional
The reasoning level for this message. Supported values depend on the selected model.
toolAccessobjectOptional
Per-message agent tool access options.
connectorIdslist of strings or nullOptional
The connector selection for this message.
connectorConnectionslist of objects or nullOptional
Connection choices for custom-agent connectors. These do not change agent settings.
skillIdslist of strings or nullOptional
The skill selection for this message.
agentIdstringOptionalformat: "uuid"
The configured agent to run. Required for custom-agent threads; omit for ordinary personal-agent threads.
titlestring or nullOptional
The thread title.
projectIdstring or nullOptionalformat: "uuid"
The project context id.
taskIdstring or nullOptionalformat: "uuid"
The task context id.
clientIdstring or nullOptionalformat: "uuid"
The client context id.
documentIdstring or nullOptionalformat: "uuid"
The document context id.
Response
OK
idstringOptionalformat: "uuid"
The thread id.
threadRunIdstring or nullOptionalformat: "uuid"
The current run id.
acceptedMessageIdstring or nullOptionalformat: "uuid"
The accepted first-message id, or null when the thread was created without a message.
typestring or nullOptional
The thread type.
titlestring or nullOptional
The thread title.
statusenumOptional
The creation result: ready without a first message, accepted with a first message, queued when the first message waits for a run, or failed to start.
Allowed values:
createdOnstring or nullOptionalformat: "date-time"
The creation timestamp.
createdBystringOptionalformat: "uuid"
The id of the user who created the thread.
updatedOnstring or nullOptionalformat: "date-time"