SPB Git

Repository Public

retrieve.md 3.0 KB 151 lines markdown

1---2title: Get Spend Limit3url: https://platform.claude.com/docs/en/api/beta/organization/spend_limits/retrieve4---56# Get Spend Limit78**GET** `/v1/organizations/spend_limits/{spend_limit_id}`910Retrieve a spend limit by ID.1112## Path parameters1314- `spend_limit_id: string`1516  ID of the Spend Limit.1718## Returns1920- `BetaSpendLimit object`2122  A configured spend limit: a cap on metered spend for one scope and period.2324  - `type: "spend_limit"`2526    Object type. Always `spend_limit`.2728    default: spend_limit2930  - `id: string`3132    Unique tagged ID of the spend limit (`spl_...`).3334  - `amount: string or null`3536    Limit amount as a non-negative integer decimal string in the minor unit of `currency` (cents for USD): "50000" is $500.00. `null` means no numeric cap is configured at this scope — see the effective report for whether a limit applies.3738  - `created_at: string`3940    RFC 3339 datetime at which the spend limit was created.4142    format: date-time4344  - `currency: string`4546    ISO 4217 code of the organization's billing currency; the unit for `amount`.4748  - `period: "daily" or "monthly" or "weekly"`4950    Length of the window the limit resets over. `amount` caps spend within each period.5152    - `"daily"`5354    - `"monthly"`5556    - `"weekly"`5758  - `scope: User or SeatTier or RBACGroup or 3 more`5960    What the limit applies to. A tagged union on `type`; each variant carries the identifier for its scope.6162    - `User object`6364      Scope selecting a single member of the organization.6566      - `type: "user"`6768        Scope type. Always `user` for this scope.6970        default: user7172      - `user_id: string`7374        Tagged ID of the member the spend limit applies to.7576    - `SeatTier object`7778      - `type: "seat_tier"`7980        default: seat_tier8182      - `seat_tier: string`8384    - `RBACGroup object`8586      - `type: "rbac_group"`8788        default: rbac_group8990      - `rbac_group_id: string`9192    - `OrganizationService object`9394      - `type: "organization_service"`9596        default: organization_service9798      - `service: string`99100    - `Organization object`101102      - `type: "organization"`103104        default: organization105106    - `Workspace object`107108      Scope selecting one workspace of a Claude Console organization.109110      - `type: "workspace"`111112        Scope type. Always `workspace` for this scope.113114        default: workspace115116      - `workspace_id: string`117118        Tagged ID of the workspace the spend limit applies to.119120  - `updated_at: string`121122    RFC 3339 datetime at which the spend limit was last modified.123124    format: date-time125126## Example127128```bash129curl https://api.anthropic.com/v1/organizations/spend_limits/$SPEND_LIMIT_ID \130    -H 'anthropic-version: 2023-06-01' \131    -H "X-Api-Key: $ANTHROPIC_API_KEY"132```133134### Response (200)135136```json137{138  "id": "id",139  "amount": "50000",140  "created_at": "2019-12-27T18:11:19.117Z",141  "currency": "USD",142  "period": "monthly",143  "scope": {144    "type": "user",145    "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"146  },147  "type": "spend_limit",148  "updated_at": "2019-12-27T18:11:19.117Z"149}150```151
Files main
Menu

Theme