Share feedback
Answers are generated based on the documentation.

Put image manifest

PUT/v2/{name}/manifests/{reference}

Upload an image manifest for a given tag or digest. This operation registers a manifest in a repository, allowing it to be pulled using the specified reference.

This endpoint is typically used after all layer and config blobs have been uploaded to the registry.

The manifest must conform to the expected schema and media type. For Docker image manifest schema version 2, use: application/vnd.docker.distribution.manifest.v2+json

Requires authentication via a bearer token with push scope for the target repository.

Connection and access

API connection and authentication guidance

https://registry-1.docker.io — Docker Hub registry API

Use one of these alternatives. Requirements within an alternative apply together.

  • registryToken

Parameters

name path Required

Name of the target Repository

Type: string

All schema constraints and annotations
{
  "type": "string"
}

reference path Required

Tag or digest to associate with the uploaded Manifest

Type: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Request

application/vnd.docker.distribution.manifest.v2+json

Type: object

config · required

Type: object

digest · required

Type: string

All schema constraints and annotations
{
  "example": "sha256:123456abcdef...",
  "type": "string"
}
mediaType · required

Type: string

All schema constraints and annotations
{
  "example": "application/vnd.docker.container.image.v1+json",
  "type": "string"
}
size · required

Type: integer

All schema constraints and annotations
{
  "example": 7023,
  "type": "integer"
}
All schema constraints and annotations
{
  "properties": {
    "digest": {
      "example": "sha256:123456abcdef...",
      "type": "string"
    },
    "mediaType": {
      "example": "application/vnd.docker.container.image.v1+json",
      "type": "string"
    },
    "size": {
      "example": 7023,
      "type": "integer"
    }
  },
  "required": [
    "mediaType",
    "size",
    "digest"
  ],
  "type": "object"
}
layers · required

Type: array

Array item

Type: object

digest · required

Type: string

All schema constraints and annotations
{
  "example": "sha256:abcdef123456...",
  "type": "string"
}
mediaType · required

Type: string

All schema constraints and annotations
{
  "example": "application/vnd.docker.image.rootfs.diff.tar.gzip",
  "type": "string"
}
size · required

Type: integer

All schema constraints and annotations
{
  "example": 32654,
  "type": "integer"
}
All schema constraints and annotations
{
  "properties": {
    "digest": {
      "example": "sha256:abcdef123456...",
      "type": "string"
    },
    "mediaType": {
      "example": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "type": "string"
    },
    "size": {
      "example": 32654,
      "type": "integer"
    }
  },
  "required": [
    "mediaType",
    "size",
    "digest"
  ],
  "type": "object"
}
All schema constraints and annotations
{
  "items": {
    "properties": {
      "digest": {
        "example": "sha256:abcdef123456...",
        "type": "string"
      },
      "mediaType": {
        "example": "application/vnd.docker.image.rootfs.diff.tar.gzip",
        "type": "string"
      },
      "size": {
        "example": 32654,
        "type": "integer"
      }
    },
    "required": [
      "mediaType",
      "size",
      "digest"
    ],
    "type": "object"
  },
  "type": "array"
}
mediaType · required

Type: string

All schema constraints and annotations
{
  "example": "application/vnd.docker.distribution.manifest.v2+json",
  "type": "string"
}
schemaVersion · required

Type: integer

