Create Document from 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.
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"
]
}
}