---
title: Cancel a scheduled activation
slug: api-documentation/vjTd-cancel-a-scheduled-activation
docTags: 
createdAt: 2026-10-09T16:36:44.630Z
---

{
  "id": "DPDBXd2malsDHYuog0zy1",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://localhost:8080/idgen/templates/{name}/versions/{version}/cancel",
    "servers": [
      {
        "url": "{baseUrl}/idgen/templates/{name}/versions/{version}/cancel",
        "description": "The API gateway, or the service itself (port 8080).",
        "variables": {
          "baseUrl": {
            "default": "http://localhost:8080",
            "description": "Scheme and host, e.g. https://<gateway>. No trailing slash."
          }
        }
      }
    ],
    "name": "Cancel a scheduled activation",
    "description": "<p>Returns a SCHEDULED version to DRAFT. Needs <code>idgen.templates.write</code>.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "name",
          "type": "string",
          "description": "<p>The template name (<code>^[a-z][a-z0-9._-]{0,63}$</code>).</p>"
        },
        {
          "kind": "required",
          "name": "version",
          "type": "integer<int32>",
          "description": "<p>The version number (from 1).</p>",
          "format": "int32"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>A JWT from authentication-svc. The tenant comes from the token.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>The version, a DRAFT again.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "A format version of a namespace and its state.",
            "customType": "VersionDto",
            "schema": [
              {
                "name": "version",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The version number, from 1.</p>",
                "format": "int32"
              },
              {
                "name": "state",
                "kind": "required",
                "type": "string",
                "description": "<p>DRAFT (never activated), SCHEDULED (activates at a future time), ACTIVE (IDs come from it) or RETIRED (replaced by a later activation). Derived from the activations at the time of the request.</p>"
              },
              {
                "name": "separator",
                "kind": "required",
                "type": "string",
                "description": "Placed between consecutive segments."
              },
              {
                "name": "segments",
                "kind": "optional",
                "type": "array",
                "description": "The ordered segments.",
                "modelRef": "#/components/schemas/SegmentDto",
                "customType": "SegmentDto[]",
                "schema": [
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>STATIC, INTEGER_SEQUENCE, STRING_SEQUENCE or UUID.</p>"
                  },
                  {
                    "name": "value",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>STATIC: the literal text (printable ASCII, no spaces).</p>"
                  },
                  {
                    "name": "start",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "<p>INTEGER_SEQUENCE: the first value (>= 0). Required.</p>",
                    "format": "int64"
                  },
                  {
                    "name": "end",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "<p>INTEGER_SEQUENCE: the last value (inclusive). Only the leftmost dynamic segment of a version may omit it (unbounded).</p>",
                    "format": "int64"
                  },
                  {
                    "name": "step",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "<p>INTEGER_SEQUENCE: the increment between consecutive values. Default 1.</p>",
                    "format": "int64"
                  },
                  {
                    "name": "padding",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "<p>INTEGER_SEQUENCE: the minimum width, left-padded with zeros (0-19). Default 0.</p>",
                    "format": "int32"
                  },
                  {
                    "name": "charset",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>STRING_SEQUENCE: NUMERIC, UPPER, LOWER, ALPHANUMERIC_UPPER, ALPHANUMERIC, ALPHANUMERIC_NO_AMBIGUOUS (Crockford) or CUSTOM.</p>"
                  },
                  {
                    "name": "chars",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>STRING_SEQUENCE with charset CUSTOM: at least 2 distinct printable characters, in sequence order.</p>"
                  },
                  {
                    "name": "length",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "<p>STRING_SEQUENCE: the number of characters (1-16).</p>",
                    "format": "int32"
                  },
                  {
                    "name": "startText",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>STRING_SEQUENCE: the first value, exactly <code>length</code> characters of the charset. Default: the lowest.</p>"
                  },
                  {
                    "name": "endText",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>STRING_SEQUENCE: the last value (inclusive), exactly <code>length</code> characters of the charset. Default: the highest.</p>"
                  }
                ]
              },
              {
                "name": "blockSize",
                "kind": "required",
                "type": "integer<int32>",
                "description": "How many positions a node reserves at once.",
                "format": "int32"
              },
              {
                "name": "continuesFrom",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "<p>The earlier version whose sequence this one carries on, if any.</p>",
                "format": "int32"
              },
              {
                "name": "activatedAt",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "<p>When the version was (or is scheduled to be) activated.</p>",
                "format": "date-time"
              },
              {
                "name": "createdAt",
                "kind": "required",
                "type": "string<date-time>",
                "description": "When the version was added.",
                "format": "date-time"
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources: <code>self</code> and <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/VersionDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>INVALID_REQUEST: a malformed path or body value, or an invalid name.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>UNAUTHENTICATED: missing, expired or invalid credentials.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "<p>FORBIDDEN: the caller lacks the <code>idgen.templates.write</code> permission, or its tenant or site scope does not match.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "<p>NAMESPACE_NOT_FOUND or VERSION_NOT_FOUND: no such template or version.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "<p>VERSION_NOT_MUTABLE: the version's state does not allow this change.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>INTERNAL_ERROR: an unexpected failure. Retry once, then report it with the <code>x-request-id</code>.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "503",
        "description": "<p>AUTH_UNAVAILABLE or BACKEND_UNAVAILABLE (both retryable): retry with backoff.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The body of every error response. Branch on <code>error</code>, never on <code>message</code>.</p>",
            "customType": "ErrorDto",
            "schema": [
              {
                "name": "error",
                "kind": "required",
                "type": "string",
                "description": "<p>The machine-readable error code, e.g. NAMESPACE_NOT_FOUND or FORMAT_OVERLAP.</p>"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable explanation.</p>"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "integer<int32>",
                "description": "<p>The HTTP status code, repeated.</p>",
                "format": "int32"
              },
              {
                "name": "details",
                "kind": "required",
                "type": "map",
                "description": "<p>Structured context: <code>retryable</code> (whether the same request can succeed later) and, depending on the code, <code>namespace</code>, <code>version</code>, <code>templateExists</code>, <code>conflictingVersion</code> and <code>exampleId</code>.</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "map",
                "description": "<p>Related resources, e.g. <code>namespace</code> (paths under /idgen).</p>",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/ErrorDto",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "c15Acwpa8ukf3Sr5A0t3i",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url http://localhost:8080/idgen/templates/{name}/versions/{version}/cancel \\\n     --header 'accept: application/json'"
        },
        {
          "id": "BM4Ew6EwVwm1Ka7RZyZuZ",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:8080/idgen/templates/{name}/versions/{version}/cancel\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "0d52XgFS-XpgbT9885fhH",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:8080/idgen/templates/{name}/versions/{version}/cancel\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "fJ7gTBiLKh5NJJb2gvnh1",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:8080/idgen/templates/{name}/versions/{version}/cancel\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "c15Acwpa8ukf3Sr5A0t3i"
    },
    "results": {
      "languages": [
        {
          "id": "jdDwLkY_MYUNn73_PIUSi",
          "language": "200",
          "code": "// The version, a DRAFT again.\n{\n  \"version\": \"\",\n  \"state\": \"\",\n  \"separator\": \"\",\n  \"segments\": [\n    {\n      \"type\": \"\",\n      \"value\": \"\",\n      \"start\": \"\",\n      \"end\": \"\",\n      \"step\": \"\",\n      \"padding\": \"\",\n      \"charset\": \"\",\n      \"chars\": \"\",\n      \"length\": \"\",\n      \"startText\": \"\",\n      \"endText\": \"\"\n    }\n  ],\n  \"blockSize\": \"\",\n  \"continuesFrom\": \"\",\n  \"activatedAt\": \"\",\n  \"createdAt\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "pQ52tTnPQ80JEgWBRfDQO",
          "language": "400",
          "code": "// INVALID_REQUEST: a malformed path or body value, or an invalid name.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "bxNzKtomsM9fBTmmxFjAC",
          "language": "401",
          "code": "// UNAUTHENTICATED: missing, expired or invalid credentials.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "UmOuRA9jqfVaTbAhvsgEa",
          "language": "403",
          "code": "// FORBIDDEN: the caller lacks the idgen.templates.write permission, or its tenant or site scope does not match.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "FO4_3wk2h0ko72tpZcLhb",
          "language": "404",
          "code": "// NAMESPACE_NOT_FOUND or VERSION_NOT_FOUND: no such template or version.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "BdqHTsr4L3cwKphuF_7N0",
          "language": "409",
          "code": "// VERSION_NOT_MUTABLE: the version's state does not allow this change.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "CjrGl4V4yfWpwimeZUaf_",
          "language": "500",
          "code": "// INTERNAL_ERROR: an unexpected failure. Retry once, then report it with the x-request-id.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        },
        {
          "id": "tpp_v9Oe0d14OvHdhKPYq",
          "language": "503",
          "code": "// AUTH_UNAVAILABLE or BACKEND_UNAVAILABLE (both retryable): retry with backoff.\n{\n  \"error\": \"\",\n  \"message\": \"\",\n  \"status\": \"\",\n  \"details\": \"\",\n  \"links\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "jdDwLkY_MYUNn73_PIUSi"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}