{
  "service": "brex",
  "displayName": "Brex",
  "categories": [
    "Finance"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "User Token",
      "placeholder": "bxt_...",
      "description": "Brex user token sent as an Authorization: Bearer header. Create or revoke tokens in Brex Dashboard developer settings: https://dashboard.brex.com/settings/developer."
    }
  ],
  "homepageUrl": "https://www.brex.com/",
  "actions": [
    {
      "id": "brex.get_budget",
      "service": "brex",
      "name": "get_budget",
      "description": "Retrieve one Brex budget by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The Brex resource identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "Input for retrieving one Brex resource."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "budget": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The Brex resource identifier."
              },
              "accountId": {
                "type": "string",
                "description": "The Brex account this budget belongs to."
              },
              "name": {
                "type": "string",
                "description": "The budget name."
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The budget description."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "parentBudgetId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The parent budget ID."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ownerUserIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "One Brex user ID."
                },
                "description": "User IDs of the budget owners."
              },
              "periodRecurrenceType": {
                "type": "string",
                "description": "The budget recurrence period type."
              },
              "startDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The date when the budget starts counting."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "endDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The date when the budget stops counting."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "amount": {
                "anyOf": [
                  {
                    "type": "integer",
                    "description": "The amount in the smallest denomination of the currency."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The ISO 4217 currency code."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "description": "The Brex budget status."
              },
              "limitType": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Whether the budget amount blocks spend."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "additionalProperties": true,
                "description": "The raw object returned by Brex."
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "accountId",
              "name",
              "ownerUserIds",
              "periodRecurrenceType",
              "status",
              "raw"
            ],
            "description": "A normalized Brex budget."
          },
          "raw": {
            "type": "object",
            "additionalProperties": true,
            "description": "The raw object returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "budget",
          "raw"
        ],
        "description": "Brex budget output."
      }
    },
    {
      "id": "brex.get_company",
      "service": "brex",
      "name": "get_company",
      "description": "Retrieve the Brex company associated with the connected user token.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input is required for this Brex action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "company": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The Brex resource identifier."
              },
              "legalName": {
                "type": "string",
                "description": "The legal name of the company."
              },
              "accountType": {
                "type": "string",
                "description": "The Brex company account type."
              },
              "raw": {
                "type": "object",
                "additionalProperties": true,
                "description": "The raw object returned by Brex."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Brex company."
          },
          "raw": {
            "type": "object",
            "additionalProperties": true,
            "description": "The raw object returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "company",
          "raw"
        ],
        "description": "Brex company output."
      }
    },
    {
      "id": "brex.get_current_user",
      "service": "brex",
      "name": "get_current_user",
      "description": "Retrieve the Brex user associated with the connected user token.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input is required for this Brex action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The Brex resource identifier."
              },
              "firstName": {
                "type": "string",
                "description": "The user's first name."
              },
              "lastName": {
                "type": "string",
                "description": "The user's last name."
              },
              "email": {
                "type": "string",
                "description": "The user's email address.",
                "format": "email"
              },
              "status": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex user status."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "managerId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex user ID of this user's manager."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "departmentId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex department ID assigned to the user."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "locationId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex location ID assigned to the user."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "titleId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex title ID assigned to the user."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "remoteDisplayId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Identifier displayed by the IDP or HR system."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "additionalProperties": true,
                "description": "The raw object returned by Brex."
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "firstName",
              "lastName",
              "email",
              "raw"
            ],
            "description": "A normalized Brex user."
          },
          "raw": {
            "type": "object",
            "additionalProperties": true,
            "description": "The raw object returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "user",
          "raw"
        ],
        "description": "Brex current user output."
      }
    },
    {
      "id": "brex.get_expense",
      "service": "brex",
      "name": "get_expense",
      "description": "Retrieve one Brex expense by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The Brex resource identifier."
          },
          "expand": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex expandable field name."
            },
            "description": "Brex expandable fields to include in the response.",
            "minItems": 1,
            "maxItems": 20
          },
          "loadCustomFields": {
            "type": "boolean",
            "description": "Whether Brex should load custom fields for the expense."
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "Input for retrieving one Brex expense."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "expense": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The Brex resource identifier."
              },
              "memo": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The expense memo."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The expense status."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "paymentStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The expense payment status."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "category": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex expense category."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "userId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex user ID associated with the expense."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "budgetId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Brex budget ID associated with the expense."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "merchantDescriptor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The merchant descriptor returned by Brex."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "purchasedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The time the purchase was made."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updatedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The last time the expense was updated."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "billingAmount": {
                "anyOf": [
                  {
                    "type": "integer",
                    "description": "The amount in the smallest denomination of the currency."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "billingCurrency": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The ISO 4217 currency code."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "originalAmount": {
                "anyOf": [
                  {
                    "type": "integer",
                    "description": "The amount in the smallest denomination of the currency."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "originalCurrency": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The ISO 4217 currency code."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "purchasedAmount": {
                "anyOf": [
                  {
                    "type": "integer",
                    "description": "The amount in the smallest denomination of the currency."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "purchasedCurrency": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The ISO 4217 currency code."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "additionalProperties": true,
                "description": "The raw object returned by Brex."
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "raw"
            ],
            "description": "A normalized Brex expense."
          },
          "raw": {
            "type": "object",
            "additionalProperties": true,
            "description": "The raw object returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "expense",
          "raw"
        ],
        "description": "Brex expense output."
      }
    },
    {
      "id": "brex.list_budgets",
      "service": "brex",
      "name": "list_budgets",
      "description": "List Brex budgets with cursor pagination.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "The Brex cursor returned from a previous list response."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Maximum number of records to return."
          }
        },
        "additionalProperties": false,
        "description": "Input for a Brex paginated list request."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Brex resource identifier."
                },
                "accountId": {
                  "type": "string",
                  "description": "The Brex account this budget belongs to."
                },
                "name": {
                  "type": "string",
                  "description": "The budget name."
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The budget description."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "parentBudgetId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The parent budget ID."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ownerUserIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "description": "One Brex user ID."
                  },
                  "description": "User IDs of the budget owners."
                },
                "periodRecurrenceType": {
                  "type": "string",
                  "description": "The budget recurrence period type."
                },
                "startDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The date when the budget starts counting."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "endDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The date when the budget stops counting."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "amount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "description": "The Brex budget status."
                },
                "limitType": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Whether the budget amount blocks spend."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "accountId",
                "name",
                "ownerUserIds",
                "periodRecurrenceType",
                "status",
                "raw"
              ],
              "description": "A normalized Brex budget."
            },
            "description": "Brex budgets returned for the requested page."
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor for the next page of budgets."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page returned by Brex."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                },
                "description": "The raw items returned by Brex."
              }
            },
            "additionalProperties": true,
            "description": "The raw paginated response returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "items",
          "nextCursor",
          "raw"
        ],
        "description": "Brex budget list output."
      }
    },
    {
      "id": "brex.list_card_accounts",
      "service": "brex",
      "name": "list_card_accounts",
      "description": "List Brex card accounts for the connected company.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input is required for this Brex action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Brex resource identifier."
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The card account status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currentBalanceAmount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currentBalanceCurrency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "availableBalanceAmount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "availableBalanceCurrency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "accountLimitAmount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "accountLimitCurrency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "statementStartDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The current statement period start date."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "statementEndDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The current statement period end date."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "raw"
              ],
              "description": "A normalized Brex card account."
            },
            "description": "Brex card accounts returned by the API."
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor for the next page if Brex returns one."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "additionalProperties": true,
            "description": "The raw object returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "items",
          "nextCursor",
          "raw"
        ],
        "description": "Brex card account list output."
      }
    },
    {
      "id": "brex.list_expenses",
      "service": "brex",
      "name": "list_expenses",
      "description": "List Brex expenses with documented filters and cursor pagination.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "The Brex cursor returned from a previous list response."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Maximum number of expenses to return."
          },
          "expand": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex expandable field name."
            },
            "description": "Brex expandable fields to include in the response.",
            "minItems": 1,
            "maxItems": 20
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex resource identifier."
            },
            "description": "Brex user IDs to filter expenses by.",
            "minItems": 1,
            "maxItems": 100
          },
          "parentExpenseIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex resource identifier."
            },
            "description": "Parent expense IDs to filter itemized expenses by.",
            "minItems": 1,
            "maxItems": 100
          },
          "budgetIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex resource identifier."
            },
            "description": "Brex budget IDs to filter expenses by.",
            "minItems": 1,
            "maxItems": 100
          },
          "spendingEntityIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex resource identifier."
            },
            "description": "Brex spending entity IDs to filter expenses by.",
            "minItems": 1,
            "maxItems": 100
          },
          "expenseType": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex expense type."
            },
            "description": "Brex expense types to filter by.",
            "minItems": 1,
            "maxItems": 20
          },
          "status": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex status."
            },
            "description": "Brex expense statuses to filter by.",
            "minItems": 1,
            "maxItems": 20
          },
          "paymentStatus": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex payment status."
            },
            "description": "Brex expense payment statuses to filter by.",
            "minItems": 1,
            "maxItems": 20
          },
          "purchasedAtStart": {
            "type": "string",
            "description": "Return expenses purchased on or after this RFC 3339 timestamp.",
            "format": "date-time"
          },
          "purchasedAtEnd": {
            "type": "string",
            "description": "Return expenses purchased on or before this RFC 3339 timestamp.",
            "format": "date-time"
          },
          "updatedAtStart": {
            "type": "string",
            "description": "Return expenses updated on or after this RFC 3339 timestamp.",
            "format": "date-time"
          },
          "updatedAtEnd": {
            "type": "string",
            "description": "Return expenses updated on or before this RFC 3339 timestamp.",
            "format": "date-time"
          },
          "paymentPostedAtStart": {
            "type": "string",
            "description": "Return expenses with payment posted on or after this RFC 3339 timestamp.",
            "format": "date-time"
          },
          "paymentPostedAtEnd": {
            "type": "string",
            "description": "Return expenses with payment posted on or before this RFC 3339 timestamp.",
            "format": "date-time"
          },
          "loadCustomFields": {
            "type": "boolean",
            "description": "Whether Brex should load custom fields for expenses."
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Brex expenses."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Brex resource identifier."
                },
                "memo": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The expense memo."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The expense status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "paymentStatus": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The expense payment status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex expense category."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "userId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex user ID associated with the expense."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "budgetId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex budget ID associated with the expense."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "merchantDescriptor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The merchant descriptor returned by Brex."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "purchasedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The time the purchase was made."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updatedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The last time the expense was updated."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "billingAmount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "billingCurrency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "originalAmount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "originalCurrency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "purchasedAmount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "purchasedCurrency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "raw"
              ],
              "description": "A normalized Brex expense."
            },
            "description": "Brex expenses returned for the requested page."
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor for the next page of expenses."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page returned by Brex."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                },
                "description": "The raw items returned by Brex."
              }
            },
            "additionalProperties": true,
            "description": "The raw paginated response returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "items",
          "nextCursor",
          "raw"
        ],
        "description": "Brex expense list output."
      }
    },
    {
      "id": "brex.list_primary_card_transactions",
      "service": "brex",
      "name": "list_primary_card_transactions",
      "description": "List settled transactions across all Brex card accounts with optional user and date filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "The Brex cursor returned from a previous list response."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Maximum number of records to return."
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex resource identifier."
            },
            "description": "Brex user IDs to filter transactions by.",
            "minItems": 1,
            "maxItems": 100
          },
          "postedAtStart": {
            "type": "string",
            "description": "Return transactions posted on or after this RFC 3339 timestamp.",
            "format": "date-time"
          },
          "expand": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex expandable field name."
            },
            "description": "Brex expandable fields to include in the response.",
            "minItems": 1,
            "maxItems": 20
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Brex primary card transactions."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Brex resource identifier."
                },
                "description": {
                  "type": "string",
                  "description": "The transaction description."
                },
                "amount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The amount in the smallest denomination of the currency."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The ISO 4217 currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "initiatedAtDate": {
                  "type": "string",
                  "description": "The transaction initiated date returned by Brex."
                },
                "postedAtDate": {
                  "type": "string",
                  "description": "The transaction posted date returned by Brex."
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex transaction type."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cardId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex card ID used for the transaction."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expenseId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex expense ID related to the transaction."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "merchantDescriptor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The merchant descriptor returned by Brex."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "description",
                "initiatedAtDate",
                "postedAtDate",
                "raw"
              ],
              "description": "A normalized Brex card transaction."
            },
            "description": "Brex primary card transactions returned for the requested page."
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor for the next page of transactions."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page returned by Brex."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                },
                "description": "The raw items returned by Brex."
              }
            },
            "additionalProperties": true,
            "description": "The raw paginated response returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "items",
          "nextCursor",
          "raw"
        ],
        "description": "Brex primary card transaction list output."
      }
    },
    {
      "id": "brex.list_users",
      "service": "brex",
      "name": "list_users",
      "description": "List Brex users with optional email, remote display ID, and cursor filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "The Brex cursor returned from a previous list response."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Maximum number of records to return."
          },
          "email": {
            "type": "string",
            "description": "Filter users by a single email address.",
            "format": "email"
          },
          "remoteDisplayId": {
            "type": "string",
            "minLength": 1,
            "description": "Filter users by one remote display ID."
          },
          "expand": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One Brex expandable field name."
            },
            "description": "Brex expandable fields to include in the response.",
            "minItems": 1,
            "maxItems": 20
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Brex users."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Brex resource identifier."
                },
                "firstName": {
                  "type": "string",
                  "description": "The user's first name."
                },
                "lastName": {
                  "type": "string",
                  "description": "The user's last name."
                },
                "email": {
                  "type": "string",
                  "description": "The user's email address.",
                  "format": "email"
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex user status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "managerId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex user ID of this user's manager."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "departmentId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex department ID assigned to the user."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "locationId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex location ID assigned to the user."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "titleId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Brex title ID assigned to the user."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "remoteDisplayId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Identifier displayed by the IDP or HR system."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "firstName",
                "lastName",
                "email",
                "raw"
              ],
              "description": "A normalized Brex user."
            },
            "description": "Brex users returned for the requested page."
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "The cursor for the next page of Brex users."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {
              "next_cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page returned by Brex."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "The raw object returned by Brex."
                },
                "description": "The raw items returned by Brex."
              }
            },
            "additionalProperties": true,
            "description": "The raw paginated response returned by Brex."
          }
        },
        "additionalProperties": false,
        "required": [
          "items",
          "nextCursor",
          "raw"
        ],
        "description": "Brex user list output."
      }
    }
  ]
}
