Development — entry 022 of 100
Docker Hub
Docker Hub's API manages image repositories, tags, organizations, and access tokens for the world's largest container registry, authenticating via a personal access token used directly or exchanged for a short-lived bearer JWT. The free Personal tier covers unlimited public repositories with rate-limited pulls; paid Pro, Team, and Business plans raise pull-rate limits and add private repositories.
GreatAPIs Score
Auth quickstart
- Sign up with the provider to get an API key.
- Send it on every request as a header
Authorization: <key> - The exact header isn't documented — Authorization is a common default; confirm in the provider's docs.
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Endpoints
authentication2
Most Docker Hub API endpoints require you to authenticate using your Docker credentials before using them. Additionally, similar to the Docker Hub UI features, API endpoint responses may vary depending on your plan (Free, Pro, or Team) and your account's permissions. To learn more about the features available in each plan and to upgrade your existing plan, see [Docker Pricing](https://www.docker.com/pricing).
POST/v2/users/2fa-loginSecond factor authentication.
application/json — Users2FALoginRequest (required)
| Status | Description | Schema |
|---|---|---|
200 | Authentication successful | PostUsersLoginSuccessResponse |
401 | Authentication failed or second factor required | PostUsers2FALoginErrorResponse |
POST/v2/users/loginCreate an authentication token
application/json — UsersLoginRequest (required)
| Status | Description | Schema |
|---|---|---|
200 | Authentication successful | PostUsersLoginSuccessResponse |
401 | Authentication failed or second factor required | PostUsersLoginErrorResponse |
access-tokens5
The Personal Access Token endpoints lets you manage personal access tokens. For more information, see [Access Tokens](https://docs.docker.com/docker-hub/access-tokens/). You can use a personal access token instead of a password in the [Docker CLI](https://docs.docker.com/engine/reference/commandline/cli/) or in the [Create an authentication token](#operation/PostUsersLogin) route to obtain a bearer token. ### Scopes For each scope grouping (in this case "repo"), you only need to define 1 scope as any lower scopes are assumed. For example: If you define `repo:write`, the API assumes the scope of both `repo:read` *and* `repo:public_read` as well. If you were to define both `repo:write` *and* `repo:read`, then `repo:read` is assumed by `repo:write` and ignored. ***Treat your personal access token like your password and keep it secret. You cannot retrieve your token after it is generated.***
GET/v2/access-tokensGet a list of personal access tokens
| Name | In | Required | Type |
|---|---|---|---|
page | query | no | number |
page_size | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | OK | getAccessTokensResponse |
400 | — | — |
401 | — | — |
POST/v2/access-tokensCreate a personal access token
application/json — createAccessTokenRequest (required)
| Status | Description | Schema |
|---|---|---|
201 | Created | createAccessTokensResponse |
400 | — | — |
401 | — | — |
GET/v2/access-tokens/{uuid}Get a personal access token
| Name | In | Required | Type |
|---|---|---|---|
uuid | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | — |
401 | — | — |
404 | — | — |
PATCH/v2/access-tokens/{uuid}Update a personal access token
| Name | In | Required | Type |
|---|---|---|---|
uuid | path | yes | string |
application/json — patchAccessTokenRequest (required)
| Status | Description | Schema |
|---|---|---|
200 | OK | patchAccessTokenResponse |
400 | — | — |
401 | — | — |
DELETE/v2/access-tokens/{uuid}Delete a personal access token
| Name | In | Required | Type |
|---|---|---|---|
uuid | path | yes | string |
| Status | Description | Schema |
|---|---|---|
204 | A successful response. | — |
401 | — | — |
404 | — | — |
images4
The Advanced Image Management API endpoints allow you to manage Docker images across all repositories. For more information, see [Advanced Image Management dashboard](https://docs.docker.com/docker-hub/image-management/).
POST/v2/namespaces/{namespace}/delete-imagesDelete images
| Name | In | Required | Type |
|---|---|---|---|
namespace | path | yes | string |
application/json — PostNamespacesDeleteImagesRequest (required)
| Status | Description | Schema |
|---|---|---|
200 | Deletion completed | PostNamespacesDeleteImagesResponseSuccess |
400 | Deletion not possible | PostNamespacesDeleteImagesResponseError |
403 | Forbidden - this API is only available to users on Pro or Team plans | ErrorResponse |
GET/v2/namespaces/{namespace}/repositories/{repository}/imagesGet details of repository's images
| Name | In | Required | Type |
|---|---|---|---|
namespace | path | yes | string |
repository | path | yes | string |
status | query | no | string |
currently_tagged | query | no | boolean |
ordering | query | no | string |
active_from | query | no | string |
page | query | no | integer |
page_size | query | no | integer |
| Status | Description | Schema |
|---|---|---|
200 | Success | GetNamespaceRepositoryImagesResponse |
401 | Unauthorized - user does not have read access to the namespace. | ErrorResponse |
403 | Forbidden - this API is only available to users on Pro or Team plans. | ErrorResponse |
GET/v2/namespaces/{namespace}/repositories/{repository}/images-summaryGet summary of repository's images
| Name | In | Required | Type |
|---|---|---|---|
namespace | path | yes | string |
repository | path | yes | string |
active_from | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Success | GetNamespaceRepositoryImagesSummaryResponse |
401 | Unauthorized - user does not have read access to the namespace | ErrorResponse |
GET/v2/namespaces/{namespace}/repositories/{repository}/images/{digest}/tagsGet image's tags
| Name | In | Required | Type |
|---|---|---|---|
namespace | path | yes | string |
repository | path | yes | string |
digest | path | yes | string |
page | query | no | integer |
page_size | query | no | integer |
| Status | Description | Schema |
|---|---|---|
200 | Success | GetNamespaceRepositoryImagesTagsResponse |
401 | Unauthorized - user does not have read access to the namespace | ErrorResponse |
403 | Forbidden - this API is only available to users on Pro or Team plans | ErrorResponse |
audit-logs2
The Audit Logs API endpoints allow you to query audit log events across a namespace. For more information, see [Audit Log](https://docs.docker.com/docker-hub/audit-log/)
GET/v2/auditlogs/{account}Returns list of audit log events.
| Name | In | Required | Type |
|---|---|---|---|
account | path | yes | string |
action | query | no | string |
name | query | no | string |
actor | query | no | string |
from | query | no | string |
to | query | no | string |
page | query | no | integer |
page_size | query | no | integer |
| Status | Description | Schema |
|---|---|---|
200 | A successful response. | GetAuditLogsResponse |
429 | — | |
500 | — | |
default | An unexpected error response. | rpcStatus |
GET/v2/auditlogs/{account}/actionsReturns list of audit log actions.
| Name | In | Required | Type |
|---|---|---|---|
account | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | A successful response. | GetAuditActionsResponse |
429 | — | |
500 | — | |
default | An unexpected error response. | rpcStatus |
org-settings2
The Org Settings API endpoints allow you to manage your organization's settings.
GET/v2/orgs/{name}/settingsGet organization settings
| Name | In | Required | Type |
|---|---|---|---|
name | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | OK | orgSettings |
401 | — | — |
403 | — | — |
404 | — | — |
PUT/v2/orgs/{name}/settingsUpdate organization settings
| Name | In | Required | Type |
|---|---|---|---|
name | path | yes | string |
application/json (required)
| Status | Description | Schema |
|---|---|---|
200 | OK | orgSettings |
401 | — | — |
403 | — | — |
404 | — | — |
repositories4
The repository endpoints allow you to manage your repository's configuration like description.
GET/v2/namespaces/{namespace}/repositories/{repository}/tagsList repository tags
| Status | Description | Schema |
|---|---|---|
200 | — | — |
403 | — | — |
404 | — | — |
HEAD/v2/namespaces/{namespace}/repositories/{repository}/tagsCheck repository tags
| Status | Description | Schema |
|---|---|---|
200 | Repository contains tags | — |
403 | — | — |
404 | — | — |
GET/v2/namespaces/{namespace}/repositories/{repository}/tags/{tag}Read repository tag
| Status | Description | Schema |
|---|---|---|
200 | — | — |
403 | — | — |
404 | — | — |
HEAD/v2/namespaces/{namespace}/repositories/{repository}/tags/{tag}Check repository tag
| Status | Description | Schema |
|---|---|---|
200 | Repository tag exists | — |
403 | — | — |
404 | — | — |
scim9
SCIM is a provisioning system that lets you manage users within your identity provider (IdP). For more information, see [System for Cross-domain Identity management](https://docs.docker.com/docker-hub/scim/).
GET/v2/scim/2.0/ResourceTypesList resource types
| Status | Description | Schema |
|---|---|---|
200 | — | — |
401 | — | — |
500 | — | — |
GET/v2/scim/2.0/ResourceTypes/{name}Get a resource type
| Name | In | Required | Type |
|---|---|---|---|
name | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | — | — |
401 | — | — |
404 | — | — |
500 | — | — |
GET/v2/scim/2.0/SchemasList schemas
| Status | Description | Schema |
|---|---|---|
200 | — | — |
401 | — | — |
500 | — | — |
GET/v2/scim/2.0/Schemas/{id}Get a schema
| Name | In | Required | Type |
|---|---|---|---|
id | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | — | — |
401 | — | — |
404 | — | — |
500 | — | — |
GET/v2/scim/2.0/ServiceProviderConfigGet service provider config
| Status | Description | Schema |
|---|---|---|
200 | — | — |
401 | — | — |
500 | — | — |
GET/v2/scim/2.0/UsersList users
| Name | In | Required | Type |
|---|---|---|---|
startIndex | query | no | integer |
count | query | no | integer |
filter | query | no | string |
sortOrder | query | no | string |
sortBy | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | — | — |
400 | — | — |
401 | — | — |
403 | — | — |
404 | — | — |
500 | — | — |
POST/v2/scim/2.0/UsersCreate user
| Status | Description | Schema |
|---|---|---|
201 | — | — |
400 | — | — |
401 | — | — |
403 | — | — |
404 | — | — |
409 | — | — |
500 | — | — |
GET/v2/scim/2.0/Users/{id}Get a user
| Status | Description | Schema |
|---|---|---|
200 | — | — |
400 | — | — |
401 | — | — |
403 | — | — |
404 | — | — |
500 | — | — |
PUT/v2/scim/2.0/Users/{id}Update a user
| Status | Description | Schema |
|---|---|---|
200 | — | — |
400 | — | — |
401 | — | — |
403 | — | — |
404 | — | — |
409 | — | — |
500 | — | — |
Try it
Developer reference
https://hub.docker.com180 requests/min per IP on the Hub API, confirmed live via `x-ratelimit-limit: 180` on hub.docker.com — distinct from image *pull* rate limits (100/6h anonymous, 200/6h authenticated-free), which apply to registry pulls, not these API calls.
- GET/v2/namespaces/{namespace}/repositories/{repository}/tags
- GET/v2/namespaces/{namespace}/repositories/{repository}/tags/{tag}
- GET/v2/namespaces/{namespace}/repositories/{repository}/images
- POST/v2/users/login
- GET/v2/access-tokens