---
title: "Lookup schema under subject"
method: POST
path: "/subjects/{subject}"
tags: ["Subjects (v1)"]
---

# Lookup schema under subject

`POST /subjects/{subject}`

Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name.

## Path parameters

- `subject` string, required

## Query parameters

- `normalize` boolean
- `format` string
- `deleted` boolean

## Request body

- RegisterSchemaRequest — Schema register request
  - `version` integer — Version number
  - `id` integer — Globally unique identifier of the schema
  - `schemaType` string — Schema type
  - `references` SchemaReference[] — References to other schemas
    - `name` string — Reference name
    - `subject` string — Name of the referenced subject
    - `version` integer — Version number of the referenced subject
  - `schema` string — Schema definition string
  - `metadata` Metadata, nullable — User-defined metadata
    - `tags` object
    - `properties` object
    - `sensitive` string[]
  - `ruleSet` RuleSet, nullable — Schema rule set
    - `migrationRules` Rule[]
      - `name` string — Rule name
      - `doc` string — Rule doc
      - `kind` 'TRANSFORM' | 'CONDITION' — Rule kind
      - `mode` 'UPGRADE' | 'DOWNGRADE' | 'UPDOWN' | 'WRITE' | 'READ' | 'WRITEREAD' — Rule mode
      - `type` string — Rule type
      - `tags` string[] — The tags to which this rule applies
      - `params` object — Optional params for the rule
      - `expr` string — Rule expression
      - `onSuccess` string — Rule action on success
      - `onFailure` string — Rule action on failure
      - `disabled` boolean — Whether the rule is disabled
    - `domainRules` Rule[]
      - `name` string — Rule name
      - `doc` string — Rule doc
      - `kind` 'TRANSFORM' | 'CONDITION' — Rule kind
      - `mode` 'UPGRADE' | 'DOWNGRADE' | 'UPDOWN' | 'WRITE' | 'READ' | 'WRITEREAD' — Rule mode
      - `type` string — Rule type
      - `tags` string[] — The tags to which this rule applies
      - `params` object — Optional params for the rule
      - `expr` string — Rule expression
      - `onSuccess` string — Rule action on success
      - `onFailure` string — Rule action on failure
      - `disabled` boolean — Whether the rule is disabled
  - `schemaTagsToAdd` SchemaTags[]
    - `schemaEntity` SchemaEntity
      - `entityPath` string
      - `entityType` 'sr_record' | 'sr_field'
    - `tags` string[]
  - `schemaTagsToRemove` SchemaTags[]
    - `schemaEntity` SchemaEntity
      - `entityPath` string
      - `entityType` 'sr_record' | 'sr_field'
    - `tags` string[]
  - `propagateSchemaTags` boolean

## Response `200`

The schema.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found. Error code 40401 indicates subject not found. Error code 40403 indicates schema not found.
- `429` — Rate Limit Exceeded
- `500` — Internal Server Error.

---

[API](https://skmtc.dev/confluent/apis/confluent-cloud-apis.md) · [All operations](https://skmtc.dev/confluent/apis/confluent-cloud-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/confluent/confluent-cloud-apis/revisions/a6a73f98a698/schema)
