---
updatedAt: 2026-03-01T18:09:52.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/api-definitions/llms.txt
---

# Get an error response

Returns a customizable error response of the selected type.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's API Endpoint Definition API",
    "url": "https://techdocs.akamai.com/api-definitions/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "API delivery settings",
    "version": "v2"
  },
  "openapi": "3.0.0",
  "paths": {
    "/endpoints/{apiEndPointId}/versions/{versionNumber}/settings/error-responses/{type}": {
      "get": {
        "description": "Returns a customizable error response of the selected type.",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's API Endpoint Definition API",
          "url": "https://techdocs.akamai.com/api-definitions/reference/get-error-responses-type"
        },
        "operationId": "get-error-responses-type",
        "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"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "body": "{\"title\":\"The API key you provided does not exist.\" }",
                  "headers": [
                    {
                      "name": "Content-Type",
                      "value": "application/problem+json"
                    }
                  ],
                  "overrideDefaults": false,
                  "statusCode": 401
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "A customizable error response. You can customize the following error types: `API_KEY_INVALID`, `API_KEY_FORBIDDEN`, `QUOTA_EXCEEDED`, `JWT_SIGNATURE_INVALID`, `JWT_CLAIM_VALUE_INVALID`.",
                  "properties": {
                    "body": {
                      "description": "The response body to return in case of the error. The value should have the proper formatting to reflect the content type. For example, in case of a JSON body format, enclose the text in curly brackets (`{}`).",
                      "type": "string"
                    },
                    "headers": {
                      "description": "HTTP headers to return in case of the error. By default, API Gateway returns the `Content-Type` header with a value of `application/problem+json` which reflects the default response body. If the `body` member indicates a different content type, set the `Content-Type` header to the appropriate value. For example, in case of an XML body, the value could be `application/problem+xml`.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The name of the HTTP header to return in case of the error.",
                            "type": "string"
                          },
                          "value": {
                            "description": "The value of the HTTP header to return in case of the error.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "overrideDefaults": {
                      "description": "__Read-only__ Whether you overrode the default error response.",
                      "readOnly": true,
                      "type": "boolean"
                    },
                    "statusCode": {
                      "description": "The status code to return in case of the error.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "statusCode"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/error-response-dto.yaml"
                  }
                }
              }
            },
            "description": "The response shows the current error response."
          },
          "400": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "Invalid data input.",
                  "instance": "d54686b5-21cb-4ab7-a8d6-a92282cf1749",
                  "status": 400,
                  "title": "Bad request",
                  "type": "/api-definitions/error-types/bad-request"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Contains debugging information for error responses.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "errors": {
                      "description": "Nested error responses.",
                      "items": {
                        "description": "A further nested problem detail object.",
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-recurse.yaml"
                        }
                      },
                      "type": "array"
                    },
                    "instance": {
                      "description": "The non-referenceable URL for the error instance.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "The title of the error.",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Bad request](ref:400). Some of your request's input is invalid.",
            "x-akamai": {
              "file-path": "errors/400.yaml"
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The signature does not match",
                  "instance": "https://akab-oehab7atr276tq2v-jf4goiyzjkusb7lc.luna.akamaiapis.net/api-definitions/v2/endpoints/all-versions",
                  "status": 401,
                  "title": "Not authorized",
                  "type": "https://problems.luna.akamaiapis.net/-/pep-authn/deny"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Contains debugging information for error responses.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "errors": {
                      "description": "Nested error responses.",
                      "items": {
                        "description": "A further nested problem detail object.",
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-recurse.yaml"
                        }
                      },
                      "type": "array"
                    },
                    "instance": {
                      "description": "The non-referenceable URL for the error instance.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "The title of the error.",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Unauthorized](ref:401). You aren't authorized to perform the action.",
            "x-akamai": {
              "file-path": "errors/401.yaml"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "You have insufficient permissions to perform this action. Ensure that you have the correct permissions set in Identity and Access Management.",
                  "instance": "2602aedd-38a9-41c3-a607-8a6ad8129e6b",
                  "status": 403,
                  "title": "Forbidden",
                  "type": "/api-definitions/error-types/forbidden"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Contains debugging information for error responses.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "errors": {
                      "description": "Nested error responses.",
                      "items": {
                        "description": "A further nested problem detail object.",
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-recurse.yaml"
                        }
                      },
                      "type": "array"
                    },
                    "instance": {
                      "description": "The non-referenceable URL for the error instance.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "The title of the error.",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Forbidden](ref:403). You don't have permission to access the API endpoint.",
            "x-akamai": {
              "file-path": "errors/403.yaml"
            }
          },
          "404": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "Resource not found.",
                  "instance": "d54686b5-21cb-4ab7-a8d6-a92282cf1749",
                  "status": 404,
                  "title": "Not Found",
                  "type": "/api-definitions/error-types/not-found"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Contains debugging information for error responses.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "errors": {
                      "description": "Nested error responses.",
                      "items": {
                        "description": "A further nested problem detail object.",
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-recurse.yaml"
                        }
                      },
                      "type": "array"
                    },
                    "instance": {
                      "description": "The non-referenceable URL for the error instance.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "The title of the error.",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Not found](ref:404). This API endpoint doesn't exist.",
            "x-akamai": {
              "file-path": "errors/404.yaml"
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The request you submitted is invalid. Modify the request and try again.",
                  "instance": "7026cb39-bc76-45ac-9da9-5b65185f963a",
                  "status": 405,
                  "title": "Method Not Allowed",
                  "type": "/api-definitions/error-types/bad-request"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Contains debugging information for error responses.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "errors": {
                      "description": "Nested error responses.",
                      "items": {
                        "description": "A further nested problem detail object.",
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-recurse.yaml"
                        }
                      },
                      "type": "array"
                    },
                    "instance": {
                      "description": "The non-referenceable URL for the error instance.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "The title of the error.",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Method not allowed](ref:405).",
            "x-akamai": {
              "file-path": "errors/405.yaml"
            }
          },
          "415": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "The request you submitted is invalid. Modify the request and try again.",
                  "instance": "07cad126-5490-41b7-a99b-fe35a0c6eac4",
                  "status": 415,
                  "title": "Unsupported Media Type",
                  "type": "/api-definitions/error-types/bad-request"
                },
                "schema": {
                  "additionalProperties": true,
                  "description": "Contains debugging information for error responses.",
                  "properties": {
                    "detail": {
                      "description": "The detailed error message.",
                      "type": "string"
                    },
                    "errors": {
                      "description": "Nested error responses.",
                      "items": {
                        "description": "A further nested problem detail object.",
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/http-problem-details-recurse.yaml"
                        }
                      },
                      "type": "array"
                    },
                    "instance": {
                      "description": "The non-referenceable URL for the error instance.",
                      "type": "string"
                    },
                    "status": {
                      "description": "The HTTP status code.",
                      "type": "integer"
                    },
                    "title": {
                      "description": "The title of the error.",
                      "type": "string"
                    },
                    "type": {
                      "description": "The URL for the error type.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/http-problem-details.yaml"
                  }
                }
              }
            },
            "description": "[Unsupported Media Type](ref:415).",
            "x-akamai": {
              "file-path": "errors/415.yaml"
            }
          }
        },
        "summary": "Get an error response",
        "tags": [
          "Error responses"
        ]
      },
      "parameters": [
        {
          "description": "__Enum__ The type of the customizable error response.",
          "in": "path",
          "name": "type",
          "required": true,
          "schema": {
            "enum": [
              "API_KEY_INVALID",
              "API_KEY_FORBIDDEN",
              "QUOTA_EXCEEDED",
              "JWT_SIGNATURE_INVALID",
              "JWT_CLAIM_VALUE_INVALID"
            ],
            "example": "API_KEY_INVALID",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/type-path.yaml"
          }
        },
        {
          "description": "The unique identifier for the endpoint version.",
          "in": "path",
          "name": "versionNumber",
          "required": true,
          "schema": {
            "example": 1,
            "type": "integer"
          },
          "x-akamai": {
            "file-path": "parameters/version-number-path.yaml"
          }
        },
        {
          "description": "The unique identifier for the endpoint.",
          "in": "path",
          "name": "apiEndPointId",
          "required": true,
          "schema": {
            "example": 1,
            "type": "integer"
          },
          "x-akamai": {
            "file-path": "parameters/api-end-point-id-path.yaml"
          }
        }
      ],
      "x-akamai": {
        "file-path": "paths/type.yaml",
        "path-info": "/endpoints/{apiEndPointId}/versions/{versionNumber}/settings/error-responses/{type}"
      }
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/api-definitions/v2"
    }
  ],
  "x-akamai": {
    "auth-type": "EDGE_GRID",
    "file-path": "04-settings-resource.yaml"
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```

# Sibling pages

* [Get error response settings](https://techdocs.akamai.com/api-definitions/reference/get-error-response-setting.md)
* [Edit error response settings](https://techdocs.akamai.com/api-definitions/reference/put-error-response-setting.md)
* [Edit an error response](https://techdocs.akamai.com/api-definitions/reference/put-get-error-responses-type.md)