# 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.

## Process a delayed EIN document after upload

 - [POST /v1/referrals/{id}/process_ein_document](https://developer.brex.com/openapi/onboarding_api/referrals/processdelayedeindocument.md): Processes a delayed EIN document after it has been uploaded.

This endpoint should be called after successfully uploading an IRS EIN Confirmation document (CP-575, CP-575 fax sheet, or 147C) using the
standard document upload flow (/v1/referrals/{id}/document_upload with type: IRS_EIN_CONFIRMATION).

The document_id should be the id returned from the document upload request.

