Create a business client vaulting token

post/businesses/{fp_bid}/client_token
External ID
Creates a short-lived token that is safe to pass to your client for vaulting or decrypting this business's data. The client-side vaulting guide shows how to use it.

Request

Path parameters

fp_bid·

string

Body

decrypt_reason·

optional string

If the token is allowed to decrypt, provide a default decryption reason
fields·

optional array of strings

List of data identifiers to which this token will have access. For example, business.name, business.tin, custom.account_id.

Allowed values:

business.namebusiness.dbabusiness.websitebusiness.phone_numberbusiness.tinbusiness.address_line1business.address_line2business.citybusiness.statebusiness.zipbusiness.countrybusiness.corporation_typebusiness.formation_statebusiness.formation_date
custom.*
scope·

string

Specify the permissions of this token.

  • vault allows writing to the specified fields.
  • decrypt allows decrypting the specified fields.
  • vault_and_decrypt allows both.
  • decrypt_download allows decrypting a single piece of data as a file.

Allowed values:

vault
decrypt
vault_and_decrypt
decrypt_download
vault_card
ttl·

optional integer

Time to live until this token expires, provided in seconds. Defaults to 30 minutes. Must be at least 60 seconds, at most 1 day

Response

expires_at·

string

The time at which the token expires
fields·

optional array of strings

The fields that this token has permissions to operate on, according to the requested scope.

Allowed values:

business.namebusiness.dbabusiness.websitebusiness.phone_numberbusiness.tinbusiness.address_line1business.address_line2business.citybusiness.statebusiness.zipbusiness.countrybusiness.corporation_typebusiness.formation_statebusiness.formation_date
custom.*
token·

string

The short-lived token that gives temporary access to perform operations for this business
POST /businesses/{fp_bid}/client_token
1curl -X POST https://api.onefootprint.com/businesses/{fp_bid}/client_token \
2  -u sk_test_xxxxx: \
3  -d '{
4    "decrypt_reason": "Lorem ipsum dolor",
5    "fields": [
6      "business.name",
7      "business.dba"
8    ],
9    "scope": "vault",
10    "ttl": 300
11  }'
Response example
{
  "expires_at": "2022-01-04T12:00-07:00",
  "fields": [
    "business.name",
    "business.tin"
  ],
  "token": "cttok_UxM6Vbvk2Rcy1gzcSuXgk3sj3L9I0pAnNH"
}