API documentation
The Cortrix Files API lets you upload, organize and share files programmatically.
Base URL
https://files.cortrix.cc/api/v1
Authentication
Authenticate requests with a bearer token. Create tokens in your account settings and scope them to the minimum permissions required.
curl https://files.cortrix.cc/api/v1/files \
-H "Authorization: Bearer $CORTRIX_TOKEN"
Upload a file
curl -X POST https://files.cortrix.cc/api/v1/files \
-H "Authorization: Bearer $CORTRIX_TOKEN" \
-F "file=@report.pdf" \
-F "folder=reports"
Create a share link
curl -X POST https://files.cortrix.cc/api/v1/files/{id}/links \
-H "Authorization: Bearer $CORTRIX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expires_in": 86400, "max_downloads": 5}'
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /files | List files |
| POST | /files | Upload a file |
| GET | /files/{id} | Get file metadata |
| DELETE | /files/{id} | Delete a file |
| POST | /files/{id}/links | Create a share link |
| DELETE | /links/{id} | Revoke a share link |
Errors
Errors return a JSON body with an error field and a standard HTTP status code.
{"error": "invalid_credentials"}
Rate limits
Requests are limited per token. When you exceed the limit the API responds with 429 and a Retry-After header.