# Complete blob upload


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

API version: 2



`PUT /v2/{name}/blobs/uploads/{uuid}`

Complete the upload of a blob by finalizing an upload session.

This request must include the `digest` query parameter and optionally the last chunk of data. When the registry receives this request, it verifies the digest and stores the blob.

This endpoint supports:
- Monolithic uploads (upload entire blob in this request)
- Finalizing chunked uploads (last chunk plus `digest`)


## Connection and access

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


Server: `https://registry-1.docker.io`

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

```json
[
  {
    "registryToken": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request PUT \
  --header "Authorization: Bearer ${REGISTRY_TOKEN}" \
  --header 'Content-Type: application/octet-stream' \
  --data-binary @request-body \
  'https://registry-1.docker.io/v2/library%2Fubuntu/blobs/uploads/abc123?digest=sha256%3Aabcd1234...'
```

Prepare request-body using the selected media type and schema.

## Parameters

### name

Location: path. Required: yes.

Repository name

```json
{
  "description": "Repository name",
  "example": "library/ubuntu",
  "in": "path",
  "name": "name",
  "pointer": "/paths/~1v2~1{name}~1blobs~1uploads~1{uuid}/put/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### uuid

Location: path. Required: yes.

Upload session UUID returned from the POST request

```json
{
  "description": "Upload session UUID returned from the POST request",
  "example": "abc123",
  "in": "path",
  "name": "uuid",
  "pointer": "/paths/~1v2~1{name}~1blobs~1uploads~1{uuid}/put/parameters/1",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### digest

Location: query. Required: yes.

Digest of the uploaded blob

```json
{
  "description": "Digest of the uploaded blob",
  "example": "sha256:abcd1234...",
  "in": "query",
  "name": "digest",
  "pointer": "/paths/~1v2~1{name}~1blobs~1uploads~1{uuid}/put/parameters/2",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Request  application/octet-stream




Schema:

```json
{
  "format": "binary",
  "type": "string"
}
```




layer-upload:
```text
<binary data not shown>
```


### Response 201 

Upload completed successfully

No response content is declared.




Headers:

```json
{
  "Content-Length": {
    "description": "Always zero for completed uploads",
    "example": 0,
    "schema": {
      "type": "integer"
    }
  },
  "Docker-Content-Digest": {
    "description": "Canonical digest of the stored blob",
    "example": "sha256:abcd1234...",
    "schema": {
      "type": "string"
    }
  },
  "Location": {
    "description": "URL where the blob is now accessible",
    "example": "/v2/library/ubuntu/blobs/sha256:abcd1234...",
    "schema": {
      "type": "string"
    }
  }
}
```



### Response 400 

Invalid digest or missing parameters

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 

Upload session not found

No response content is declared.






### Response 416 

Requested range not satisfiable (if used in chunked mode)

No response content is declared.






### Response 429 

Too many requests

No response content is declared.






## Complete operation contract

```json
{
  "description": "Complete the upload of a blob by finalizing an upload session.\n\nThis request must include the `digest` query parameter and optionally the last chunk of data. When the registry receives this request, it verifies the digest and stores the blob.\n\nThis endpoint supports:\n- Monolithic uploads (upload entire blob in this request)\n- Finalizing chunked uploads (last chunk plus `digest`)\n",
  "operationId": "CompleteBlobUpload",
  "parameters": [
    {
      "description": "Repository name",
      "example": "library/ubuntu",
      "in": "path",
      "name": "name",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Upload session UUID returned from the POST request",
      "example": "abc123",
      "in": "path",
      "name": "uuid",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Digest of the uploaded blob",
      "example": "sha256:abcd1234...",
      "in": "query",
      "name": "digest",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/octet-stream": {
        "examples": {
          "layer-upload": {
            "summary": "Layer tarball blob",
            "value": "\u003cbinary data not shown\u003e"
          }
        },
        "schema": {
          "format": "binary",
          "type": "string"
        }
      }
    },
    "required": false
  },
  "responses": {
    "201": {
      "description": "Upload completed successfully",
      "headers": {
        "Content-Length": {
          "description": "Always zero for completed uploads",
          "example": 0,
          "schema": {
            "type": "integer"
          }
        },
        "Docker-Content-Digest": {
          "description": "Canonical digest of the stored blob",
          "example": "sha256:abcd1234...",
          "schema": {
            "type": "string"
          }
        },
        "Location": {
          "description": "URL where the blob is now accessible",
          "example": "/v2/library/ubuntu/blobs/sha256:abcd1234...",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "400": {
      "description": "Invalid digest or missing parameters"
    },
    "401": {
      "description": "Authentication required"
    },
    "403": {
      "description": "Access denied"
    },
    "404": {
      "description": "Upload session not found"
    },
    "416": {
      "description": "Requested range not satisfiable (if used in chunked mode)"
    },
    "429": {
      "description": "Too many requests"
    }
  },
  "summary": "Complete blob upload",
  "tags": [
    "Blobs"
  ],
  "x-codeSamples": [
    {
      "label": "cURL",
      "lang": "Bash",
      "source": "# PUT – complete upload (monolithic or final chunk)\ncurl -X PUT \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application/octet-stream\" \\\n  --data-binary @layer.tar.gz \\\n  \"https://registry-1.docker.io/v2/library/ubuntu/blobs/uploads/abc123?digest=sha256:abcd1234...\"\n"
    }
  ]
}
```

## Referenced schemas




