Create Document from File

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://developers.meetcody.ai/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Cody AI MCP server": {
  "url": "https://developers.meetcody.ai/mcp"
}
Close
POST /documents/file

Create a document by uploading a file up to 100 MB in size.

info Only these file types are allowed: txt, md, rtf, pdf, ppt, pptx, pptm, doc, docx, docm

application/json

Body

Responses

  • 200

    Request is accepted and a document will be created after the file is converted into readable format, which can take from couple minutes to up to an hour.

  • 422 application/json

    Request validation errors.

    Hide response attributes Show response attributes object
    • message string
    • errors object
      Hide errors attributes Show errors attributes object
      • folder_id array[string]
      • key array[string]
      • file_size array[string]
      • file_name array[string]
      • content_type array[string]
  • 429 application/json

    Reached limit for pending file imports. Try again after old imports are finished, or they timeout after an hour due to file conversion failures.

    Hide response attribute Show response attribute object
    • message string

      Default value is You have reached the limit of files that can be processed simultaneously. Please try again in few minutes..

POST /documents/file
curl \
 --request POST 'https://getcody.ai/api/v1/documents/file' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"folder_id":"string","key":"string"}'
Request examples
{
  "folder_id": "string",
  "key": "string"
}
Response examples (422)
{
  "message": "string",
  "errors": {
    "folder_id": [
      "string"
    ],
    "key": [
      "string"
    ],
    "file_size": [
      "string"
    ],
    "file_name": [
      "string"
    ],
    "content_type": [
      "string"
    ]
  }
}
Response examples (429)
{
  "message": "You have reached the limit of files that can be processed simultaneously. Please try again in few minutes."
}