# Check repository in a namespace


[API catalog](/reference/api/) · [Docker Hub overview](/reference/api/hub/latest/) · [Product manual](https://docs.docker.com/docker-hub/) · [OpenAPI specification](/reference/api/hub/latest.yaml)

API version: 2-beta



`HEAD /v2/namespaces/{namespace}/repositories/{repository}`

Check a repository within the specified namespace (organization or user).

Public repositories are accessible to everyone, while private repositories require appropriate authentication and permissions.

This operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.


## Connection and access

[API connection and authentication guidance](/reference/api/hub/latest/#authentication)


Server: `https://hub.docker.com`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "bearerAuth": []
  },
  {}
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --head \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  'https://hub.docker.com/v2/namespaces/<NAMESPACE>/repositories/<REPOSITORY>'
```

This example uses the first authentication alternative. Review the complete requirements.

## Parameters

### namespace

Location: path. Required: yes.

Namespace of the repository, such as a user or organization name.

```json
{
  "description": "Namespace of the repository, such as a user or organization name.",
  "in": "path",
  "name": "namespace",
  "pointer": "/paths/~1v2~1namespaces~1{namespace}~1repositories~1{repository}/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### repository

Location: path. Required: yes.

Name of the repository within the namespace.

```json
{
  "description": "Name of the repository within the namespace.",
  "in": "path",
  "name": "repository",
  "pointer": "/paths/~1v2~1namespaces~1{namespace}~1repositories~1{repository}/parameters/1",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 



No response content is declared.






### Response 401 application/json

Unauthorized


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "unauthorized"
}
```


### Response 403 application/json

Forbidden


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "permission denied"
}
```


### Response 404 application/json

Not Found


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "not found"
}
```


### Response 500 application/json

Internal


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "internal error"
}
```


## Complete operation contract

```json
{
  "description": "Check a repository within the specified namespace (organization or user).\n\nPublic repositories are accessible to everyone, while private repositories require appropriate authentication and permissions.\n\nThis operation accepts bearer tokens issued from organization access tokens (OATs). The token must have the required resource access and scopes.\n",
  "operationId": "CheckRepository",
  "responses": {
    "200": {},
    "401": {
      "$ref": "#/components/responses/unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/forbidden"
    },
    "404": {
      "$ref": "#/components/responses/not_found"
    },
    "500": {
      "$ref": "#/components/responses/internal_error"
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {}
  ],
  "summary": "Check repository in a namespace",
  "tags": [
    "repositories"
  ]
}
```

## Referenced schemas

- `#/components/responses/forbidden`

- `#/components/responses/internal_error`

- `#/components/responses/not_found`

- `#/components/responses/unauthorized`




