CorfedoCorfedoDocs
ReferenceAPI referenceAI

Send AI Message

POST /api/v1/ai/messages. Request parameters and response schemas.

POST
/api/v1/ai/messages

Authorization

corfedoOAuth corfedo:ai:invoke, corfedo:repositories:code:read
headerAuthorizationBearer <token>

Corfedo-issued bearer credential for the workspace's API resource, such as https://workspace.corfedo.example/api; the workspace host is the issuer. Public clients identify themselves with a Client ID Metadata Document URL and use PKCE S256; service clients use private_key_jwt. Browser cookies and MCP-resource credentials are not accepted.

Scope: corfedo:ai:invoke, corfedo:repositories:code:read

Request Body

application/json
  1. body
conversationId?|
Formatuuid
clientMessageId*string
Formatuuid
text*string
sources?null|
references?null|array<>
limits?null|
tools?null|array<string>
clientTools?null|array<>
outputSchema?null|JsonElement
stream?null|boolean

Response Body

OK

  1. response
runId*string
Formatuuid
conversationId*string
Formatuuid
messageId?|
Formatuuid
status*AiRunStatus
Value in"queued""running""waitingForClient""cancelRequested""ended"
outcome?null|
failureCategory?null|string
answer?null|JsonElement
citations?null|
usage?null|
requiredCalls*array<>
sequence*string

Canonical UInt64 decimal string (0 through 18446744073709551615).

Match^(0|[1-9][0-9]*)$
Lengthlength <= 20
outcomes?null|array<>
Example Request
curl -X POST 'https://example.com/api/v1/ai/messages' \  -H 'Content-Type: application/json' \  -d '{  "clientMessageId": "6751c24a-b4eb-49b8-a2cb-e2427e57e61b",  "text": "string"}'
Example Response
{  "runId": "78c33d18-170c-44d3-a227-b3194f134f73",  "conversationId": "ee6e55e8-45fe-4a3e-9bc8-4669f9fdf77a",  "messageId": null,  "status": "queued",  "outcome": null,  "failureCategory": null,  "answer": null,  "citations": null,  "usage": null,  "requiredCalls": [    {      "callId": "4722cd84-0ec7-4ef5-8c34-1b0150f45f53",      "name": "string",      "arguments": null,      "deadline": "2019-08-24T14:15:22Z"    }  ],  "sequence": "string",  "outcomes": null}