Amazi API
Project chats
Create and manage chats, send messages and follow their results through API v1.
Before you start
Use https://api.amazi.ai/v1/projects/{projectId}/chats from your server or automation. Copy the project and chat IDs from the project URL; the chat list also returns chat IDs.
Create a personal API token with chat:read and/or chat:write permissions.
List chats by project ID
Send GET /v1/projects/{projectId}/chats with a token that has chat:read permission. You only need the project ID; a chat ID is not required.
Set PROJECT_ID to your project's ID and AMAZI_API_TOKEN to your personal API token, then run:
curl --fail-with-body "https://api.amazi.ai/v1/projects/$PROJECT_ID/chats" \
-H "Authorization: Bearer $AMAZI_API_TOKEN"
HTTP 200 returns an items array containing the project's active chats. Each item's id is the chatId to use in the other endpoints. If there are no active chats, items is empty. To list archived chats instead, use GET /v1/projects/{projectId}/chats?archived=true. This list has no pagination parameters.
Chat operations
All paths below are complete paths on https://api.amazi.ai. Replace {projectId} with your project ID and {chatId} with a chat ID from the list.
| Method and path | Scope | Result |
|---|---|---|
| GET /v1/projects/{projectId}/chats | chat:read | items containing active chats; archived=true selects archived chats |
| POST /v1/projects/{projectId}/chats | chat:write | Create an empty chat with {"title":"Automation"}; HTTP 201 |
| GET /v1/projects/{projectId}/chats/{chatId} | chat:read | Read one chat |
| PATCH /v1/projects/{projectId}/chats/{chatId} | chat:write | Rename with {"title":"New title"} |
| POST /v1/projects/{projectId}/chats/{chatId}/archive | chat:write | Archive the chat |
| POST /v1/projects/{projectId}/chats/{chatId}/restore | chat:write | Restore an archived chat |
| GET /v1/projects/{projectId}/chats/{chatId}/messages | chat:read | items and nextCursor; optional limit from 1 to 100 |
| POST /v1/projects/{projectId}/chats/{chatId}/messages | chat:write | Submit text; HTTP 202 |
| GET /v1/projects/{projectId}/chats/{chatId}/queue | chat:read | Pending, dispatching and failed submissions for this chat |
See the Swagger API v1 reference for request parameters and response schemas.
Send a message
curl --fail-with-body "https://api.amazi.ai/v1/projects/$PROJECT_ID/chats/$CHAT_ID/messages" \
-H "Authorization: Bearer $AMAZI_API_TOKEN" \
-H "Idempotency-Key: $REQUEST_UUID" \
-H "Content-Type: application/json" \
-d '{"content":"Update the homepage"}'
Generate REQUEST_UUID once for each intended message. Retry with the same UUID and identical body after a connection failure. Retained queued submissions and saved messages are deduplicated; reusing a key with changed text or reply is rejected. Do not retry a submission you have cancelled in Amazi. The optional replyToMessageId must identify a message in this chat. Version 1 accepts text up to 100,000 characters; attachment upload and model selection are not available through this endpoint.
Follow the result
The response contains submissionId, chatId and disposition (queued or started). HTTP 202 confirms acceptance, not completion. Follow the chat queue and message history for results. If isAwaitingUser is true, open Amazi to answer the agent's question or connection request. Normal project access, availability, maintenance queues and credit rules apply.
Limits, errors and token security · API overview and maintenance