{
  "openapi": "3.0.4",
  "info": {
    "title": "axesFlip Cloud API",
    "description": "### Overview\n\nThe axesFlip Cloud API, developed by axes4, provides a cloud-based SaaS solution for remediating untagged or inaccessible PDF documents into fully PDF/UA-compliant accessible files.\n\nBy leveraging a template-driven architecture, the service ensures that document remediation is consistent, scalable, and aligned with specific document structures and formatting requirements.\n\n### Template Management\n\nTemplates are created using the axesFlip Designer, where document structures such as headings, tables, and alternative text can be defined. These templates can be uploaded and managed directly within the axesFlip Cloud API. Templates may be created independently or with support from axes4 experts.\n\n### Processing & Integration\n\nThe API applies these templates to perform consistent and accurate semantic tagging, enabling reliable remediation at scale. It is designed for integration into automated workflows, follows RESTful principles, and supports secure communication over HTTPS.\n\n### Getting started\n\nUse the base URL shown in the `Servers` section above. The production base URL is `https://api.axes4.com/flip/cloud`; the development base URL is `https://dev-api.axes4.com/flip/cloud`.\n\nReplace `{subscriptionId}` in each endpoint path with your subscription ID. All requests require HTTPS and a valid API key.\n\n### Authentication\n\nSend your API key in the `x-api-key` request header. The subscription is selected by the `{subscriptionId}` path value. Templates are isolated per subscription and can only be accessed with the same `subscriptionId` and its credentials. You can verify the service and your credentials with `GET /v1/{subscriptionId}/health/ping/auth`.\n\n### Template identifiers\n\nA `templateId` must match `^[a-z0-9]([a-z0-9-]*[a-z0-9])?$`: use lowercase letters, digits, and hyphens, and do not start or end with a hyphen. Template IDs must be unique within a subscription.\n\n### File size limits\n\nThe maximum file size is 10 MB for remediation PDFs and for template uploads using `POST` or updates using `PUT`. Requests exceeding this limit return `413 Request Entity Too Large`.\n\n### Typical workflow\n\n1. Call the authenticated ping endpoint to check service availability and credentials.\n2. Upload a template as a ZIP archive (`application/zip`), typically a `.flip` file, using `POST /v1/{subscriptionId}/templates/{templateId}` or `PUT /v1/{subscriptionId}/templates/{templateId}`.\n3. Send a PDF (`application/pdf`) to `POST /v1/{subscriptionId}/remediation/remediate?templateId={templateId}` to receive the remediated PDF.\n\nSet the optional `diagnosticEnabled=true` query parameter when you want diagnostic data saved for failed remediation requests.\n\n### Content types\n\n- Template uploads: `application/zip` (ZIP archive, typically a `.flip` file).\n- Remediation request and successful response: `application/pdf`.\n- Metadata and error responses with a body: `application/json`.\n\n### Template revision headers\n\nThe x-template-id, x-template-revision and x-template-modified-at response headers identify the template version a response refers to. They are returned by remediation, template upload and template update requests, and may also appear on error responses. Each header is omitted when its value is unknown. Use x-template-revision to verify which template revision was applied, and include it when contacting support.\n\n### Errors\n\nWhen an error response includes a JSON body, it contains `errorCode`, `message`, and `invocationId`. Some endpoints, such as `HEAD`, communicate the outcome through the HTTP status code alone and return no JSON body; for example, a `404` response from such an endpoint is the result of the check, not an error requiring a JSON body.                       Share the `invocationId` with support when troubleshooting an error.\n### Code samples\n\nCode samples are provided for convenience only. axes4 does not provide support for issues related to code samples, and the availability of a code sample in a specific technology does not imply support for that technology.\n\n### Documentation\n\nFor comprehensive documentation, examples, and integration guides, see:\n\nhttps://docs.axes4.com/flip/cloud\n\n### OpenAPI specification\n\nThe public OpenAPI v3 specification is available at <https://api.axes4.com/flip/cloud/spec/openapi/v3> and can be imported into an API client or IDE.",
    "termsOfService": "https://www.axes4.com/tc-axesFlip",
    "contact": {
      "name": "axes4 Support",
      "url": "https://www.axes4.com/contact",
      "email": "support@axes4.com"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.axes4.com/flip/cloud"
    }
  ],
  "paths": {
    "/v1/{subscriptionId}/templates/{templateId}": {
      "head": {
        "tags": [
          "Template"
        ],
        "summary": "Check if a template exists",
        "description": "Verifies whether the template associated with the given template ID exists.",
        "operationId": "Exists",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          },
          {
            "name": "templateId",
            "in": "path",
            "description": "The unique template ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/templateId"
            },
            "example": "example-template"
          }
        ],
        "responses": {
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          },
          "200": {
            "description": "The specified template exists."
          },
          "400": {
            "description": "The specified template ID is invalid."
          },
          "404": {
            "description": "The specified template does not exist."
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists."
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "const string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nconst string templateId = \"example-template\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nhttpClient.DefaultRequestHeaders.Add(\"x-api-key\", apiKey);\nusing var request = new HttpRequestMessage(\n    HttpMethod.Head,\n    $\"{baseUrl}/v1/{subscriptionId}/templates/{Uri.EscapeDataString(templateId)}\");\nusing var response = await httpClient.SendAsync(request);\nif (response.StatusCode == System.Net.HttpStatusCode.NotFound)\n{\n    Console.WriteLine(\"The template does not exist.\");\n    return;\n}\n\nresponse.EnsureSuccessStatusCode();\nConsole.WriteLine(\"The template exists.\");"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Check whether a template exists with an authenticated HEAD request. Requires Node.js 18 or later.\n\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst TEMPLATE_ID = \"example-template\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}`, {\n        method: \"HEAD\",\n        headers: { \"x-api-key\": API_KEY },\n        signal: AbortSignal.timeout(30_000),\n    });\n    if (response.status === 404) {\n        console.log(\"The template does not exist.\");\n        return;\n    }\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}.`);\n    }\n\n    console.log(\"The template exists.\");\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Check whether a template exists with an authenticated HEAD request. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID = \"example-template\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nresponse = requests.head(\n    f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/templates/{TEMPLATE_ID}\",\n    headers={\"x-api-key\": API_KEY},\n    timeout=(10, 30),\n)\nif response.status_code == 404:\n    print(\"The template does not exist.\")\nelse:\n    response.raise_for_status()\n    print(\"The template exists.\")\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID=\"example-template\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\nhttp_status=$(curl --silent --show-error --head \\\n  --output /dev/null \\\n  --write-out '%{http_code}' \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\")\n\nif [[ \"$http_status\" == \"404\" ]]; then\n  printf 'The template does not exist.\\n'\nelif [[ \"$http_status\" =~ ^2[0-9][0-9]$ ]]; then\n  printf 'The template exists.\\n'\nelse\n  printf 'Request failed with HTTP status %s.\\n' \"$http_status\" >&2\n  exit 1\nfi\n"
          }
        ]
      },
      "post": {
        "tags": [
          "Template"
        ],
        "summary": "Upload a template",
        "description": "Creates a new template using the provided template data.",
        "operationId": "CreateTemplate",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          },
          {
            "name": "templateId",
            "in": "path",
            "description": "The unique template ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/templateId"
            },
            "example": "example-template"
          }
        ],
        "requestBody": {
          "description": "Template archive containing the template files. The file typically uses the .flip extension but must be a valid ZIP archive.",
          "content": {
            "application/zip": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "415": {
            "description": "The request's media type is not supported. Submit the file as a ZIP archive using a supported content type (application/zip).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "413": {
            "description": "The request could not be processed because the request entity is too large. Please reduce the size of the request and try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "400": {
            "description": "The request could not be processed due to invalid or missing input. Ensure all required fields and headers are correctly provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "409": {
            "description": "The request cannot be completed due to a conflict with the current state of the template or storage resource. Resolve the conflict and retry the request.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "503": {
            "description": "The service is currently unable to accept the request due to resource constraints. Please retry after some time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          },
          "201": {
            "description": "The template was successfully created.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "// Replace these documentation-safe values with your own API details and local file paths.\nconst string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nconst string templateId = \"example-template\";\nconst string templateFilePath = \"example-template.flip\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nawait using var templateFile = File.OpenRead(templateFilePath);\nusing var request = new HttpRequestMessage(\n    HttpMethod.Post,\n    $\"{baseUrl}/v1/{subscriptionId}/templates/{Uri.EscapeDataString(templateId)}\")\n{\n    Content = new StreamContent(templateFile),\n};\nrequest.Headers.Add(\"x-api-key\", apiKey);\nrequest.Content.Headers.ContentType = new MediaTypeHeaderValue(\"application/zip\");\n\nusing var response = await httpClient.SendAsync(request, cancellationToken);\nresponse.EnsureSuccessStatusCode();"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Upload a local `.flip` ZIP archive as a streamed request body. Requires Node.js 18 or later.\n\nconst { createReadStream } = require(\"node:fs\");\n\n// Replace these documentation-safe values with your own API details and local file paths.\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst TEMPLATE_ID = \"example-template\";\nconst TEMPLATE_FILE_PATH = \"example-template.flip\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}`, {\n        method: \"POST\",\n        headers: { \"x-api-key\": API_KEY, \"Content-Type\": \"application/zip\" },\n        body: createReadStream(TEMPLATE_FILE_PATH),\n        duplex: \"half\",\n        signal: AbortSignal.timeout(120_000),\n    });\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}: ${await response.text()}`);\n    }\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Upload a local `.flip` ZIP archive as a streamed request body. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID = \"example-template\"\nTEMPLATE_FILE_PATH = \"example-template.flip\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nurl = f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/templates/{TEMPLATE_ID}\"\nwith open(TEMPLATE_FILE_PATH, \"rb\") as template_file:\n    response = requests.post(\n        url,\n        headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/zip\"},\n        data=template_file,\n        timeout=(10, 120),\n    )\n    response.raise_for_status()\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID=\"example-template\"\nTEMPLATE_FILE_PATH=\"example-template.flip\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\ncurl --silent --show-error --fail-with-body \\\n  --request POST \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\" \\\n  --header \"Content-Type: application/zip\" \\\n  --data-binary \"@${TEMPLATE_FILE_PATH}\"\n"
          }
        ]
      },
      "get": {
        "tags": [
          "Template"
        ],
        "summary": "Get template metadata",
        "description": "Retrieves metadata and information about the specified template.",
        "operationId": "GetTemplateMetadata",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          },
          {
            "name": "templateId",
            "in": "path",
            "description": "The unique template ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/templateId"
            },
            "example": "example-template"
          }
        ],
        "responses": {
          "200": {
            "description": "The metadata for the requested template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/templateInfo"
                }
              }
            }
          },
          "400": {
            "description": "The request could not be processed due to invalid or missing input. Ensure all required fields and headers are correctly provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "404": {
            "description": "The specified template could not be found. Verify that the template ID is correct or still exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "409": {
            "description": "The request cannot be completed due to a conflict with the current state of the template or storage resource. Resolve the conflict and retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "const string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nconst string templateId = \"example-template\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nhttpClient.DefaultRequestHeaders.Add(\"x-api-key\", apiKey);\nusing var response = await httpClient.GetAsync(\n    $\"{baseUrl}/v1/{subscriptionId}/templates/{Uri.EscapeDataString(templateId)}\");\nif (response.StatusCode == System.Net.HttpStatusCode.NotFound)\n{\n    Console.WriteLine(\"The template was not found.\");\n    return;\n}\n\nresponse.EnsureSuccessStatusCode();\n\nvar metadata = await response.Content.ReadFromJsonAsync<JsonElement>();\nConsole.WriteLine(JsonSerializer.Serialize(metadata, new JsonSerializerOptions { WriteIndented = true }));"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Retrieve and print metadata for a template. Requires Node.js 18 or later.\n\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst TEMPLATE_ID = \"example-template\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}`, {\n        headers: { \"x-api-key\": API_KEY },\n        signal: AbortSignal.timeout(60_000),\n    });\n    if (response.status === 404) {\n        console.log(\"The template was not found.\");\n        return;\n    }\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}: ${await response.text()}`);\n    }\n\n    console.log(await response.json());\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Retrieve and print metadata for a template. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID = \"example-template\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nresponse = requests.get(\n    f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/templates/{TEMPLATE_ID}\",\n    headers={\"x-api-key\": API_KEY},\n    timeout=(10, 60),\n)\nif response.status_code == 404:\n    print(\"The template was not found.\")\nelse:\n    response.raise_for_status()\n    print(response.json())\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID=\"example-template\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\nresponse_file=$(mktemp)\ntrap 'rm -f \"$response_file\"' EXIT\n\nhttp_status=$(curl --silent --show-error \\\n  --output \"$response_file\" \\\n  --write-out '%{http_code}' \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\")\n\nif [[ \"$http_status\" == \"404\" ]]; then\n  printf 'The template was not found.\\n'\nelif [[ \"$http_status\" =~ ^2[0-9][0-9]$ ]]; then\n  cat \"$response_file\"\nelse\n  printf 'Request failed with HTTP status %s.\\n' \"$http_status\" >&2\n  cat \"$response_file\" >&2\n  exit 1\nfi\n"
          }
        ]
      },
      "put": {
        "tags": [
          "Template"
        ],
        "summary": "Update an existing template",
        "description": "Replaces the specified template with the uploaded archive.",
        "operationId": "UpdateTemplate",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          },
          {
            "name": "templateId",
            "in": "path",
            "description": "The unique template ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/templateId"
            },
            "example": "example-template"
          }
        ],
        "requestBody": {
          "description": "Template archive containing the template files. The file typically uses the .flip extension but must be a valid ZIP archive.",
          "content": {
            "application/zip": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "415": {
            "description": "The request's media type is not supported. Submit the file as a ZIP archive using a supported content type (application/zip).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "413": {
            "description": "The request could not be processed because the request entity is too large. Please reduce the size of the request and try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "400": {
            "description": "The request could not be processed due to invalid or missing input. Ensure all required fields and headers are correctly provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "404": {
            "description": "The specified template could not be found. Verify that the template ID is correct or still exists.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "409": {
            "description": "The request cannot be completed due to a conflict with the current state of the template or storage resource. Resolve the conflict and retry the request.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "503": {
            "description": "The service is currently unable to accept the request due to resource constraints. Please retry after some time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          },
          "204": {
            "description": "The template was successfully updated.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "// Replace these documentation-safe values with your own API details and local file paths.\nconst string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nconst string templateId = \"example-template\";\nconst string templateFilePath = \"updated-template.flip\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nawait using var templateFile = File.OpenRead(templateFilePath);\nusing var request = new HttpRequestMessage(\n    HttpMethod.Put,\n    $\"{baseUrl}/v1/{subscriptionId}/templates/{Uri.EscapeDataString(templateId)}\")\n{\n    Content = new StreamContent(templateFile),\n};\nrequest.Headers.Add(\"x-api-key\", apiKey);\nrequest.Content.Headers.ContentType = new MediaTypeHeaderValue(\"application/zip\");\n\nusing var response = await httpClient.SendAsync(request, cancellationToken);\nresponse.EnsureSuccessStatusCode();"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Upload a replacement `.flip` ZIP archive as a streamed request body. Requires Node.js 18 or later.\n\nconst { createReadStream } = require(\"node:fs\");\n\n// Replace these documentation-safe values with your own API details and local file paths.\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst TEMPLATE_ID = \"example-template\";\nconst TEMPLATE_FILE_PATH = \"updated-template.flip\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}`, {\n        method: \"PUT\",\n        headers: { \"x-api-key\": API_KEY, \"Content-Type\": \"application/zip\" },\n        body: createReadStream(TEMPLATE_FILE_PATH),\n        duplex: \"half\",\n        signal: AbortSignal.timeout(120_000),\n    });\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}: ${await response.text()}`);\n    }\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Upload a replacement `.flip` ZIP archive as a streamed request body. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID = \"example-template\"\nTEMPLATE_FILE_PATH = \"updated-template.flip\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nurl = f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/templates/{TEMPLATE_ID}\"\nwith open(TEMPLATE_FILE_PATH, \"rb\") as template_file:\n    response = requests.put(\n        url,\n        headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/zip\"},\n        data=template_file,\n        timeout=(10, 120),\n    )\n    response.raise_for_status()\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID=\"example-template\"\nTEMPLATE_FILE_PATH=\"updated-template.flip\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\ncurl --silent --show-error --fail-with-body \\\n  --request PUT \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\" \\\n  --header \"Content-Type: application/zip\" \\\n  --data-binary \"@${TEMPLATE_FILE_PATH}\"\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "Template"
        ],
        "summary": "Delete a template",
        "description": "Permanently deletes the specified template. This operation is idempotent: deleting a template that does not exist also returns `204 No Content`.",
        "operationId": "DeleteTemplate",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          },
          {
            "name": "templateId",
            "in": "path",
            "description": "The unique template ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/templateId"
            },
            "example": "example-template"
          }
        ],
        "responses": {
          "400": {
            "description": "The request could not be processed due to invalid or missing input. Ensure all required fields and headers are correctly provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "409": {
            "description": "The request cannot be completed due to a conflict with the current state of the template or storage resource. Resolve the conflict and retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          },
          "204": {
            "description": "The template was deleted, or it did not exist. In both cases, the template no longer exists after this call."
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "const string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nconst string templateId = \"example-template\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nhttpClient.DefaultRequestHeaders.Add(\"x-api-key\", apiKey);\nusing var response = await httpClient.DeleteAsync(\n    $\"{baseUrl}/v1/{subscriptionId}/templates/{Uri.EscapeDataString(templateId)}\");\nresponse.EnsureSuccessStatusCode();\nConsole.WriteLine(\"The template was deleted or did not exist.\");"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Delete a template; the API returns 204 No Content. Requires Node.js 18 or later.\n\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst TEMPLATE_ID = \"example-template\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}`, {\n        method: \"DELETE\",\n        headers: { \"x-api-key\": API_KEY },\n        signal: AbortSignal.timeout(60_000),\n    });\n    if (response.status !== 204) {\n        throw new Error(`Expected 204 No Content, received ${response.status}.`);\n    }\n\n    console.log(\"The template was deleted or did not exist.\");\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Delete a template; the API returns 204 No Content. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID = \"example-template\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nresponse = requests.delete(\n    f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/templates/{TEMPLATE_ID}\",\n    headers={\"x-api-key\": API_KEY},\n    timeout=(10, 60),\n)\nresponse.raise_for_status()\nif response.status_code != 204:\n    raise RuntimeError(f\"Expected 204 No Content, received {response.status_code}.\")\nprint(\"The template was deleted or did not exist.\")\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID=\"example-template\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\ncurl --silent --show-error --fail-with-body \\\n  --request DELETE \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\"\n"
          }
        ]
      }
    },
    "/v1/{subscriptionId}/templates": {
      "get": {
        "tags": [
          "Template"
        ],
        "summary": "List all available templates",
        "description": "Retrieves a collection of all available templates.",
        "operationId": "ListTemplates",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of all available templates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/templateInfo"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request could not be processed due to invalid or missing input. Ensure all required fields and headers are correctly provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "409": {
            "description": "The request cannot be completed due to a conflict with the current state of the template or storage resource. Resolve the conflict and retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "const string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nhttpClient.DefaultRequestHeaders.Add(\"x-api-key\", apiKey);\nusing var response = await httpClient.GetAsync($\"{baseUrl}/v1/{subscriptionId}/templates\");\nresponse.EnsureSuccessStatusCode();\n\nvar templates = await response.Content.ReadFromJsonAsync<JsonElement>();\nConsole.WriteLine(JsonSerializer.Serialize(templates, new JsonSerializerOptions { WriteIndented = true }));"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// List the templates available to a subscription. Requires Node.js 18 or later.\n\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates`, {\n        headers: { \"x-api-key\": API_KEY },\n        signal: AbortSignal.timeout(60_000),\n    });\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}: ${await response.text()}`);\n    }\n\n    console.log(await response.json());\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"List the templates available to a subscription. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nresponse = requests.get(\n    f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/templates\",\n    headers={\"x-api-key\": API_KEY},\n    timeout=(10, 60),\n)\nresponse.raise_for_status()\nprint(response.json())\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\ncurl --silent --show-error --fail-with-body \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\"\n"
          }
        ]
      }
    },
    "/v1/{subscriptionId}/templates/{templateId}/content": {
      "get": {
        "tags": [
          "Template"
        ],
        "summary": "Download template content",
        "description": "Retrieves the binary ZIP archive containing the files associated with the specified template.",
        "operationId": "GetTemplateContent",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          },
          {
            "name": "templateId",
            "in": "path",
            "description": "The unique template ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/templateId"
            },
            "example": "example-template"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the requested template file as a ZIP archive.",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The request could not be processed due to invalid or missing input. Ensure all required fields and headers are correctly provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "404": {
            "description": "The specified template does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "409": {
            "description": "The request cannot be completed due to a conflict with the current state of the template or storage resource. Resolve the conflict and retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "// Replace these documentation-safe values with your own API details and local file paths.\nconst string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nconst string templateId = \"example-template\";\nconst string downloadedTemplatePath = \"downloaded-template.zip\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nusing var request = new HttpRequestMessage(\n    HttpMethod.Get,\n    $\"{baseUrl}/v1/{subscriptionId}/templates/{Uri.EscapeDataString(templateId)}/content\");\nrequest.Headers.Add(\"x-api-key\", apiKey);\n\nusing var response = await httpClient.SendAsync(\n    request,\n    HttpCompletionOption.ResponseHeadersRead,\n    cancellationToken);\nif (response.StatusCode == System.Net.HttpStatusCode.NotFound)\n{\n    Console.WriteLine(\"Template content was not found.\");\n    return;\n}\n\nresponse.EnsureSuccessStatusCode();\n\nawait using var output = File.Create(downloadedTemplatePath);\nawait response.Content.CopyToAsync(output, cancellationToken);"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Download template ZIP content and stream it to a local file. Requires Node.js 18 or later.\n\nconst { createWriteStream } = require(\"node:fs\");\nconst { Readable } = require(\"node:stream\");\nconst { pipeline } = require(\"node:stream/promises\");\n\n// Replace these documentation-safe values with your own API details and local file paths.\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst TEMPLATE_ID = \"example-template\";\nconst OUTPUT_TEMPLATE_PATH = \"downloaded-template.zip\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}/content`, {\n        headers: { \"x-api-key\": API_KEY },\n        signal: AbortSignal.timeout(120_000),\n    });\n    if (response.status === 404) {\n        console.log(\"Template content was not found.\");\n        return;\n    }\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}: ${await response.text()}`);\n    }\n    if (!response.body) {\n        throw new Error(\"The template response did not contain a ZIP body.\");\n    }\n\n    await pipeline(Readable.fromWeb(response.body), createWriteStream(OUTPUT_TEMPLATE_PATH));\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Download template ZIP content and stream it to a local file. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID = \"example-template\"\nOUTPUT_TEMPLATE_PATH = \"downloaded-template.zip\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nurl = f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/templates/{TEMPLATE_ID}/content\"\nwith requests.get(\n    url,\n    headers={\"x-api-key\": API_KEY},\n    timeout=(10, 120),\n    stream=True,\n) as response:\n    if response.status_code == 404:\n        print(\"Template content was not found.\")\n    else:\n        response.raise_for_status()\n        with open(OUTPUT_TEMPLATE_PATH, \"wb\") as output_file:\n            for chunk in response.iter_content(chunk_size=1024 * 1024):\n                if chunk:\n                    output_file.write(chunk)\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID=\"example-template\"\nOUTPUT_TEMPLATE_PATH=\"downloaded-template.zip\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\ndownloaded_template=$(mktemp)\ntrap 'rm -f \"$downloaded_template\"' EXIT\n\nhttp_status=$(curl --silent --show-error \\\n  --request GET \\\n  --output \"$downloaded_template\" \\\n  --write-out '%{http_code}' \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/templates/${TEMPLATE_ID}/content\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\")\n\nif [[ \"$http_status\" == \"404\" ]]; then\n  printf 'Template content was not found.\\n'\nelif [[ \"$http_status\" =~ ^2[0-9][0-9]$ ]]; then\n  mv \"$downloaded_template\" \"$OUTPUT_TEMPLATE_PATH\"\nelse\n  printf 'Request failed with HTTP status %s.\\n' \"$http_status\" >&2\n  cat \"$downloaded_template\" >&2\n  exit 1\nfi\n"
          }
        ]
      }
    },
    "/v1/{subscriptionId}/remediation/remediate": {
      "post": {
        "tags": [
          "Remediation"
        ],
        "summary": "Remediate PDF",
        "description": "Processes and tags a PDF document based on the specified template, returning the fully remediated PDF.",
        "operationId": "Remediate",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          },
          {
            "name": "templateId",
            "in": "query",
            "description": "The unique template ID",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/templateId"
            },
            "example": "example-template"
          },
          {
            "name": "diagnosticEnabled",
            "in": "query",
            "description": "Enables diagnostic logging for failed remediation requests. When active, the service securely stores the request data (PDF and template) to support troubleshooting. A unique reference ID is returned with the error and can be shared with support for faster issue resolution.",
            "schema": {
              "type": "boolean"
            },
            "example": true
          }
        ],
        "requestBody": {
          "description": "The PDF content to be remediated",
          "content": {
            "application/pdf": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The PDF was successfully remediated and returned in the response body.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "The request could not be processed due to invalid or missing input. Ensure all required fields and headers are correctly provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "415": {
            "description": "The request's media type is not supported. Submit the PDF using a supported content type (application/pdf).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "404": {
            "description": "The specified template could not be found. Verify that the template ID is correct or still exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "409": {
            "description": "The request cannot be completed due to a conflict with the current state of the template or storage resource. Resolve the conflict and retry the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "422": {
            "description": "The PDF content is valid but could not be processed due to semantic issues or document structure problems. The server understood the request but cannot remediate the provided PDF.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "429": {
            "description": "The request could not be processed because a rate limit was exceeded or the service is currently under high load. Please retry later.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "504": {
            "description": "The request could not be processed because the server took too long to respond. Please retry after some time.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "413": {
            "description": "The request could not be processed because the request entity is too large. Please reduce the size of the request and try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "503": {
            "description": "The service is currently unable to accept the request due to resource constraints. Please retry after some time.",
            "headers": {
              "x-template-id": {
                "description": "The ID of the template this response refers to. Omitted if the request failed before the template could be determined.",
                "schema": {
                  "type": "string"
                }
              },
              "x-template-revision": {
                "description": "The revision number of the template that was used or stored. Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "x-template-modified-at": {
                "description": "When the template was last modified, as recorded in the template (ISO 8601). Omitted if it is unknown, for example because the template contains no metadata or the request failed before the template was loaded.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "// Replace these documentation-safe values with your own API details and local file paths.\nconst string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nconst string templateId = \"example-template\";\nconst string inputPdfPath = \"input.pdf\";\nconst string outputPdfPath = \"remediated.pdf\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient { Timeout = TimeSpan.FromMinutes(15) };\nawait using var inputPdf = File.OpenRead(inputPdfPath);\nusing var request = new HttpRequestMessage(\n    HttpMethod.Post,\n    $\"{baseUrl}/v1/{subscriptionId}/remediation/remediate?templateId={Uri.EscapeDataString(templateId)}\")\n{\n    Content = new StreamContent(inputPdf),\n};\nrequest.Headers.Add(\"x-api-key\", apiKey);\nrequest.Content.Headers.ContentType = new MediaTypeHeaderValue(\"application/pdf\");\n\nusing var response = await httpClient.SendAsync(\n    request,\n    HttpCompletionOption.ResponseHeadersRead,\n    cancellationToken);\n\n// For 429/503, wait for Retry-After before a bounded retry. Retry transient timeouts and 502/504\n// failures with backoff when replaying the PDF request is safe for your integration.\nresponse.EnsureSuccessStatusCode();\n\nawait using var outputPdf = File.Create(outputPdfPath);\nawait response.Content.CopyToAsync(outputPdf, cancellationToken);"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Stream a PDF to remediation and save the returned PDF. Requires Node.js 18 or later.\n\nconst { createReadStream, createWriteStream } = require(\"node:fs\");\nconst { Readable } = require(\"node:stream\");\nconst { pipeline } = require(\"node:stream/promises\");\n\n// Replace these documentation-safe values with your own API details and local file paths.\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst TEMPLATE_ID = \"example-template\";\nconst INPUT_PDF_PATH = \"input.pdf\";\nconst OUTPUT_PDF_PATH = \"remediated.pdf\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const url = `${BASE_URL}/v1/${SUBSCRIPTION_ID}/remediation/remediate?templateId=${TEMPLATE_ID}`;\n    // No automatic retries: reopen the input file for every manual retry and honor Retry-After for 429/503.\n    const response = await fetch(url, {\n        method: \"POST\",\n        headers: { \"x-api-key\": API_KEY, \"Content-Type\": \"application/pdf\" },\n        body: createReadStream(INPUT_PDF_PATH),\n        duplex: \"half\",\n        signal: AbortSignal.timeout(900_000),\n    });\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}: ${await response.text()}`);\n    }\n    if (!response.body) {\n        throw new Error(\"The remediation response did not contain a PDF body.\");\n    }\n\n    await pipeline(Readable.fromWeb(response.body), createWriteStream(OUTPUT_PDF_PATH));\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Stream a PDF to remediation and save the returned PDF. Requires `requests`.\"\"\"\n\nimport os\n\nimport requests\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID = \"example-template\"\nINPUT_PDF_PATH = \"input.pdf\"\nOUTPUT_PDF_PATH = \"remediated.pdf\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nurl = f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/remediation/remediate?templateId={TEMPLATE_ID}\"\n# No automatic retries: the upload body is streamed from a file. If retrying manually, reopen the file\n# for every attempt and honor Retry-After for 429/503 before retrying.\nwith open(INPUT_PDF_PATH, \"rb\") as input_pdf:\n    response = requests.post(\n        url,\n        headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/pdf\"},\n        data=input_pdf,\n        timeout=(10, 900),  # 15-minute read timeout for remediation.\n        stream=True,\n    )\n    response.raise_for_status()\n    with open(OUTPUT_PDF_PATH, \"wb\") as output_pdf:\n        for chunk in response.iter_content(chunk_size=1024 * 1024):\n            if chunk:\n                output_pdf.write(chunk)\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Replace these documentation-safe values with your own API details and local file paths.\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\nTEMPLATE_ID=\"example-template\"\nINPUT_PDF_PATH=\"input.pdf\"\nOUTPUT_PDF_PATH=\"remediated.pdf\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\n# curl honors Retry-After for transient responses; keep retries bounded.\n# --max-time allows a long remediation; curl's default retryable status list avoids retrying client errors.\ncurl --silent --show-error --fail-with-body \\\n  --max-time 900 \\\n  --retry 3 --retry-max-time 900 \\\n  --request POST \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/remediation/remediate?templateId=${TEMPLATE_ID}\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\" \\\n  --header \"Content-Type: application/pdf\" \\\n  --data-binary \"@${INPUT_PDF_PATH}\" \\\n  --output \"${OUTPUT_PDF_PATH}\"\n"
          }
        ]
      }
    },
    "/v1/{subscriptionId}/health/ping/auth": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Check service availability and validate credentials",
        "description": "Confirms that the service is running and verifies that the caller’s authentication and authorization credentials are valid.",
        "operationId": "AuthPing",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "11111111-1111-4111-8111-111111111111"
          }
        ],
        "responses": {
          "200": {
            "description": "The service is operational, and the provided authentication credentials are valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pingResult"
                }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred on the server. Try again later or contact support if the issue persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errorResponseContent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication is required. Provide a valid API key to access this endpoint."
          },
          "403": {
            "description": "The client is authenticated but does not have sufficient permission to perform this operation."
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ],
        "x-codeSamples": [
          {
            "lang": "csharp",
            "label": "C#",
            "source": "const string baseUrl = \"https://api.axes4.com/flip/cloud\";\nconst string subscriptionId = \"11111111-1111-4111-8111-111111111111\";\nvar apiKey = Environment.GetEnvironmentVariable(\"AXESFLIP_API_KEY\")\n             ?? throw new InvalidOperationException(\"Set the AXESFLIP_API_KEY environment variable.\");\n\nusing var httpClient = new HttpClient();\nhttpClient.DefaultRequestHeaders.Add(\"x-api-key\", apiKey);\nusing var response = await httpClient.GetAsync(\n    $\"{baseUrl}/v1/{subscriptionId}/health/ping/auth\");\nresponse.EnsureSuccessStatusCode();\n\nvar result = await response.Content.ReadFromJsonAsync<JsonElement>();\nConsole.WriteLine(JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true }));"
          },
          {
            "lang": "node",
            "label": "Node.js",
            "source": "// Check service availability and validate the API key. Requires Node.js 18 or later.\n\nconst BASE_URL = \"https://api.axes4.com/flip/cloud\";\nconst SUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\";\nconst API_KEY = process.env.AXESFLIP_API_KEY;\n\nasync function main() {\n    if (!API_KEY) {\n        throw new Error(\"Set the AXESFLIP_API_KEY environment variable.\");\n    }\n\n    const response = await fetch(`${BASE_URL}/v1/${SUBSCRIPTION_ID}/health/ping/auth`, {\n        headers: { \"x-api-key\": API_KEY },\n        signal: AbortSignal.timeout(30_000),\n    });\n    if (!response.ok) {\n        throw new Error(`Request failed with status ${response.status}: ${await response.text()}`);\n    }\n\n    console.log(await response.json());\n}\n\nmain().catch(error => {\n    console.error(error);\n    process.exitCode = 1;\n});\n"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "\"\"\"Check service availability and validate the API key. Requires `requests`.\"\"\"\n\nimport os\nimport requests\n\nBASE_URL = \"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID = \"11111111-1111-4111-8111-111111111111\"\nAPI_KEY = os.environ[\"AXESFLIP_API_KEY\"]\n\nresponse = requests.get(\n    f\"{BASE_URL}/v1/{SUBSCRIPTION_ID}/health/ping/auth\",\n    headers={\"x-api-key\": API_KEY},\n    timeout=(10, 30),\n)\nresponse.raise_for_status()\nprint(response.json())\n"
          },
          {
            "lang": "bash",
            "label": "cURL",
            "source": "#!/usr/bin/env bash\nset -euo pipefail\n\nBASE_URL=\"https://api.axes4.com/flip/cloud\"\nSUBSCRIPTION_ID=\"11111111-1111-4111-8111-111111111111\"\n: \"${AXESFLIP_API_KEY:?Set the AXESFLIP_API_KEY environment variable}\"\n\ncurl --silent --show-error --fail-with-body \\\n  --url \"${BASE_URL}/v1/${SUBSCRIPTION_ID}/health/ping/auth\" \\\n  --header \"x-api-key: ${AXESFLIP_API_KEY}\"\n"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "errorResponseContent": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "integer",
            "description": "An internal application error code, intended for support and diagnostics. Use the HTTP status code to handle errors in your client. New codes may be added at any time.",
            "format": "int32"
          },
          "message": {
            "type": "string",
            "description": "A human-readable explanation of the error."
          },
          "invocationId": {
            "type": "string",
            "description": "The invocation ID of the function execution."
          }
        },
        "description": "Error details returned in JSON response bodies when provided; some failed requests communicate the outcome through the HTTP status code alone."
      },
      "pingResult": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "A message confirming that authorization succeeded."
          },
          "timestamp": {
            "type": "string",
            "description": "The UTC timestamp when the authorization check completed.",
            "format": "date-time"
          }
        },
        "description": "Result of the authenticated health check."
      },
      "templateInfo": {
        "type": "object",
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier for this subscription."
          },
          "templateId": {
            "type": "string",
            "description": "The unique identifier for this template."
          },
          "createdAt": {
            "type": "string",
            "description": "The date and time the template was created, as recorded in the template. Omitted if the template contains no metadata.",
            "format": "date-time"
          },
          "modifiedAt": {
            "type": "string",
            "description": "The date and time the template was last modified, as recorded in the template. Omitted if the template contains no metadata.",
            "format": "date-time"
          },
          "revision": {
            "type": "integer",
            "description": "The revision number of the template. Omitted if the template contains no metadata.",
            "format": "int32"
          },
          "schemaVersion": {
            "type": "integer",
            "description": "The schema version of the template. Omitted if the template contains no metadata.",
            "format": "int32"
          },
          "uploadedAt": {
            "type": "string",
            "description": "The date and time the template was first uploaded.",
            "format": "date-time"
          },
          "lastUploadedAt": {
            "type": "string",
            "description": "The date and time the template was last uploaded.",
            "format": "date-time"
          }
        },
        "description": "Information about a stored template, including metadata from the template itself and upload timestamps."
      },
      "templateId": {
        "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
        "type": "string",
        "description": "A template ID must be lowercase letters, digits, or hyphens. It cannot start or end with a hyphen."
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "API key for authentication",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "Health",
      "description": "Check service availability and verify that your API key and subscription are valid. Use this first when setting up an integration."
    },
    {
      "name": "Template",
      "description": "Upload, update, download, list and delete remediation templates. Templates are created in the axesFlip Designer and uploaded as ZIP archives (usually `.flip` files)."
    },
    {
      "name": "Remediation",
      "description": "Send an untagged or inaccessible PDF and receive a PDF/UA-compliant, tagged PDF based on one of your templates."
    }
  ],
  "externalDocs": {
    "description": "axesFlip Cloud documentation",
    "url": "https://axes4.com/axesflip-cloud-documentation"
  },
  "x-axes4-docs": {
    "title": "axesFlip Cloud API",
    "description": "API reference for accessible PDF remediation and template operations in Flip Cloud.",
    "version": "v1",
    "logo": "axesflip-logo-symbol.svg",
    "path": "flip/cloud/api",
    "order": 1
  }
}