---
title: "POST /api/v2/allowedregistries"
method: POST
path: "/api/v2/allowedregistries"
tags: ["allowedregistry"]
---

# POST /api/v2/allowedregistries

`POST /api/v2/allowedregistries`

## Request

- The document declares no server URL.
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api/docs/api/v2/allowedregistries/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a allowed registry

## Request body

- WrBody
  - `name` string: Name of the allowed registry
  - `spec` AllowedRegistrySpec
    - `registryPrefix` string: RegistryPrefix contains the prefix of the registry which will be allowed. User clusters will be able to deploy only images which are prefixed with one of the allowed image registry prefixes.

## Response `201`

AllowedRegistry

- AllowedRegistry: AllowedRegistry represents a object containing a allowed image registry prefix
  - `name` string
  - `spec` AllowedRegistrySpec
    - `registryPrefix` string: RegistryPrefix contains the prefix of the registry which will be allowed. User clusters will be able to deploy only images which are prefixed with one of the allowed image registry prefixes.

## Other responses

- `401`: EmptyResponse is a empty response
- `403`: EmptyResponse is a empty response
- `default`: errorResponse

---

[API](https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api.md) - [All operations](https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api/revisions/815b9bf19db5?raw)