All schema constraints and annotations
{
  "example": 2,
  "type": "integer"
}
All schema constraints and annotations
{
  "properties": {
    "config": {
      "properties": {
        "digest": {
          "example": "sha256:123456abcdef...",
          "type": "string"
        },
        "mediaType": {
          "example": "application/vnd.docker.container.image.v1+json",
          "type": "string"
        },
        "size": {
          "example": 7023,
          "type": "integer"
        }
      },
      "required": [
        "mediaType",
        "size",
        "digest"
      ],
      "type": "object"
    },
    "layers": {
      "items": {
        "properties": {
          "digest": {
            "example": "sha256:abcdef123456...",
            "type": "string"
          },
          "mediaType": {
            "example": "application/vnd.docker.image.rootfs.diff.tar.gzip",
            "type": "string"
          },
          "size": {
            "example": 32654,
            "type": "integer"
          }
        },
        "required": [
          "mediaType",
          "size",
          "digest"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "mediaType": {
      "example": "application/vnd.docker.distribution.manifest.v2+json",
      "type": "string"
    },
    "schemaVersion": {
      "example": 2,
      "type": "integer"
    }
  },
  "required": [
    "schemaVersion",
    "mediaType",
    "config",
    "layers"
  ],
  "type": "object"
}

sample-manifest

{
  "config": {
    "digest": "sha256:123456abcdef...",
    "mediaType": "application/vnd.docker.container.image.v1+json",
    "size": 7023
  },
  "layers": [
    {
      "digest": "sha256:abcdef123456...",
      "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
      "size": 32654
    }
  ],
  "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
  "schemaVersion": 2
}

Response 201

Manifest created successfully.

No response content is declared.

Headers

Content-Length

Always zero.

{
  "description": "Always zero.",
  "example": 0,
  "schema": {
    "type": "integer"
  }
}
Docker-Content-Digest

Digest of the stored manifest.

{
  "description": "Digest of the stored manifest.",
  "example": "sha256:abcdef123456...",
  "schema": {
    "type": "string"
  }
}
Location

Canonical location of the uploaded manifest.

{
  "description": "Canonical location of the uploaded manifest.",
  "example": "/v2/library/ubuntu/manifests/latest",
  "schema": {
    "type": "string"
  }
}

Response 400

Invalid name, reference, or manifest.

No response content is declared.

Response 401

Authentication required.

No response content is declared.

Response 403

Access denied.

No response content is declared.

Response 404

Repository not found.

No response content is declared.

Response 405

Operation not allowed.

No response content is declared.

Response 429

Too many requests.

No response content is declared.

Referenced schemas

Complete operation contract
{
  "description": "Upload an image manifest for a given tag or digest. This operation registers a manifest in a repository, allowing it to be pulled using the specified reference.\n\nThis endpoint is typically used after all layer and config blobs have been uploaded to the registry.\n\nThe manifest must conform to the expected schema and media type. For Docker image manifest schema version 2, use:\n`application/vnd.docker.distribution.manifest.v2+json`\n\nRequires authentication via a bearer token with `push` scope for the target repository.\n",
  "operationId": "PutImageManifest",
  "parameters": [
    {
      "description": "Name of the target Repository",
      "example": "library/ubuntu",
      "in": "path",
      "name": "name",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Tag or digest to associate with the uploaded Manifest",
      "examples": {
        "by-digest": {
          "summary": "Digest",
          "value": "sha256:abc123def456..."
        },
        "by-tag": {
          "summary": "Tag",
          "value": "latest"
        }
      },
      "in": "path",
      "name": "reference",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/vnd.docker.distribution.manifest.v2+json": {
        "examples": {
          "sample-manifest": {
            "summary": "Sample Docker image manifest (schema v2)",
            "value": {
              "config": {
                "digest": "sha256:123456abcdef...",
                "mediaType": "application/vnd.docker.container.image.v1+json",
                "size": 7023
              },
              "layers": [
                {
                  "digest": "sha256:abcdef123456...",
                  "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                  "size": 32654
                }
              ],
              "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
              "schemaVersion": 2
            }
          }
        },
        "schema": {
          "properties": {
            "config": {
              "properties": {
                "digest": {
                  "example": "sha256:123456abcdef...",
                  "type": "string"
                },
                "mediaType": {
                  "example": "application/vnd.docker.container.image.v1+json",
                  "type": "string"
                },
                "size": {
                  "example": 7023,
                  "type": "integer"
                }
              },
              "required": [
                "mediaType",
                "size",
                "digest"
              ],
              "type": "object"
            },
            "layers": {
              "items": {
                "properties": {
                  "digest": {
                    "example": "sha256:abcdef123456...",
                    "type": "string"
                  },
                  "mediaType": {
                    "example": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                    "type": "string"
                  },
                  "size": {
                    "example": 32654,
                    "type": "integer"
                  }
                },
                "required": [
                  "mediaType",
                  "size",
                  "digest"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "mediaType": {
              "example": "application/vnd.docker.distribution.manifest.v2+json",
              "type": "string"
            },
            "schemaVersion": {
              "example": 2,
              "type": "integer"
            }
          },
          "required": [
            "schemaVersion",
            "mediaType",
            "config",
            "layers"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "description": "Manifest created successfully.",
      "headers": {
        "Content-Length": {
          "description": "Always zero.",
          "example": 0,
          "schema": {
            "type": "integer"
          }
        },
        "Docker-Content-Digest": {
          "description": "Digest of the stored manifest.",
          "example": "sha256:abcdef123456...",
          "schema": {
            "type": "string"
          }
        },
        "Location": {
          "description": "Canonical location of the uploaded manifest.",
          "example": "/v2/library/ubuntu/manifests/latest",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "400": {
      "description": "Invalid name, reference, or manifest."
    },
    "401": {
      "description": "Authentication required."
    },
    "403": {
      "description": "Access denied."
    },
    "404": {
      "description": "Repository not found."
    },
    "405": {
      "description": "Operation not allowed."
    },
    "429": {
      "description": "Too many requests."
    }
  },
  "summary": "Put image manifest",
  "tags": [
    "Manifests"
  ],
  "x-codeSamples": [
    {
      "label": "cURL",
      "lang": "Bash",
      "source": "# PUT a manifest (tag = latest)\ncurl -X PUT \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application/vnd.docker.distribution.manifest.v2+json\" \\\n  --data-binary @manifest.json \\\n  https://registry-1.docker.io/v2/library/ubuntu/manifests/latest\n"
    }
  ]
}