Send Follow-up
Task API
Send Follow-up
Send a follow-up message to an existing task
POST
Send Follow-up
Send Follow-up Message
Send a follow-up message to an existing task’s session. This maintains conversation context, allowing you to continue the dialogue without creating a new task. The endpoint returns immediately and execution runs in the background. If the task’s session has expired, it is automatically restored - no need to create a new task.Request
JSON Request (without files)
Multipart Request (with files)
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The follow-up message to send |
files | file(s) | No | Files to upload (max 20 files, 50MB each). ZIP files are auto-extracted. |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique task identifier |
File Upload Behavior
When files are uploaded:- Files are saved to the task’s workspace under
uploads/ - ZIP files are automatically extracted, preserving directory structure
- A file list is prepended to your message so the AI knows the files are available
- The AI can then read and process these files using workspace tools
Response
Returns JSON immediately. Execution runs in the background.GET /api/v1/tasks/:id/stream to receive the response. The stream will replay all conversation history (including your follow-up) then deliver live events.
Session Auto-Restore
If the task’s session has expired (e.g., due to inactivity timeout), the follow-up endpoint automatically:- Creates a new session
- Loads the conversation history into agent memory
- Copies preserved workspace files
- Continues execution with your new message
status event with “Restoring session…” during this process. No special handling is needed on your end.
Examples
Simple Follow-up (JSON)
Follow-up with File Upload
Upload ZIP Archive
ZIP files are automatically extracted. Use this to upload entire project directories:Important Notes
Follow-up messages use the same conversation context as the original task, so the agent has full memory of the previous conversation. If the session expired, it is automatically restored.
Errors
| Code | Description |
|---|---|
AUTH_REQUIRED | No authentication provided |
INVALID_API_KEY | Invalid or expired API key |
NOT_FOUND | Task with the specified ID was not found |
VALIDATION_ERROR | Missing message in request body |