---
updatedAt: 2026-08-10T14:18:56.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/edgeworkers/llms.txt
---

# Create a new version

Create a new version of an EdgeWorker. In order to run this operation you need to build an [EdgeWorkers code bundle](doc:create-a-code-bundle) and save it in GZIP format. You need to provide the GZIP binary file in the request body, with a `Content-Type` of `application/gzip`.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's EdgeWorkers API",
    "url": "https://techdocs.akamai.com/edgeworkers/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "EdgeWorker IDs",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/ids/{edgeWorkerId}/versions": {
      "post": {
        "description": "Create a new version of an EdgeWorker. In order to run this operation you need to build an [EdgeWorkers code bundle](https://techdocs.akamai.com/edgeworkers/docs/create-a-code-bundle) and save it in GZIP format. You need to provide the GZIP binary file in the request body, with a `Content-Type` of `application/gzip`.",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's EdgeWorkers API",
          "url": "https://techdocs.akamai.com/edgeworkers/reference/post-versions"
        },
        "operationId": "post-versions",
        "parameters": [
          {
            "description": "For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).",
            "in": "query",
            "name": "accountSwitchKey",
            "required": false,
            "schema": {
              "example": "1-5C0YLB:1-8BYUX",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/gzip": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "accountId": "A-CCT9012",
                  "checksum": "de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3",
                  "createdBy": "jsmith",
                  "createdTime": "2020-07-05T18:17:46Z",
                  "edgeWorkerId": 42,
                  "version": "5"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "accountId": {
                      "description": "Identifier for the account where the EdgeWorker was created.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "checksum": {
                      "description": "A SHA-256 hash digest of the tarball.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "createdBy": {
                      "description": "Username of the person who created the EdgeWorker version.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "createdTime": {
                      "description": "ISO 8601 timestamp indicating when the EdgeWorker version was created.",
                      "format": "date-time",
                      "type": "string"
                    },
                    "edgeWorkerId": {
                      "description": "Unique identifier of the EdgeWorker.",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "sequenceNumber": {
                      "description": "An incrementing number indicating the upload order of the EdgeWorker versions.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "version": {
                      "description": "Unique identifier of the EdgeWorker version.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "edgeWorkerId",
                    "version",
                    "accountId",
                    "checksum",
                    "createdBy",
                    "createdTime"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/versions-post-201.yaml"
                  }
                }
              }
            },
            "description": "Provides details for an EdgeWorker version.",
            "headers": {
              "Location": {
                "description": "Use this URL to fetch the new resource.",
                "schema": {
                  "type": "string"
                },
                "x-akamai": {
                  "file-path": "headers/location.yaml"
                }
              }
            }
          }
        },
        "summary": "Create a new version",
        "tags": [
          "Versions"
        ]
      },
      "parameters": [
        {
          "description": "Unique identifier for an EdgeWorker.",
          "in": "path",
          "name": "edgeWorkerId",
          "required": true,
          "schema": {
            "example": 42,
            "minimum": 1,
            "type": "integer"
          },
          "x-akamai": {
            "file-path": "parameters/edge-worker-id-path.yaml"
          }
        }
      ]
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/edgeworkers/v1"
    }
  ],
  "tags": [
    {
      "description": "Manage your EdgeWorkers versions.",
      "name": "Versions"
    }
  ],
  "x-akamai": {
    "auth-type": "EDGE_GRID",
    "file-path": "ids.yaml"
  },
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
```

# Sibling pages

* [List versions](https://techdocs.akamai.com/edgeworkers/reference/get-versions.md)
* [Get version details](https://techdocs.akamai.com/edgeworkers/reference/get-version.md)
* [Delete version](https://techdocs.akamai.com/edgeworkers/reference/delete-version.md)
* [Download an EdgeWorkers code bundle](https://techdocs.akamai.com/edgeworkers/reference/get-version-content.md)