Skip to content

Chat API

Send messages to Certyn from your own code, as one reply or as a stream.

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"
}
FieldNotes
messageRequired, unless you attach images or documents
projectIdThe project to work in
conversationIdContinue a conversation. Omit it to start a new one.
environmentKey
depthstandard (default), deep, or expert
images, documentsAttachments, 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:use

Same 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:use

Returns 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." }'