Action
List Actions
GET /actions
Headers:
Authorization: $OTO_API_KEY
OTO_USER_ID: {user_id}
Query-params:
?conversation_id={} (optional)
?status={} (optional)
?type={} (optional)
Response:
{
"actions": [
{
"type": "todo",
"created_at": "0000-00-00T00:00:00Z",
"updated_at": "0000-00-00T00:00:00Z",
"status": "created", // "created", "accepted", "deleted", "completed"
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"conversation_id": "...",
"inner": {
"title": "Buy a lunch",
"body": "Go to ..."
},
"relate": {
"start": 3600,
"end": 3700,
"transcript": "..."
}
},
]
}
Get Action
GET /action/{action_id}
Headers:
Authorization: $OTO_API_KEY
OTO_USER_ID: {user_id}
Response:
{
"type": "todo",
"created_at": "0000-00-00T00:00:00Z",
"updated_at": "0000-00-00T00:00:00Z",
"status": "created", // "created", "accepted", "deleted", "completed"
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"conversation_id": "...",
"inner": {
"title": "Buy a lunch",
"body": "Go to ..."
},
"relate": {
"start": 3600,
"end": 3700,
"transcript": "..."
}
}
Update Action
To update the data of an existing action, you can use the PATCH
HTTP method. Below is the endpoint and the JSON object structure required:
PATCH /action/{action_id}
Headers:
Authorization: $OTO_API_KEY
OTO_USER_ID: {user_id}
Request Body:
{
"status": "accepted" // Options: "created", "accepted", "deleted", "completed"
}
Response:
{
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"status": "accepted",
"updated_at": "0000-00-00T00:00:00Z"
}
Last updated