---
title: "Get subject"
method: GET
path: "/api/v1/subjects/{subjectIdOrKey}"
tags: ["Subjects"]
deprecated: true
---

# Get subject

`GET /api/v1/subjects/{subjectIdOrKey}`

> **Deprecated.**

Get subject by ID or key.

⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.

## Path parameters

- `subjectIdOrKey` string, required

## Response `200`

The request has succeeded.

- Subject — A subject is a unique identifier for a usage attribution by its key. Subjects only exist in the concept of metering. Subjects are optional to create and work as an enrichment for the subject key like displayName, metadata, etc. Subjects are useful when you are reporting usage events with your own database ID but want to enrich the subject with a human-readable name or metadata. For most use cases, a subject is equivalent to a customer. ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
  - `createdAt` string, date-time, required — Timestamp of when the resource was created.
  - `updatedAt` string, date-time, required — Timestamp of when the resource was last updated.
  - `deletedAt` string, date-time — Timestamp of when the resource was permanently deleted.
  - `id` string, required — A unique identifier for the subject.
  - `key` string, required — A unique, human-readable identifier for the subject. This is typically a database ID or a customer key.
  - `displayName` string, nullable — A human-readable display name for the subject.
  - `metadata` object, nullable — Metadata for the subject.
  - `currentPeriodStart` string, date-time — The start of the current period for the subject.
  - `currentPeriodEnd` string, date-time — The end of the current period for the subject.
  - `stripeCustomerId` string, nullable — The Stripe customer ID for the subject.

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- `401` — The request has not been applied because it lacks valid authentication credentials for the target resource.
- `403` — The server understood the request but refuses to authorize it.
- `404` — The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
- `412` — One or more conditions given in the request header fields evaluated to false when tested on the server.
- `500` — The server encountered an unexpected condition that prevented it from fulfilling the request.
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/openmeterio/apis/openmeter-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-api/revisions/1cd97f063f4a/schema)
