# Onboarding API The onboarding API allows you to refer your customers and personal contacts to Brex. Version: 1.0 ## Servers Production ``` https://api.brex.com ``` Staging (Note: This is not a sandbox. It will not work with customer tokens.) ``` https://api-staging.brex.com ``` ## Security ### oAuth2ClientCredentials Refer to [these](https://developer.brex.com/docs/onboarding_examples/) docs on how to use client credentials Type: oauth2 ## Download OpenAPI description [Onboarding API](https://developer.brex.com/_bundle/openapi/onboarding_api.yaml) ## Referrals The onboarding API allows you to submit customer referrals to Brex and receive a customized Brex application URL. You can optionally submit additional information to help prefill their application with data you may have about the customer. You also can get visibility into the application approval status. ### List referrals - [GET /v1/referrals](https://developer.brex.com/openapi/onboarding_api/referrals/listreferrals.md): Returns referrals created. Note: This doesn't include referrals that have expired. ### Creates a referral - [POST /v1/referrals](https://developer.brex.com/openapi/onboarding_api/referrals/createreferralrequest.md): This creates new referrals. The response will contain an identifier and a unique personalized link to an application flow. Many fields are optional and when they're provided they'll prefill the application flow for Brex. You should handle and store these references securely as they contain sensitive information about the referral. ### Gets a referral by ID - [GET /v1/referrals/{id}](https://developer.brex.com/openapi/onboarding_api/referrals/getreferral.md): Returns a referral object by ID if it exists. ### Create a new document upload - [POST /v1/referrals/{id}/document_upload](https://developer.brex.com/openapi/onboarding_api/referrals/createdocument.md): The uri will be a presigned S3 URL allowing you to upload the referral doc securely. This URL can only be used for a PUT operation and expires 30 minutes after its creation. Once your upload is complete, we will use this to prefill the application. Refer to these docs on how to upload to this presigned S3 URL. We highly recommend using one of AWS SDKs if they're available for your language to upload these files.