Send a follow-up run
curl --request POST \
--url https://origami.chat/api/v2/agents/{id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"focusTableIds": []
}
'{
"run": {
"id": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prompt": "<string>",
"steps": {
"completed": 1,
"max": 2
},
"startedAt": "2023-11-07T05:31:56Z",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request": {
"prompt": "<string>",
"focusTableIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"response": {
"text": "<string>",
"actions": [
{
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableName": "<string>",
"columnId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"columnName": "<string>",
"count": 123,
"leadCount": 123,
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"tables": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"leadCount": 123,
"columns": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"slug": "<string>",
"autoTrigger": true,
"credits": {
"lifetimeUsed": 123
},
"cells": {
"running": 1,
"errored": 1
},
"stats": {
"avgCreditsPerRun": 123,
"callRate": 0.5,
"totalRuns": 123
},
"qualification": {
"pass": 123,
"fail": 123,
"unsure": 123,
"total": 123
}
}
],
"credits": {
"lifetimeUsed": 123
},
"cells": {
"running": 1,
"errored": 1
},
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stats": {
"creditsPerLead": 123,
"creditsPerQualifiedLead": 123,
"findMoreEstimatedCredits": 123,
"qualification": {
"rate": 0.5,
"fetchRate": 0.5,
"qualifiedLeads": 123,
"effectiveLeadsPerQualified": 123,
"estimatedQualifiedLeads": 123
},
"funnel": {
"totalSourcedLeads": 123,
"postStaticLeads": 123,
"dedupedLeads": 123,
"dedupRate": 0.5,
"excludedLeads": 123,
"excludedRate": 0.5
},
"running": {
"runningLeads": 123,
"oldestActiveRunStartedAt": "2023-11-07T05:31:56Z"
},
"leadSources": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avgCreditsPerLead": 123,
"totalCredits": 123,
"totalLeads": 123
}
],
"hasUnknownTotalWithMore": true
}
}
],
"transcriptTruncated": true,
"transcript": [
{
"content": "<string>",
"toolCalls": [
{
"id": "<string>",
"name": "<string>",
"input": "<unknown>"
}
],
"toolCallId": "<string>",
"name": "<string>",
"result": "<string>",
"truncated": true
}
]
},
"todo": {
"pendingQuestions": [
{
"question": "<string>",
"suggestedAnswers": [
"<string>"
],
"freeformOption": "Or something else"
}
],
"nextActions": [
{
"label": "<string>",
"tableSlug": "<string>"
}
]
},
"completedAt": "2023-11-07T05:31:56Z"
}
}Runs
Send a follow-up run
Admits a new run on an existing agent. Same agent, same
workspace, same conversation context. Responds 202 Accepted
with the initial run object; agent work runs in the
background. Use this to answer a needs_input question — the
agent picks up from the prior conversation.
POST
/
agents
/
{id}
/
runs
Send a follow-up run
curl --request POST \
--url https://origami.chat/api/v2/agents/{id}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"focusTableIds": []
}
'{
"run": {
"id": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prompt": "<string>",
"steps": {
"completed": 1,
"max": 2
},
"startedAt": "2023-11-07T05:31:56Z",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"request": {
"prompt": "<string>",
"focusTableIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"response": {
"text": "<string>",
"actions": [
{
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableName": "<string>",
"columnId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"columnName": "<string>",
"count": 123,
"leadCount": 123,
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"tables": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"leadCount": 123,
"columns": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"slug": "<string>",
"autoTrigger": true,
"credits": {
"lifetimeUsed": 123
},
"cells": {
"running": 1,
"errored": 1
},
"stats": {
"avgCreditsPerRun": 123,
"callRate": 0.5,
"totalRuns": 123
},
"qualification": {
"pass": 123,
"fail": 123,
"unsure": 123,
"total": 123
}
}
],
"credits": {
"lifetimeUsed": 123
},
"cells": {
"running": 1,
"errored": 1
},
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stats": {
"creditsPerLead": 123,
"creditsPerQualifiedLead": 123,
"findMoreEstimatedCredits": 123,
"qualification": {
"rate": 0.5,
"fetchRate": 0.5,
"qualifiedLeads": 123,
"effectiveLeadsPerQualified": 123,
"estimatedQualifiedLeads": 123
},
"funnel": {
"totalSourcedLeads": 123,
"postStaticLeads": 123,
"dedupedLeads": 123,
"dedupRate": 0.5,
"excludedLeads": 123,
"excludedRate": 0.5
},
"running": {
"runningLeads": 123,
"oldestActiveRunStartedAt": "2023-11-07T05:31:56Z"
},
"leadSources": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"avgCreditsPerLead": 123,
"totalCredits": 123,
"totalLeads": 123
}
],
"hasUnknownTotalWithMore": true
}
}
],
"transcriptTruncated": true,
"transcript": [
{
"content": "<string>",
"toolCalls": [
{
"id": "<string>",
"name": "<string>",
"input": "<unknown>"
}
],
"toolCallId": "<string>",
"name": "<string>",
"result": "<string>",
"truncated": true
}
]
},
"todo": {
"pendingQuestions": [
{
"question": "<string>",
"suggestedAnswers": [
"<string>"
],
"freeformOption": "Or something else"
}
],
"nextActions": [
{
"label": "<string>",
"tableSlug": "<string>"
}
]
},
"completedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Run admitted; agent work is in the background.
Show child attributes
Show child attributes
⌘I