Obvious/Help Center

Create Thread in Project

Published February 27, 2026 · Last updated March 5, 2026 · 2 min read

POST /api/v1/projects/{id}/thread creates a new thread in an existing project and starts an autonomous agent session. Use this to run additional tasks on a project without creating a new one from a template.


Authentication

Include your API key in the Authorization header of every request. API keys are scoped to a workspace and inherit the permissions of the user who created them.

Authorization: Bearer obv_your_api_key

Generate API keys in Settings → External Access.


Path Parameters

NameTypeRequiredDescription
idstringYesThe project ID. The project must belong to the same workspace as your API key.

Request Body

Send a JSON object with Content-Type: application/json.

ParameterTypeRequiredDescription
starterPromptstringYesThe task you want the agent to perform. Be specific — the agent runs autonomously based on these instructions.
namestringNoA name for the new thread. If omitted, defaults to "External API Conversation".
successPromptstringNoInstructions the agent follows after completing the task. Use this to trigger a webhook, send a notification, or perform cleanup.
failurePromptstringNoInstructions the agent follows if it hits a blocker. Use this to notify your systems or request human review.

Response

A successful request returns 200 OK with the thread and execution details.

{
  "success": true,
  "thread": {
    "id": "th_xxx"
  },
  "execution": {
    "id": "exec_xxx",
    "status": "started"
  }
}
FieldTypeDescription
thread.idstringThe new thread's ID.
execution.idstringThe agent execution ID.
execution.statusstringAlways "started" on success.

Code Example

curl -X POST https://api.app.obvious.ai/api/v1/projects/prj_abc123/thread \
  -H "Authorization: Bearer obv_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "starterPrompt": "Create a chart showing monthly revenue trends from the sales sheet",
    "name": "Monthly Revenue Analysis",
    "successPrompt": "POST the chart URL to https://hooks.example.com/obvious-done",
    "failurePrompt": "POST error details to https://hooks.example.com/obvious-failed"
  }'

Errors

StatusErrorCause
401Authorization header requiredMissing Authorization header.
401Invalid authorization formatHeader doesn't start with Bearer .
401Invalid or expired API keyThe API key doesn't exist or has been revoked.
404Project not foundThe project ID doesn't exist or belongs to a different workspace.
409Thread already has an active executionA rare race condition. Retry the request.

Was this helpful?