{
  "schema": "aaes/capability-pack/1",
  "provider": "brex",
  "version": "1.0.0",
  "description": "Brex spend management: read transactions and users, create payments, issue cards and terminate a card.",
  "notes": "Use a Brex API token with only the scopes these capabilities need; the pack does not create one. Creating a payment moves money, so it carries the pay action at the minimum R3 tier, and pay is one of the designated actions requiring human approval; the registered cost ceiling and a policy budget are the second control. Card issuance is create at R2, the verb's floor — a card can be terminated, but the tier is a lower bound, not a risk assessment; terminating a card is registered as delete at R3 because a terminated card is not un-terminated — a replacement is a new card.\n\nThe current API host is api.brex.com: Brex's older hostnames still answer, but the pack registers the documented host. Brex's payment rail is the transfers API (POST /v1/transfers, which carries its own transfers scope), and card transactions are read from /v2/transactions/card/primary. The Brex API's payments coverage depends on the account's enabled products and markets, and CARD_ID is a placeholder to replace before enabling. AAES has not been certified by Brex; the endpoints here are configuration to review and test; the vendor has not endorsed it.",
  "credential": {
    "secret_ref_id": "secret-ref-brex-api-token",
    "custody": "customer_vault",
    "inject": "header",
    "inject_name": "Authorization",
    "note": "A Brex API token held in the client's own secret manager. The stored material must be the complete Authorization header value (scheme included). The token's scopes are chosen at Brex, and the minimum that makes these capabilities work is the required set: a token that may create payments should not also carry account-administration scopes this pack never names."
  },
  "capabilities": [
    {
      "capability_id": "brex.transactions.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "financial",
      "egress_allowlist": [
        "api.brex.com"
      ],
      "endpoint": "https://api.brex.com/v2/transactions/card/primary",
      "method": "GET",
      "connector": "http",
      "custody": "customer_vault",
      "secret_ref_id": "secret-ref-brex-api-token",
      "inject": "header",
      "inject_name": "Authorization",
      "actions": [
        "read"
      ],
      "resource_id": "brex-account",
      "description": "Read the account's primary card transactions.",
      "requires_review": true
    },
    {
      "capability_id": "brex.users.read",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R0",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "pii",
      "egress_allowlist": [
        "api.brex.com"
      ],
      "endpoint": "https://api.brex.com/v2/users",
      "method": "GET",
      "connector": "http",
      "custody": "customer_vault",
      "secret_ref_id": "secret-ref-brex-api-token",
      "inject": "header",
      "inject_name": "Authorization",
      "actions": [
        "read"
      ],
      "resource_id": "brex-account",
      "description": "Read the account's users: names, emails and roles, which are personal data.",
      "requires_review": true
    },
    {
      "capability_id": "brex.payments.create",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R3",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "financial",
      "egress_allowlist": [
        "api.brex.com"
      ],
      "endpoint": "https://api.brex.com/v1/transfers",
      "method": "POST",
      "connector": "http",
      "custody": "customer_vault",
      "secret_ref_id": "secret-ref-brex-api-token",
      "inject": "header",
      "inject_name": "Authorization",
      "actions": [
        "pay"
      ],
      "resource_id": "brex-account",
      "cost_ceiling_usd": 500,
      "description": "Create a transfer, which is Brex's payment endpoint: money moves, so the action is pay at the minimum R3 tier; pay is one of the designated actions requiring human approval.\n\nThe registered cost ceiling is a budget control on the declared amount: the gateway refuses a declared amount above it and commits the ceiling against the task budget; it does not bound the amount the provider request encodes.\n\nOn supported AAES-mediated execution paths, the declared irreversible actions require an authorized person’s approval. Observation-only and bypass calls cannot be stopped by this control.",
      "requires_review": true
    },
    {
      "capability_id": "brex.cards.create",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R2",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "financial",
      "egress_allowlist": [
        "api.brex.com"
      ],
      "endpoint": "https://api.brex.com/v2/cards",
      "method": "POST",
      "connector": "http",
      "custody": "customer_vault",
      "secret_ref_id": "secret-ref-brex-api-token",
      "inject": "header",
      "inject_name": "Authorization",
      "actions": [
        "create"
      ],
      "resource_id": "brex-account",
      "description": "Issue a card.\n\nIssuance creates spending power rather than moving money, and a card can be terminated, so the action is create at R2, the verb's floor — a lower bound, not a proof that issuance is reversible. Review the spend limits the integration may request: the limit is set at the provider, not in this pack.",
      "requires_review": true
    },
    {
      "capability_id": "brex.cards.terminate",
      "version": "1.0.0",
      "kind": "tool",
      "risk_tier": "R3",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN",
      "data_class": "financial",
      "egress_allowlist": [
        "api.brex.com"
      ],
      "endpoint": "https://api.brex.com/v2/cards/CARD_ID/terminate",
      "method": "POST",
      "connector": "http",
      "custody": "customer_vault",
      "secret_ref_id": "secret-ref-brex-api-token",
      "inject": "header",
      "inject_name": "Authorization",
      "actions": [
        "delete"
      ],
      "resource_id": "brex-account",
      "description": "Terminate a card. A terminated card is not un-terminated — a replacement is a new card — so the action is delete at the minimum R3 tier; delete is one of the designated actions requiring human approval. CARD_ID is a placeholder to replace before enabling.\n\nOn supported AAES-mediated execution paths, the declared irreversible actions require an authorized person’s approval. Observation-only and bypass calls cannot be stopped by this control.",
      "requires_review": true
    }
  ],
  "resources": [
    {
      "resource_id": "brex-account",
      "kind": "api",
      "locator": "https://api.brex.com",
      "data_class": "financial",
      "owner": "REPLACE-WITH-ACCOUNTABLE-HUMAN"
    }
  ],
  "review": {
    "state": "library",
    "date": "2026-09-23",
    "sources": [
      "https://developer.brex.com/openapi/transactions_api (retrieved 2026-09-20)",
      "https://developer.brex.com/guides/quickstart (retrieved 2026-09-20)",
      "https://developer.brex.com/examples/payments_examples (retrieved 2026-09-20)",
      "https://developer.brex.com/changelog (retrieved 2026-09-20)",
      "https://developer.brex.com/openapi/team_api (retrieved 2026-09-23)",
      "https://developer.brex.com/examples/team_examples (retrieved 2026-09-23)",
      "https://developer.brex.com/examples/transactions_examples (retrieved 2026-09-23)",
      "https://developer.brex.com/openapi/team_api/users/listusers (retrieved 2026-09-23)",
      "https://developer.brex.com/openapi/team_api/cards/terminatecard (retrieved 2026-09-23)"
    ],
    "reviewer_id": "aaes-eng"
  }
}
