HTTP API
Call your Avenvail instance from scripts and other apps with API tokens, and find every endpoint in the generated API reference.
Everything the dashboard does goes through Avenvail's HTTP API, and you can call the same API from scripts, ShareX and other apps. The API reference lists every endpoint an API token can call, with its parameters, request and response bodies, required scope and errors. It is generated from the code on every build, so it can't drift from what the server does.
Where requests go
There is no central Avenvail API: requests go to your own instance, under /api/v1. With the instance at https://files.example.com, the file list is https://files.example.com/api/v1/files.
Authentication
Create a token under Settings › API tokens and send it in the Authorization header:
curl -H "Authorization: Bearer avn_..." https://files.example.com/api/v1/files
A token only does what its permissions (scopes) allow:
| Scope | In the app | Allows |
|---|---|---|
upload:create | Upload files | Uploading files, in one request or in resumable pieces |
files:read | Read files | Listing, searching and downloading files, folders, tags, fields and shares |
files:write | Change files | Renaming, moving, tagging and deleting files, and changing their fields and attachments |
shares:create | Create share links | Sharing files and revoking shares; uploads also get a public link |
Tokens can't create or revoke other tokens. Each endpoint in the reference shows the scope it needs.
The dashboard also uses internal endpoints for workflows, connections, account security, users and instance settings. They refuse API tokens, need a signed-in browser session, and may change in any release, so they aren't in the reference.
Errors
Every error is a Problem Details response with a stable code, an English detail and, for some errors, args with values such as a size limit:
{
"status": 413,
"detail": "The file exceeds this server's 100 MB upload limit.",
"code": "upload_too_large",
"args": { "maxBytes": 104857600 }
}
Match on code, not on detail, which may change wording. Common codes are listed under Limits and errors.
Paging
Long lists, such as files, trash and shares, return a page of items and a nextCursor. Pass it back as cursor to get the next page; it is null on the last one. Keep the other parameters the same between pages.
The OpenAPI description
The reference is built from an OpenAPI 3.1 description that you can use to generate a client in most languages:
- For your version: your instance serves its own description at
/api/openapi.json, for examplehttps://files.example.com/api/openapi.json. Use this one to generate a client, because it matches the version you run. - Latest: docs.avenvail.dev/openapi.json follows the newest code, which may be ahead of the release you run.
Endpoints marked Experimental may change or disappear in any release. Don't build on them yet.