Append activity to an agent session
POST
/agent-sessions/{runId}/activitiesAuthorization
AuthorizationBearer token (JWT) · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
runIdstringrequiredRequest body
requiredapplication/jsonactionstringactivityTypestringrequiredAllowed:
thoughtactionelicitationresponseerrorpromptlogmodelRequestmodelResponsetoolCalltoolResultbodystringrequiredidempotencyKeystringparameterstringproviderEventIdstringproviderEventTypestringrawobjectresultstringResponses
201
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/agent-sessions/string/activities" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "string",
"activityType": "thought",
"body": "string",
"idempotencyKey": "string",
"parameter": "string",
"providerEventId": "string",
"providerEventType": "string",
"raw": {},
"result": "string"
}'const response = await fetch("https://leadtime.app/api/public/agent-sessions/string/activities", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"action": "string",
"activityType": "thought",
"body": "string",
"idempotencyKey": "string",
"parameter": "string",
"providerEventId": "string",
"providerEventType": "string",
"raw": {},
"result": "string"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/agent-sessions/string/activities",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"action": "string",
"activityType": "thought",
"body": "string",
"idempotencyKey": "string",
"parameter": "string",
"providerEventId": "string",
"providerEventType": "string",
"raw": {},
"result": "string"
},
)Response
No example response.
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions