API referenceFiles
Get a download link
Preview· P9
GET
/files/{file_id}/downloadReturns links to a ready file and its thumbnail that work for two minutes. Fetch a new link each time you
show the file rather than storing one.
- Opening an ID image or a selfie is recorded in the audit trail (
file.opened). - A file that isn't ready yet, or was deleted, returns
invalid_state.
Scope: files:read · Plan: Pro and Enterprise in live mode; every plan in test mode.
AuthorizationBearer <token>
Send Authorization: Bearer <token> on every request. The token is one of:
| Prefix | What it is | Where it may be used |
|---|---|---|
agoo_sk_live_ | Secret key, live mode | Your servers only |
agoo_sk_test_ | Secret key, test mode | Your servers only |
agoo_pk_live_ | Publishable key, live mode | Browsers and apps: create pre-registrations and bookings, read public booking types (with their intake questions) and their free slots, read the visit types open for pre-registration with their public forms. Never lists people. |
agoo_pk_test_ | Publishable key, test mode | As above, in test mode |
Admins create keys in Console → Developers → API keys and choose each key's scopes. A key is shown once. Never put a secret key in a URL, a browser or a mobile app.
In: header
Scope: files:read
Path Parameters
file_id*string
The file's ID.
Match
^file_[0-7][0-9a-hjkmnp-tv-z]{25}$Example
"file_01m4z8vge0fkktt139dhkf42gw"Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/files/file_01m4z8vge0fkktt139dhkf42gw/download"{ "url": "https://files.example.com/f/7Kq2Xp4Lm9Rt?expires=1791230400&signature=8b2e7d", "thumbnail_url": "https://files.example.com/f/7Kq2Xp4Lm9Rt/thumbnail?expires=1791230400&signature=3f9c1a", "expires_at": "2026-10-15T08:02:00Z"}