---
updatedAt: 2026-03-01T18:59:08.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/edgeworkers/llms.txt
---

# Validate an EdgeWorkers code bundle

Return a list of errors and warnings containing details on how to fix your code bundle. See [Validation types](ref:validation-types). In order to run this operation you need to provide an EdgeWorkers code bundle as a 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": "Validations",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/validations": {
      "post": {
        "description": "Return a list of errors and warnings containing details on how to fix your code bundle. See [Validation types](ref:validation-types). In order to run this operation you need to provide an EdgeWorkers code bundle as a 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-validations"
        },
        "operationId": "post-validations",
        "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": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "errors": [
                    {
                      "message": "static validation failed : main.js::9:16 SyntaxError: Unexpected identifier.",
                      "type": "STATIC_VALIDATION_FAILED"
                    },
                    {
                      "message": "manifest file is invalid",
                      "type": "INVALID_MANIFEST"
                    }
                  ],
                  "warnings": [
                    {
                      "message": "The EdgeKV access token is still valid but will expire soon.",
                      "type": "ACCESS_TOKEN_EXPIRING_SOON"
                    }
                  ]
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "errors": {
                      "description": "List of validation errors.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Provides details for an EdgeWorker code bundle validation error.",
                        "properties": {
                          "message": {
                            "description": "__Read-only__ Message containing more details about the validation error.",
                            "minLength": 1,
                            "readOnly": true,
                            "type": "string"
                          },
                          "type": {
                            "description": "__Read-only__ The type of the validation error. See [Validation error types](ref:validation-types).",
                            "enum": [
                              "ACCESS_TOKEN_EXPIRED",
                              "ACCESS_TOKEN_INVALID",
                              "ACCESS_TOKEN_MISSING",
                              "ACCESS_TOKEN_REFERENCE_INVALID",
                              "EDGEKV_FILE_MISSING",
                              "EDGEKV_TOKENS_FILE_MISSING",
                              "EMPTY_TARBALL",
                              "INVALID_EDGEKV_IMPORTS",
                              "INVALID_GZIP_FORMAT",
                              "INVALID_MANIFEST",
                              "INVALID_TAR_ARCHIVE",
                              "MAX_COMPRESSED_SIZE_EXCEEDED",
                              "MAX_UNCOMPRESSED_SIZE_EXCEEDED",
                              "MISSING_MANDATORY_FILES",
                              "STATIC_VALIDATION_FAILED",
                              "DEPENDENCY_NOT_FOUND",
                              "MISSING_MEGABUNDLE_JSON_FILE",
                              "MISSING_DEPENDENCIES_DIRECTORY",
                              "INVALID_MEGABUNDLE_JSON_FILE"
                            ],
                            "readOnly": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "message"
                        ],
                        "type": "object"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "warnings": {
                      "description": "List of validation warnings.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Provides details for an EdgeWorker code bundle validation warning.",
                        "properties": {
                          "message": {
                            "description": "__Read-only__ Message containing more details about the validation warning.",
                            "minLength": 1,
                            "readOnly": true,
                            "type": "string"
                          },
                          "type": {
                            "description": "__Read-only__ The type of the validation warning. See [Validation warning types](ref:validation-types).",
                            "enum": [
                              "ACCESS_TOKEN_EXPIRING_SOON"
                            ],
                            "readOnly": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "type",
                          "message"
                        ],
                        "type": "object"
                      },
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "errors",
                    "warnings"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Provides details for an EdgeWorkers code bundle validation."
          }
        },
        "summary": "Validate an EdgeWorkers code bundle",
        "tags": [
          "Validations"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/edgeworkers/v1"
    }
  ],
  "tags": [
    {
      "description": "Validate your EdgeWorkers code bundles.",
      "name": "Validations"
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```