Skip to content

API reference

This section is the reference for the API contract. For step-by-step examples, see the Guides and Authentication.

Conventions

ItemValue
Base URLhttps://{host}/directlink/v2
Credential on protected routesAuthorization: Bearer <access_token> or __Host-dirl_session cookie (the header takes precedence)
Request bodyapplication/x-www-form-urlencoded, multipart/form-data, or application/octet-stream
Response bodyapplication/json; binary content for downloads; XML for SAML metadata

Access types

AccessMeaning
PublicDoes not require a credential.
HTTP BasicUser and password in the Authorization: Basic header.
SessionBearer token or session cookie.
Secure linkSigned URL issued by the API; the link parameters authorize the operation.
ProviderCall made by the identity provider during the SSO flow.

Endpoint catalog

MethodPathAccessDescription
GET/healthcheckPublicChecks availability.
GET, POST/auth/loginHTTP BasicStarts the local session; can require MFA.
GET, POST/auth/mfaSecure linkValidates the second factor.
GET, POST/auth/mfa/registerSecure linkConfirms the TOTP authenticator registration.
POST/auth/tokenPublic (OAuth form)Issues a token through password grant or token exchange.
POST/oauth2/tokenPublic (OAuth form)Equivalent to /auth/token.
GET/auth/firstaccessPublicStarts the first access.
GET/auth/forgetPublicStarts password recovery.
POST/auth/changeSecure linkCompletes the first access or the password change.
GET, POST/auth/logoutSessionEnds the session.
GET/sso/loginPublicStarts the federated login.
GET/sso/logoutSessionStarts the federated logout.
GET, POST/sso/oauth2/cbProviderOAuth 2.0 and 2.1/OpenID Connect callback.
GET, POST/sso/oauth2/logout/cbProviderOAuth 2.0 logout callback.
POST/sso/saml2/acsProviderReceives the SAML 2.0 assertion.
GET, POST/sso/saml2/sloProviderReceives the SAML 2.0 logout message.
GET/sso/saml2/metadataPublicSAML 2.0 metadata of the provider.
GET/sso/saml2/metadata/{provider}PublicSAML 2.0 metadata of the provider.
POST/uploadSessionSends a file.
GET/download/listSessionLists the available files.
GET/download/list/backupSessionLists the files in the backup area.
GET/download/fileSecure link and tokenDownloads a listed file.
GET/download/file/backupSecure link and tokenDownloads a file from the backup area.
GET/downloadSecure linkDelivers a shared file.
GET/download/pinSecure linkSends the PIN and returns the download link.
GET/reportSessionQueries the transfer records.

Note

When Cloudflare Turnstile is enabled in the environment, /auth/login, /auth/firstaccess and /auth/forget require the CF-Turnstile-Response header. See Cloudflare Turnstile.

In this section