Skip to main content

Environments

Pylon provides two separate environments, each requiring its own set of credentials:
Contact Pylon to obtain your client_id and client_secret for each environment. Never use sandbox credentials in production or vice versa.

Obtaining an access token

Exchange your client credentials for an access token by making a POST request to the auth endpoint:
Replace audience with https://sandbox.pylon.mortgage when authenticating against the sandbox environment.

Response

A successful authentication request returns:
Your access token expires after 24 hours. Cache and reuse your token until it expires to minimize authentication overhead.

Using your access token

Include your access token as a Bearer token in the Authorization header for all API requests:

Acting on behalf of a user

A machine credential has no user of its own, so by default every write it makes is attributed to your integration. To attribute an action to a specific person instead, send the x-pylon-on-behalf-of header. This is attribution, not authorization — it records who acted; it never grants access, and your token’s scopes still gate every request.
  • Only machine credentials (a client-credentials token with no signed-in user) may send this header.
  • A borr_… value attributes to that borrower’s delegated contributor, created automatically on first use.
  • Omit the header to attribute the action to your integration.
Today this header sets the uploader on document uploads. See Contributors for how attribution works and where it surfaces.
The request is rejected with 400 if the header is sent more than once, carries anything other than a single cont_… or borr_… id, or is sent by a non-machine credential.

Authentication flow

The OAuth 2.0 Client Credentials flow works as follows:

Error handling