Get Message

GET /messages/{id}

Fetch a message by its id.

Path parameters

  • id string Required

Query parameters

  • includes string(csv)

    Extra message attributes to include in the response.

    Value is sources.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id string
      • content string Required
      • conversation_id string Required
      • machine boolean

        This is true for all LLM generated messages.

      • failed_responding boolean

        This will be true if the response generation for a message had failed.

      • flagged boolean

        This is true when message is in violation of OpenAI usage policy.

      • created_at integer(int64)

        Unix timestamp in seconds

      • sources object
        Hide sources attribute Show sources attribute object
        • data array[object]
          Any of:
GET /messages/{id}
curl \
 --request GET 'https://getcody.ai/api/v1/messages/{id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "id": "string",
    "content": "string",
    "conversation_id": "string",
    "machine": true,
    "failed_responding": true,
    "flagged": true,
    "created_at": 42,
    "sources": {
      "data": [
        {
          "type": "written",
          "created_at": 1693013531,
          "document_id": "Jw31Pv6PMmro",
          "document_url": "https://getcody.ai/directories/1/documents/1",
          "document_name": "How to bake cake"
        }
      ]
    }
  }
}