---
updatedAt: 2026-04-20T19:27:15.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/alerts-app/llms.txt
---

# Get definition schema

Gets the JSON schema that describes the contents of a specific type of alert, depending on the template used to create it. This is useful to validate the contents of a [new alert request](ref:post-definition) before POSTing it.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's Alerts API",
    "url": "https://techdocs.akamai.com/alerts-app/reference"
  },
  "info": {
    "title": "Schema",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/json-schema/alert-definition/{templateId}": {
      "get": {
        "description": "Gets the JSON schema that describes the contents of a specific type of alert, depending on the template used to create it. This is useful to validate the contents of a [new alert request](ref:post-definition) before POSTing it.",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Alerts API",
          "url": "https://techdocs.akamai.com/alerts-app/reference/get-schema-definition-template"
        },
        "operationId": "get-schema-definition-template",
        "parameters": [
          {
            "description": "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).\n",
            "in": "query",
            "name": "accountSwitchKey",
            "required": false,
            "schema": {
              "example": "1-5C0YLB:1-8BYUX",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/schema+json": {
                "example": {
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "description": "Alert configured with thresholds for monitoring.",
                  "links": {
                    "$schema": "http://json-schema.org/draft-04/schema#",
                    "description": "Link relations to schemas and REST endpoints",
                    "items": {
                      "href": {
                        "description": "Link to resource of type described by rel",
                        "type": "string"
                      },
                      "rel": {
                        "description": "Describes type of link",
                        "type": "string"
                      }
                    },
                    "minItems": 2,
                    "required": [
                      "rel",
                      "href"
                    ],
                    "title": "JSON link relations",
                    "type": "array",
                    "uniqueItems": true
                  },
                  "properties": {
                    "accountId": {
                      "type": "string"
                    },
                    "definitionId": {
                      "type": "string"
                    },
                    "editInfo": {
                      "properties": {
                        "active": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "createdBy": {
                          "type": "string"
                        },
                        "editAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "editBy": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "createdAt",
                        "createdBy",
                        "editAt",
                        "editBy",
                        "active"
                      ],
                      "type": "object"
                    },
                    "fields": {
                      "properties": {
                        "aca_cpcode": {
                          "items": "string",
                          "minItems": 1,
                          "type": "array",
                          "uniqueItems": true
                        },
                        "definitionId": {
                          "type": "string"
                        },
                        "email": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "emailBrief": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "emailHtmlFormat": {
                          "type": "boolean"
                        },
                        "group": {
                          "items": "string",
                          "maxItems": 1,
                          "minItems": 1,
                          "type": "array",
                          "uniqueItems": true
                        },
                        "isSum": {
                          "type": "boolean"
                        },
                        "name": {
                          "type": "string"
                        },
                        "network": {
                          "type": "string"
                        },
                        "origVisibility": {
                          "type": "string"
                        },
                        "param": {
                          "type": "number"
                        },
                        "paramName": {
                          "type": "string"
                        },
                        "templateId": {
                          "type": "string"
                        },
                        "visibility": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "aca_cpcode",
                        "definitionId",
                        "email",
                        "emailBrief",
                        "emailHtmlFormat",
                        "group",
                        "isSum",
                        "name",
                        "network",
                        "origVisibility",
                        "param",
                        "paramName",
                        "templateId",
                        "visibility"
                      ],
                      "type": "object"
                    },
                    "origin": {
                      "description": "Name of system of record",
                      "enum": [
                        "STATIC",
                        "ADAPTIVE"
                      ]
                    }
                  },
                  "required": [
                    "fields"
                  ],
                  "title": "AlertDefinition",
                  "type": "object"
                },
                "schema": {
                  "description": "JSON schema.\n",
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/schema.yaml"
                  }
                }
              }
            },
            "description": "The response provides the definition schema.\n"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "example": {
                  "clientIp": "192.0.2.0",
                  "detail": "The signature does not match",
                  "instance": "https://akab-xxxxx-xxxxx.luna.akamaiapis.net/alerts/v2/alert-definitions",
                  "method": "GET",
                  "requestId": "933ed8a4",
                  "requestTime": "2023-07-06T08:11:36Z",
                  "serverIp": "203.0.113.0",
                  "status": 401,
                  "title": "Not authorized",
                  "type": "https://problems.luna.akamaiapis.net/-/pep-authn/deny"
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "Specifies the errors.\n",
                  "properties": {
                    "clientIp": {
                      "description": "IP address of the client that requested the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "code": {
                      "description": "The error code that distinguishes each `type`.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "More information about the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "The URL you called that produced the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "method": {
                      "description": "The HTTP method you called on the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestId": {
                      "description": "Identifies each separate request.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestTime": {
                      "description": "ISO 8601 timestamp marking when the request occurred.\n",
                      "format": "date-time",
                      "type": "string"
                    },
                    "serverIp": {
                      "description": "IP address of the server.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code.\n",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "Type of error, represented as a non-navigable URI.\n",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Unauthorized error](ref:401).\n",
            "x-akamai": {
              "file-path": "errors/401.yaml"
            }
          },
          "403": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "User lacks scope on account",
                  "status": 403,
                  "title": "Authorization Error",
                  "type": "/alerts-api/error-types/AUTHZ_PROBLEM"
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "Specifies the errors.\n",
                  "properties": {
                    "clientIp": {
                      "description": "IP address of the client that requested the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "code": {
                      "description": "The error code that distinguishes each `type`.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "More information about the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "The URL you called that produced the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "method": {
                      "description": "The HTTP method you called on the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestId": {
                      "description": "Identifies each separate request.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestTime": {
                      "description": "ISO 8601 timestamp marking when the request occurred.\n",
                      "format": "date-time",
                      "type": "string"
                    },
                    "serverIp": {
                      "description": "IP address of the server.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code.\n",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "Type of error, represented as a non-navigable URI.\n",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Access is forbidden](ref:403).\n",
            "x-akamai": {
              "file-path": "errors/403.yaml"
            }
          },
          "405": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "Request method 'POST' not supported",
                  "status": 405,
                  "title": "Method Not Allowed",
                  "type": "/alerts-api/error-types/METHOD_NOT_ALLOWED"
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "Specifies the errors.\n",
                  "properties": {
                    "clientIp": {
                      "description": "IP address of the client that requested the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "code": {
                      "description": "The error code that distinguishes each `type`.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "More information about the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "The URL you called that produced the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "method": {
                      "description": "The HTTP method you called on the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestId": {
                      "description": "Identifies each separate request.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestTime": {
                      "description": "ISO 8601 timestamp marking when the request occurred.\n",
                      "format": "date-time",
                      "type": "string"
                    },
                    "serverIp": {
                      "description": "IP address of the server.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code.\n",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "Type of error, represented as a non-navigable URI.\n",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Method not allowed](ref:405).\n",
            "x-akamai": {
              "file-path": "errors/405.yaml"
            }
          },
          "500": {
            "content": {
              "application/problem+json": {
                "example": {
                  "detail": "Operation can't completed with invalid alertDefinitionId : a@123",
                  "status": 500,
                  "title": "Internal Server Error",
                  "type": "/alerts-api/error-types/INTERNAL_SERVER_ERROR"
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "Specifies the errors.\n",
                  "properties": {
                    "clientIp": {
                      "description": "IP address of the client that requested the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "code": {
                      "description": "The error code that distinguishes each `type`.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "detail": {
                      "description": "More information about the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "instance": {
                      "description": "The URL you called that produced the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "method": {
                      "description": "The HTTP method you called on the `instance` URL.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestId": {
                      "description": "Identifies each separate request.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "requestTime": {
                      "description": "ISO 8601 timestamp marking when the request occurred.\n",
                      "format": "date-time",
                      "type": "string"
                    },
                    "serverIp": {
                      "description": "IP address of the server.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "status": {
                      "description": "HTTP status code.\n",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "title": {
                      "description": "Title of the error.\n",
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": {
                      "description": "Type of error, represented as a non-navigable URI.\n",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "detail"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/problem.yaml"
                  }
                }
              }
            },
            "description": "[Server error](ref:500).\n",
            "x-akamai": {
              "file-path": "errors/500.yaml"
            }
          }
        },
        "summary": "Get definition schema",
        "tags": [
          "Alert definition"
        ]
      },
      "parameters": [
        {
          "description": "Unique identifier for the template. Template `origin` types that are `STATIC` and `ADAPTIVE` are distinguished with `s@` and `a@` prefixes.\n",
          "in": "path",
          "name": "templateId",
          "required": true,
          "schema": {
            "example": "s@44",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/templateId-path.yaml"
          }
        }
      ]
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/alerts/v2"
    }
  ],
  "x-akamai": {
    "auth-type": "EDGE_GRID",
    "file-path": "Schema.yaml"
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```