Interact with Passportal's public API
Authorize Passportal's API
Every request to the Passportal API must carry an access token in the x-access-token header, and there are two ways to obtain one.
Integrations and scripts should authenticate as a service account: send your organization key, API key, API secret and requested scope to /api/v2/auth/service_account_token, and an access token and refresh token are returned in a single call.
To authenticate as a person, send the user's email, password, organization key and scope to /api/v2/auth/user_token. If that user does not have MFA enabled, the tokens are returned straight away; if they do, the response contains an mfa_key and mfa_type instead, and you finish signing in by sending that mfa_key together with the user's current MFA code to /api/v2/auth/mfa.
Access tokens expire, so keep the refresh token issued alongside each one and use it to obtain a new access token instead of sending credentials again.
How to use Passportal's API
Once you've authenticated — either as a service account via /api/v2/auth/service_account_token, or as a user via /api/v2/auth/user_token (followed by /api/v2/auth/mfa if MFA is enabled) — you'll have an access token, a refresh token, and an expiry time. The access token is what identifies you on every request you make from that point on.
Send your token with every request.
Pass the access token in the x-access-token header. Passportal does not use Authorization: Bearer, so a standard bearer-token helper in your HTTP client won't work here — set the header explicitly.
curl https://us-clover.passportalmsp.com/api/v2/documents/clients
-H "x-access-token: YOUR_ACCESS_TOKEN"
For requests that send a body, add content-type: application/json as well.
curl -X POST https://us-clover.passportalmsp.com/api/v2/folders
-H "x-access-token: YOUR_ACCESS_TOKEN"
-H "content-type: application/json"
-d '{"name": "Network Devices"}'
Use the right base URL for your data centre.
Your token is only valid in the region where your organization lives. Use the matching base URL:
- Data centre - Base URL
- United States - https://us-clover.passportalmsp.com
- Canada - https://ca-clover.passportalmsp.com
- United Kingdom - https://uk-clover.passportalmsp.com
- Germany - https://de-clover.passportalmsp.com
- Australia - https://au-clover.passportalmsp.com
Updated 27 days ago