get-components-name

Fetch one component schema by name

Returns a single custom component by its schema name, including its field definitions. Use it to generate types or validate content before writing with PATCH /dataset/{schema_name}.

Authentication

An API key, sent as the x-api-key header or the api_key query parameter.

Path parameters

ParameterDescription
nameComponent schema name, e.g. post

Query parameters

ParameterTypeRequiredDescription
websiteIdUUIDYesWebsite to read
api_keystringNoAlternative to the x-api-key header

Response 200 OK

One component object, in the same shape as the items of GET /components.

Example

curl "$MEDIAN_API_URL/components/post?websiteId=$WEBSITE_ID" \
  -H "x-api-key: $MEDIAN_API_KEY"

Errors

StatusCause
400Missing or invalid websiteId
401Missing or invalid API key
403API key has no organization
404No component with that name