EmberlyEmberly Docs

Admin API

The endpoints behind the admin panel, and the system key for automating admin tasks.

These endpoints power Admin in the dashboard. They need an admin or superadmin account, and change between releases more often than the rest of the API. Use the admin panel where you can.

System Key

For scripts that manage the whole instance, create a system key in Admin → Settings → Integrations → System API Key. It starts with esk_ and acts as a superadmin:

curl https://files.example.com/api/admin/reports \
  -H "Authorization: Bearer esk_..."

Only superadmins can create one. Treat it like the database password: anyone with it controls the instance.

Who Can Use What

RoleAccess
AdminUsers, reports, content moderation, audit logs. Can view settings.
SuperadminEverything, including settings, integrations, storage, email and the system key.

Endpoints

Users

MethodEndpointDescription
GET POST PUT/api/usersList users, create a user, change a user's role
GET/api/users/searchFind users by name or email
DELETE/api/users/{id}Delete a user and their files
GET/api/users/{id}/filesA user's files
PATCH DELETE/api/users/{id}/files/{fileId}Change or delete one of a user's files
GET/api/users/{id}/urlsA user's short links
DELETE/api/users/{id}/sessionsSign a user out everywhere
DELETE/api/users/{id}/avatarRemove a user's avatar
PUT DELETE/api/users/{id}/bannerChange or remove a user's banner
GET POST DELETE/api/admin/users/{id}/banBan status, ban, unban
POST DELETE/api/admin/users/{id}/verifyMark a user's email verified or unverified
PUT/api/admin/users/{id}/storageChange a user's storage quota
GET POST DELETE/api/admin/users/{id}/grantsExtra storage or domains given to a user

Moderation

MethodEndpointDescription
GET/api/admin/reportsOpen reports
PATCH/api/admin/reports/{id}Resolve or dismiss a report
POST/api/admin/content/flagFlag or unflag a file or short link
GET/api/admin/audit/logsAudit log

Instance

MethodEndpointDescription
GET/api/admin/systemRuntime, database, disk, email, Discord and license details for the health panel. Never includes keys or tokens
GET PATCH POST/api/settingsRead and change settings (superadmin)
GET PUT DELETE/api/admin/licenseLicense status; add or remove the license key
POST/api/admin/storage/testTest the storage settings
POST/api/admin/integrations/testTest an integration's credentials
GET POST DELETE/api/admin/system-keyShow, create or revoke the system key
POST/api/admin/email/sendSend an email to users
GET/api/admin/email/logs, /api/admin/email/statsSent email history

Cloud mode adds endpoints for billing (/api/admin/stripe, /api/admin/products, /api/admin/promo-codes), managed storage buckets (/api/admin/storage/...) and applications (/api/admin/applications).

On this page