Create Document from Webpage

POST /documents/webpage

Create a document with a webpage URL.


Webpage must be publicly accessible without a login. If request fails with 400 error code, check if your firewall is blocking requests.

application/json

Body

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
  • 400 application/json

    Webpage was in-accessible.

    Hide response attribute Show response attribute object
  • 422 application/json

    Request validation errors.

    Hide response attributes Show response attributes object
POST /documents/webpage
curl \
 -X POST https://getcody.ai/api/v1/documents/webpage \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"folder_id":"string","url":"https://example.com"}'
Request example
{
  "folder_id": "string",
  "url": "https://example.com"
}
Response examples (200)
{
  "data": {
    "id": "string",
    "name": "string",
    "status": "syncing",
    "content_url": "string",
    "folder_id": "string",
    "created_at": 42
  }
}
Response examples (400)
{
  "message": "string"
}
Response examples (422)
{
  "message": "string",
  "errors": {
    "folder_id": [
      "string"
    ],
    "key": [
      "string"
    ],
    "file_size": [
      "string"
    ],
    "file_name": [
      "string"
    ],
    "content_type": [
      "string"
    ]
  }
}