Skip to main content
Worked examples for each supported endpoint. For the complete endpoint list, unsupported endpoints, and behavior differences, see Confluent API compatibility.

Setup

Set your endpoint and credentials once:
Every example uses Basic authentication, where the API key is the password and the username is an ignored placeholder. Bearer token authentication is also supported:
See Connect for how to find the URL and for the OAuth2 and mTLS alternatives.
Quote any URL containing ? or & so your shell doesn’t interpret it: curl -u "any-user:$API_KEY" "$SR_URL/subjects?deleted=true".
The registry accepts application/vnd.schemaregistry.v1+json as the content type for writes. Any Accept value outside the supported set returns 412.

Schemas

List supported schema types

Get a schema by ID

Get only the schema string

List the subjects a schema ID appears in

The same schema ID can appear under several subjects. Add ?deleted=true to include soft-deleted ones.

List subject-versions for a schema ID

Subjects

List all subjects

Use ?deleted=true to include soft-deleted subjects, or ?deletedOnly=true for only those.
This returns only the subjects your credentials can read, rather than failing. An empty array can mean the registry is empty or that your role covers no existing subject.

Register a schema

Add ?normalize=true to canonicalize before storing—effective for Avro and Protobuf, a no-op for JSON Schema. To register a schema that references another, include a references array. See Schema references.

Look up a schema under a subject

Find whether a schema is already registered, without registering it:
Returns 404 if the schema isn’t registered under that subject.

List versions under a subject

Get a specific version

Use latest in place of a version number to get the newest. Add ?deleted=true to read a soft-deleted version.

Get only the schema string for a version

List schemas that reference a version

The response is an array of schema IDs. A non-empty result means deleting this version returns error 42206.

Delete a version

Soft delete first:
Then hard delete, if you want the data gone:
Hard delete requires a prior soft delete—calling it first returns 40407 for a version or 40405 for a subject. There is no undelete: re-registering the same schema after a soft delete creates a new version. Hard-deleted data is unrecoverable.

Delete a subject

The response lists the versions that were deleted. Add ?permanent=true for the hard delete, after the soft delete.

Compatibility

Test a schema against a version

Test against every version

Add ?verbose=true to either endpoint to get the reason a check failed:
Both compatibility endpoints are POST, not GET.

Config

Get a subject’s compatibility level

Set a subject’s compatibility level

GET /config always returns {"compatibilityLevel":"NONE"} regardless of what’s in force. The real default is BACKWARD. There is no PUT /config—set the level per subject.

Mode

Only the global /mode exists; per-subject mode returns 404. Whether PUT /mode works depends on your cluster—see Confluent API compatibility.

Next steps

Confluent compatibility

The full endpoint list and behavior differences.

Evolution and compatibility

What each compatibility mode permits.