---
title: "Creates a container registry repository in the project and returns the created repository."
method: POST
path: "/projects/{project_id}/ccr/repositories"
tags: ["Ccr", "Container Registry"]
---

# Creates a container registry repository in the project and returns the created repository.

`POST /projects/{project_id}/ccr/repositories`

## Path parameters

- `project_id` string, required

## Request body

- RepositoryRequest
  - `location` string — Location to create the repository in.
  - `max_size_bytes` string — Maximum total size for the new repository, in bytes.
  - `mode` string — Mode for the new repository, which determines how images are stored and served.
  - `name` string — Name for the new repository.
  - `upstream_registry` UpstreamRegistry
    - `provider` string — Provider of the upstream registry.
    - `upstream_registry_credentials` UpstreamRegistryCredentials
      - `password` string — Password used to authenticate to the upstream registry.
      - `username` string — Username used to authenticate to the upstream registry.
    - `url` string — Base URL of the upstream registry that the repository caches images from.

## Response `201`

- Repository
  - `created_at` string, date-time — Creation timestamp of the repository, in RFC3339 format.
  - `id` string — ID of the repository.
  - `location` string — Location the repository is hosted in.
  - `max_size_bytes` string — Maximum total size of the repository, in bytes.
  - `mode` string — Mode of the repository, which determines how images are stored and served.
  - `name` string — Name of the repository.
  - `state` string — State of the repository.
  - `upstream_registry` UpstreamRegistry
    - `provider` string — Provider of the upstream registry.
    - `upstream_registry_credentials` UpstreamRegistryCredentials
      - `password` string — Password used to authenticate to the upstream registry.
      - `username` string — Username used to authenticate to the upstream registry.
    - `url` string — Base URL of the upstream registry that the repository caches images from.
  - `url` string — URL at which the repository can be accessed.

## Other responses

- `400` — Error Bad Request
- `401` — Error Authentication Failed
- `403` — Error Permissions
- `500` — Error Internal Server

---

[API](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/revisions/a3fd2dedc72b/schema)
