cURL
curl --request POST \ --url https://api.raydocs.com/workspaces/{workspaceId}/documents:importUrl \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "url": "<string>", "filename": "<string>" } '
{ "document": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "workspace_id": 123, "filename": "<string>", "mime": "<string>", "size": 123, "sha256": "<string>", "status": "uploaded", "source_type": "upload", "source_url": "<string>", "parsings": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "config_hash": "<string>", "status": "queued", "parser_version": "<string>", "updated_at": "2023-11-07T05:31:56Z" } ], "created_at": "2023-11-07T05:31:56Z" }, "dedup": { "reused": true, "matched_by": "<string>" }, "document_ref": { "kind": "documentRef", "documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "workspaceId": 123, "filename": "<string>", "mime": "<string>", "size": 123, "sha256": "<string>", "source": { "type": "upload", "url": "<string>" }, "createdAt": "2023-11-07T05:31:56Z" } }
Import a document by URL with workspace-level content deduplication.
documents-write
POST /workspaces/12/documents:importUrl HTTP/1.1 Host: api.raydocs.com Authorization: Bearer <token> Content-Type: application/json { "url": "https://example.com/invoice.pdf", "filename": "invoice.pdf" }
201 Created
200 OK
sha256
Personal Access Token created from the Raydocs dashboard. Include in the Authorization header: Bearer <your_token> See API Keys for token creation and management.
Bearer <your_token>
Reused existing document by content hash
Show child attributes