Onboarding API (0.1)

Download OpenAPI specification:Download

The onboarding API allows you to refer your customers and personal contacts to Brex.

Authentication

oAuth2ClientCredentials

Refer to these docs on how to use client credentials

Security Scheme Type OAuth2
clientCredentials OAuth Flow
Token URL: https://accounts.brex.com/oauth2/v1/token
Scopes:
  • openid -

    openid

  • offline_access -

    offline access

  • https://onboarding.brexapis.com/referrals -

    View and manage referral data.

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

Returns referrals created. Note: This doesn't include referrals that have expired.

Request
query Parameters
cursor
string or null
Responses
200

listReferrals 200 response

400

Invalid cursor

401

Unauthorized

get/v1/referrals
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v1/referrals \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Creates a referral

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.

Request
Request Body schema: application/json
referral_code
required
string

Referral code that attributes credit to you if the prospect signs up for a Brex account.

required
object (Applicant)

Required information about the referred prospect.

object or null

Information about the business the application is for.

You can optionally set the alternate_address, if the business has an additional address which is different from the registration address. For instance, for international companies where their operational address may be different than where the company was incorporated.

contact_preference
string or null

When set to EMAIL_OUTBOUND, Brex will email the referred prospective customer directly to prompt them to create their account rather than rely on you to direct them to claim the account. If not provided, you are responsible for contacting the prospect and the value defaults to NO_OUTBOUND.

Enum: "NO_OUTBOUND" "EMAIL_OUTBOUND"
Responses
200

createReferralRequest 200 response

401

Unauthorized

post/v1/referrals
Request samples
application/json
{
  • "referral_code": "string",
  • "applicant": {
    },
  • "business": {
    },
  • "contact_preference": "NO_OUTBOUND"
}
Response samples
application/json
{
  • "id": "string",
  • "referral_signup_url": "string",
  • "expires_at": "2019-08-24T14:15:22Z",
  • "status": "UNCLAIMED",
  • "products": [
    ]
}

Gets a referral by ID

Returns a referral object by ID if it exists.

Request
path Parameters
id
required
string
Responses
200

getReferral 200 response

401

Unauthorized

404

Referral not found

get/v1/referrals/{id}
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v1/referrals/:id \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "id": "string",
  • "referral_signup_url": "string",
  • "expires_at": "2019-08-24T14:15:22Z",
  • "status": "UNCLAIMED",
  • "products": [
    ]
}

Create a new document upload

The url 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.

Request
path Parameters
id
required
string
Request Body schema: application/json
type
required
string (DocumentType)

Type of document being submitted. Allowable types:

  • ARTICLES_OF_INCORPORATION
  • IRS_EIN_CONFIRMATION (IRS CP 575 or 147C form)
  • IRS_EIN_APPLICATION (IRS SS4 form)
  • CERTIFICATE_GOOD_STANDING
Enum: "ARTICLES_OF_INCORPORATION" "IRS_EIN_CONFIRMATION" "IRS_EIN_APPLICATION" "CERTIFICATE_GOOD_STANDING"
Responses
200

createDocument 200 response

401

Unauthorized

404

Referral not found

post/v1/referrals/{id}/document_upload
Request samples
application/json
{
  • "type": "ARTICLES_OF_INCORPORATION"
}
Response samples
application/json
{
  • "uri": "string",
  • "id": "string"
}
Copyright © Brex 2019–2021. All rights reserved.