The team API lets you manage users, departments, locations, and cards.
Team API (1.0)
- Productionhttps://api.brex.com/v2/cards
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
https://api.brex.com/v2/cards \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'listCardsByUserId 200 response
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Address line 2 (e.g., apartment, suite, unit, or building).
For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Card expiration year and month. Cards expire on the last day of the expiration month.
The expiration date is in UTC for cards starting with 555671, 428803 and 485932. And the expiration date is in PST for cards starting with 511572.
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions
at online vendors where this card was previously used before the transfer.
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
{ "next_cursor": "string", "items": [ { … } ] }
Request
Creates a new card. The spend_controls field is required when limit_type = CARD. The mailing_address field is required for physical cards and is the shipping address used to send the card; it is not the same as the billing and mailing address used for online purchases. The first 2 lines of this address must be under 60 characters long. Each user can only have up to 10 active physical cards. For Empower accounts, this endpoint requires budget management. If your account does not have access to budget management features, a 403 response status will be returned. If this is the case and you want to gain access to this endpoint, please contact Brex support.
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
When limit_type = CARD, spend_controls must be set. When limit type = USER, spend_controls must be null.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
- Productionhttps://api.brex.com/v2/cards
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X POST \
https://api.brex.com/v2/cards \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: string' \
-d '{
"owner": {
"type": "USER",
"user_id": "string"
},
"card_name": "string",
"card_type": "VIRTUAL",
"limit_type": "CARD",
"spend_controls": {
"spend_limit": {
"amount": 700,
"currency": "USD"
},
"spend_duration": "MONTHLY",
"reason": "string",
"lock_after_date": "2019-08-24",
"parent_budget_id": "string",
"policy_id": "string",
"allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]",
"blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]"
},
"mailing_address": {
"line1": "string",
"line2": "string",
"city": "string",
"state": "string",
"country": "string",
"postal_code": "string",
"phone_number": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"card_attribute_preferences": {
"three_domain_secure_enabled_preference": "THREE_DOMAIN_SECURE_ENABLED"
}
}'createCard 200 response
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Card expiration year and month. Cards expire on the last day of the expiration month.
The expiration date is in UTC for cards starting with 555671, 428803 and 485932. And the expiration date is in PST for cards starting with 511572.
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions
at online vendors where this card was previously used before the transfer.
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
{ "id": "string", "owner": { "type": "USER", "user_id": "string" }, "status": "ACTIVE", "last_four": "string", "card_name": "string", "card_type": "VIRTUAL", "limit_type": "CARD", "spend_controls": { "spend_limit": { … }, "spend_available": { … }, "spend_duration": "MONTHLY", "reason": "string", "lock_after_date": "2019-08-24", "allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]", "blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]" }, "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "mailing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "expiration_date": { "month": 0, "year": 0 }, "has_been_transferred": true, "metadata": { "property1": "string", "property2": "string" }, "budget_id": "string" }
- Productionhttps://api.brex.com/v2/cards/{id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards/{id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
'https://api.brex.com/v2/cards/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'getCardById 200 response
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Card expiration year and month. Cards expire on the last day of the expiration month.
The expiration date is in UTC for cards starting with 555671, 428803 and 485932. And the expiration date is in PST for cards starting with 511572.
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions
at online vendors where this card was previously used before the transfer.
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
{ "id": "string", "owner": { "type": "USER", "user_id": "string" }, "status": "ACTIVE", "last_four": "string", "card_name": "string", "card_type": "VIRTUAL", "limit_type": "CARD", "spend_controls": { "spend_limit": { … }, "spend_available": { … }, "spend_duration": "MONTHLY", "reason": "string", "lock_after_date": "2019-08-24", "allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]", "blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]" }, "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "mailing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "expiration_date": { "month": 0, "year": 0 }, "has_been_transferred": true, "metadata": { "property1": "string", "property2": "string" }, "budget_id": "string" }
- Productionhttps://api.brex.com/v2/cards/{id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards/{id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X PUT \
'https://api.brex.com/v2/cards/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"spend_controls": {
"spend_limit": {
"amount": 700,
"currency": "USD"
},
"spend_duration": "MONTHLY",
"reason": "string",
"lock_after_date": "2019-08-24",
"allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]",
"blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]"
},
"metadata": {
"property1": "string",
"property2": "string"
}
}'updateCard 200 response
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Card expiration year and month. Cards expire on the last day of the expiration month.
The expiration date is in UTC for cards starting with 555671, 428803 and 485932. And the expiration date is in PST for cards starting with 511572.
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions
at online vendors where this card was previously used before the transfer.
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
{ "id": "string", "owner": { "type": "USER", "user_id": "string" }, "status": "ACTIVE", "last_four": "string", "card_name": "string", "card_type": "VIRTUAL", "limit_type": "CARD", "spend_controls": { "spend_limit": { … }, "spend_available": { … }, "spend_duration": "MONTHLY", "reason": "string", "lock_after_date": "2019-08-24", "allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]", "blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]" }, "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "mailing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "expiration_date": { "month": 0, "year": 0 }, "has_been_transferred": true, "metadata": { "property1": "string", "property2": "string" }, "budget_id": "string" }
- Productionhttps://api.brex.com/v2/cards/{id}/lock
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards/{id}/lock
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X POST \
'https://api.brex.com/v2/cards/{id}/lock' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"description": "string",
"reason": "CARD_DAMAGED"
}'lockCard 200 response
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Card expiration year and month. Cards expire on the last day of the expiration month.
The expiration date is in UTC for cards starting with 555671, 428803 and 485932. And the expiration date is in PST for cards starting with 511572.
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions
at online vendors where this card was previously used before the transfer.
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
{ "id": "string", "owner": { "type": "USER", "user_id": "string" }, "status": "ACTIVE", "last_four": "string", "card_name": "string", "card_type": "VIRTUAL", "limit_type": "CARD", "spend_controls": { "spend_limit": { … }, "spend_available": { … }, "spend_duration": "MONTHLY", "reason": "string", "lock_after_date": "2019-08-24", "allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]", "blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]" }, "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "mailing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "expiration_date": { "month": 0, "year": 0 }, "has_been_transferred": true, "metadata": { "property1": "string", "property2": "string" }, "budget_id": "string" }
- Productionhttps://secure-platform.brexapis.com/v2/cards/{id}/pan
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://secure-platform.staging.brexapps.com/v2/cards/{id}/pan
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
'https://secure-platform.brexapis.com/v2/cards/{id}/pan' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "id": "string", "number": "string", "cvv": "string", "expiration_date": { "month": 0, "year": 0 }, "holder_name": "string" }
Request
Creates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email.
This endpoint is currently gated. If you would like to request access, please reach out to developer-support@brex.com
- Productionhttps://api.brex.com/v2/cards/{id}/secure_email
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards/{id}/secure_email
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X POST \
'https://api.brex.com/v2/cards/{id}/secure_email' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: string' \
-d '{
"recipient_email": "string",
"sender_name": "string",
"message": "string",
"expiry_days": 30
}'- Productionhttps://api.brex.com/v2/cards/{id}/terminate
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards/{id}/terminate
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X POST \
'https://api.brex.com/v2/cards/{id}/terminate' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"description": "string",
"reason": "CARD_DAMAGED"
}'terminateCard 200 response
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Card expiration year and month. Cards expire on the last day of the expiration month.
The expiration date is in UTC for cards starting with 555671, 428803 and 485932. And the expiration date is in PST for cards starting with 511572.
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions
at online vendors where this card was previously used before the transfer.
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
{ "id": "string", "owner": { "type": "USER", "user_id": "string" }, "status": "ACTIVE", "last_four": "string", "card_name": "string", "card_type": "VIRTUAL", "limit_type": "CARD", "spend_controls": { "spend_limit": { … }, "spend_available": { … }, "spend_duration": "MONTHLY", "reason": "string", "lock_after_date": "2019-08-24", "allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]", "blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]" }, "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "mailing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "expiration_date": { "month": 0, "year": 0 }, "has_been_transferred": true, "metadata": { "property1": "string", "property2": "string" }, "budget_id": "string" }
- Productionhttps://api.brex.com/v2/cards/{id}/unlock
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v2/cards/{id}/unlock
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X POST \
'https://api.brex.com/v2/cards/{id}/unlock' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'unlockCard 200 response
limit_type = CARD for vendor cards. Vendor cards must have a card_type of VIRTUAL and do not rely on the user specific limit.
For corporate cards, limit_type = USER.
Learn more about different card types here.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.
Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed).
Card expiration year and month. Cards expire on the last day of the expiration month.
The expiration date is in UTC for cards starting with 555671, 428803 and 485932. And the expiration date is in PST for cards starting with 511572.
Indicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions
at online vendors where this card was previously used before the transfer.
Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
{ "id": "string", "owner": { "type": "USER", "user_id": "string" }, "status": "ACTIVE", "last_four": "string", "card_name": "string", "card_type": "VIRTUAL", "limit_type": "CARD", "spend_controls": { "spend_limit": { … }, "spend_available": { … }, "spend_duration": "MONTHLY", "reason": "string", "lock_after_date": "2019-08-24", "allowed_merchant_details": "[{\"name\": \"Github\"}, {\"name\": \"AWS\"}]", "blocked_merchant_details": "[{\"name\": \"Apple\"}, {\"name\": \"Amazon\"}]" }, "billing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "mailing_address": { "line1": "string", "line2": "string", "city": "string", "state": "string", "country": "string", "postal_code": "string", "phone_number": "string" }, "expiration_date": { "month": 0, "year": 0 }, "has_been_transferred": true, "metadata": { "property1": "string", "property2": "string" }, "budget_id": "string" }