The same chat you use on Home, from your own code. All endpoints need the chat:use scope.
Send a message
POST
/api/chatBearer or API key · chat:use{
"message": "Which findings are still open on staging?",
"projectId": "project-id",
"environmentKey": "staging"
}
| Field | Notes |
|---|---|
message | Required, unless you attach images or documents |
projectId | The project to work in |
conversationId | Continue a conversation. Omit it to start a new one. |
environmentKey | |
depth | standard (default), deep, or expert |
images, documents | Attachments, with a per-message limit |
The reply has conversationId, messageId, content, role, toolCalls, createdAt, and usage. Keep conversationId to continue the conversation.
Stream a reply
POST
/api/chat/streamBearer or API key · chat:useSame body. The response is text/event-stream. Each event is a data: line with a JSON chunk. type is one of start, content, tool_start, tool_result, usage, done, or error. Lines that start with : keep the connection open; skip them.
Read a conversation
GET
/api/chat/{conversationId}Bearer or API key · chat:useReturns conversationId, projectId, messages, createdAt, and updatedAt.
Example
curl -sS -X POST "https://api.certyn.io/api/chat" \
-H "Content-Type: application/json" \
-H "X-API-Key: $CERTYN_API_KEY" \
-d '{ "projectId": "'"$PROJECT_ID"'", "message": "Summarize the last suite run." }'