# chats_send

Enviar uma pergunta ou pedido de publicação. Omitir chatId inicia uma conversa.

REST · `POST /api/v1/operations/chats_send` · MCP · `chats_send`

Permissão necessária · `read`. Envie Idempotency-Key no REST ou requestKey no MCP. Substitua IDs e datas do exemplo antes de executar.

## Exemplo de entrada

~~~json
{
  "provider": "codex",
  "prompt": "Which posts reached the most people this week?"
}
~~~

O REST retorna a saída abaixo diretamente. No MCP leia structuredContent.result. Consulte o contrato atual em /api/v1/openapi.json.

Em 401 confira a validade da credencial. Em 403 confira papel, escopos e contas. Em 409 releia o registro antes de tentar novamente.

## JSON Schema · Entrada

~~~json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "chatId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "provider": {
      "type": "string",
      "const": "codex"
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16000
    }
  },
  "required": [
    "provider",
    "prompt"
  ],
  "additionalProperties": false
}
~~~

## JSON Schema · Saída

~~~json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "chatId": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "chatId"
  ],
  "additionalProperties": {}
}
~~~
