completeAgentTask
# completeAgentTask
POST
/agent/tasks/{taskId}/complete
const url = 'http://localhost:8080/api/v1/agent/tasks/per_01j9x3k8m2q4r5s6t7v8w9y0z1/complete';const options = { method: 'POST', headers: {cookie: 'hs_session=<hs_session>', 'Content-Type': 'application/json'}, body: '{"status":"ok","detail":"example","retryAfterSeconds":1,"ingestBatchIds":["per_01j9x3k8m2q4r5s6t7v8w9y0z1"],"profile":{"displayName":"example","avatarUrl":"https://example.com","avatarMediaId":"per_01j9x3k8m2q4r5s6t7v8w9y0z1","platformUserId":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/agent/tasks/per_01j9x3k8m2q4r5s6t7v8w9y0z1/complete \ --header 'Content-Type: application/json' \ --cookie hs_session=<hs_session> \ --data '{ "status": "ok", "detail": "example", "retryAfterSeconds": 1, "ingestBatchIds": [ "per_01j9x3k8m2q4r5s6t7v8w9y0z1" ], "profile": { "displayName": "example", "avatarUrl": "https://example.com", "avatarMediaId": "per_01j9x3k8m2q4r5s6t7v8w9y0z1", "platformUserId": "example" } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”taskId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
status
required
string
detail
Short, no secrets or page dumps.
string
retryAfterSeconds
integer
ingestBatchIds
Array<string>
profile
Optional profile refresh seen while fetching.
object
displayName
string
avatarUrl
string format: uri
avatarMediaId
string
platformUserId
string
Responses
Section titled “Responses”Completed. Account status and next fetch time updated.
Conflicts with current state.
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
string
i18nKey
string
detail
string
fields
Array<object>
object
path
required
string
code
required
string
i18nKey
string
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "i18nKey": "example", "detail": "example", "fields": [ { "path": "example", "code": "example", "i18nKey": "example" } ]}