---
title: "Get a gateway policy"
method: GET
path: "/api/v1/platform/gateway-policies/{id}"
tags: ["gateway-policies"]
---

# Get a gateway policy

`GET /api/v1/platform/gateway-policies/{id}`

## Request

- Base URL: `https://api.smith.langchain.com`
- URL: `https://api.smith.langchain.com/api/v1/platform/gateway-policies/{id}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Returns a single gateway policy by id. Cross-org access is
rejected with 404

**Spend tracking:** spend-cap policies include
`current_spend_usd` for the active window so callers can
read per-policy cost without hitting a separate endpoint.
Guard policies leave it null.

## Path parameters

- `id` string, uuid, required

## Response `200`

OK

- GatewayPoliciesGatewayPolicyRecord
  - `action` string
  - `config` object
  - `created_at` string
  - `created_by` string
  - `current_spend` GatewayPoliciesSpendUsage[]: CurrentSpend is the list of spends recorded for each of the tracked spend limit windows, used in v2 of spend_cap policy type.
    - `spend_usd` number: SpendUSD is the spend recorded in this window.
    - `window` string: Window is the spend limit period.
  - `current_spend_usd` number: CurrentSpendUSD is the spend in the policy's current window. Set for any spend_cap policy regardless of enabled state — disabled policies still surface usage so users can see what would have been counted. Nil for non-spend_cap policies or when the spend lookup failed.
  - `current_usage` GatewayPoliciesRateLimitUsage[]: CurrentUsage is the consumed units in each configured limit's current window. Set for any rate_limit policy regardless of enabled state, one entry per limit in the config. Nil for non-rate_limit policies or when the usage lookup failed.
    - `metric` 'requests' | 'tokens'
    - `value` integer: Value is the units consumed so far in the current window.
    - `window` 'minute' | 'hour'
  - `description` string
  - `enabled` boolean
  - `id` string
  - `is_system_generated` boolean
  - `name` string
  - `organization_id` string
  - `parent_policy_id` string: ParentPolicyID is set on materialized children of a default_spend_cap to the default's id. An explicit Update or a Create with the same matchers clears the link and takes ownership of the materialized row. Delete on the parent cascade-soft-deletes children still attached.
  - `policy_type` string
  - `priority` integer
  - `subject_matchers` GatewayPoliciesSubjectMatcher[]
    - `key` string
    - `value` string
  - `updated_at` string

## Other responses

- `400`: validation error
- `401`: Unauthorized
- `403`: LLM Gateway not enabled, or caller lacks OrganizationRead
- `404`: policy not found
- `500`: Internal Server Error

## Changes

- **2026-10-16** `1a8ee9358d81`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/api/v1/platform/gateway-policies/:id/get.md)

---

[API](https://skmtc.dev/langchain-ai/apis/langsmith.md) - [All operations](https://skmtc.dev/langchain-ai/apis/langsmith/llms.txt) - [OpenAPI document](https://skmtc.dev/langchain-ai/apis/langsmith/revisions/7a01c01f75e8?raw)
