Amazi API

Project chats

Create and manage chats, send messages and follow their results through API v1.

Before you start

Use https://api.amazi.pro/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.

Get an API token with your email and password. The same token works for all operations below, using your account's project access.

List chats by project ID

Send GET /v1/projects/{projectId}/chats with your API token. 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.pro/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

Message items can include contextResetAfterTurns, the number of completed agent turns before Amazi started a new AI context for that task. It is omitted when no turn-limit reset was recorded. Use the task ID to show one reset marker across its request and reply; older messages are not backfilled.

All paths below are complete paths on https://api.amazi.pro. Replace {projectId} with your project ID and {chatId} with a chat ID from the list.

Method and pathResult
GET /v1/projects/{projectId}/chatsitems containing active chats; archived=true selects archived chats
POST /v1/projects/{projectId}/chatsCreate an empty chat with {"title":"Automation"}; HTTP 201
GET /v1/projects/{projectId}/chats/{chatId}Read one chat
PATCH /v1/projects/{projectId}/chats/{chatId}Rename with {"title":"New title"}
POST /v1/projects/{projectId}/chats/{chatId}/archiveArchive the chat
POST /v1/projects/{projectId}/chats/{chatId}/restoreRestore an archived chat
GET /v1/projects/{projectId}/chats/{chatId}/messagesitems and nextCursor; optional limit from 1 to 100
POST /v1/projects/{projectId}/chats/{chatId}/messagesSubmit text; HTTP 202
GET /v1/projects/{projectId}/chats/{chatId}/queuePending, 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.pro/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 changing the model selection are not available through this endpoint. Messages use the model saved for that chat in Amazi, or Auto if none is saved. A saved manual choice requires model-selection access for the token owner.

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