{
  "openapi": "3.0.0",
  "info": {
    "title": "Admin API Reference",
    "version": "2026-03-27",
    "description": "\n\nThe Zephr Admin API provides RESTful access to all Zephr functionality. It is designed for server-side integrations. All requests must be signed as described in <a href=\"https://knowledgecenter.zuora.com/Zephr/Developer_Documentation/HMAC_Request_Signing_and_Key_Pairs\" target=\"__blank\">HMAC Request Signing and Key Pairs</a>.\n\nThe Admin API uses a base URL with the following format: `https://{tenantId}.api.zephr.com`\n\n**Note**: If you have multiple tenants, the current tenant ID is shown in a blue box in the top right of the Admin Console.  If you have a single site, you can find the tenant ID by navigating to your site domains. To do this, select **Sites** from the **Delivery** menu, select your site, and then click the **Site Domains** button. The tenant ID is the first part of the domain. For example, if the domain is *news-paper.cdn.zephr.com*, the tenant ID is *news*.\n"
  },
  "tags": [
    {
      "name": "Account User",
      "description": "Contains operations on the Account User resource.",
      "x-displayName": "Account User"
    },
    {
      "name": "Admin User",
      "description": "Contains operations on the Admin User resource.",
      "x-displayName": "Admin User"
    },
    {
      "name": "Bundle",
      "description": "Contains operations on the Bundle resource.",
      "x-displayName": "Bundle"
    },
    {
      "name": "Cache Configurations",
      "description": "Contains operations on the Cache Configurations resource.",
      "x-displayName": "Cache Configurations"
    },
    {
      "name": "Cache Management",
      "description": "Cache Mangement.",
      "x-displayName": "Cache Management"
    },
    {
      "name": "Company",
      "description": "Actions on resource Company.",
      "x-displayName": "Company"
    },
    {
      "name": "Component Library",
      "description": "Actions on resource Library Component.",
      "x-displayName": "Component Library"
    },
    {
      "name": "Configuration",
      "description": "Blaize tenant configuration.",
      "x-displayName": "Configuration"
    },
    {
      "name": "Credit",
      "description": "Actions on resource Credit.",
      "x-displayName": "Credit"
    },
    {
      "name": "Decision Engine",
      "x-displayName": "Decision Engine"
    },
    {
      "name": "Email Templates",
      "description": "Actions on email templates.",
      "x-displayName": "Email Templates"
    },
    {
      "name": "Entitlement",
      "description": "Actions on resource Entitlement.",
      "x-displayName": "Entitlement"
    },
    {
      "name": "Feature Rules",
      "description": "Actions on resource Feature Rules.",
      "x-displayName": "Feature Rules"
    },
    {
      "name": "Form",
      "description": "Actions on resource Form.",
      "x-displayName": "Form"
    },
    {
      "name": "Gifts",
      "x-displayName": "Gifts"
    },
    {
      "name": "Grants",
      "description": "Actions on resource Grant.",
      "x-displayName": "Grants"
    },
    {
      "name": "Meter",
      "description": "Actions on resource Meter.",
      "x-displayName": "Meter"
    },
    {
      "name": "Products",
      "description": "Actions on resource Product.",
      "x-displayName": "Products"
    },
    {
      "name": "Request Rules",
      "description": "Actions on resource Request Rules.",
      "x-displayName": "Request Rules"
    },
    {
      "name": "Session",
      "description": "Actions on resource Session.",
      "x-displayName": "Session"
    },
    {
      "name": "Static Items",
      "description": "Actions on resource Static Item.",
      "x-displayName": "Static Items"
    },
    {
      "name": "Third Party Authentication",
      "description": "Contains operations for the OAuth 2.0 Authorization Code Flow Token Exchange.",
      "x-displayName": "Third Party Authentication"
    },
    {
      "name": "User Export",
      "x-displayName": "User Export"
    },
    {
      "name": "User Schema",
      "description": "Actions on resource User Schema.",
      "x-displayName": "User Schema"
    },
    {
      "name": "Users",
      "description": "Contains operations on the User resource. \n**Important**: The Attributes object contains the custom-defined attributes for a user.\n",
      "x-displayName": "Users"
    },
    {
      "name": "V4 Session",
      "description": "Actions on resource Session.",
      "x-displayName": "V4 Session"
    },
    {
      "name": "Webhook",
      "description": "Actions on resource Webhook.",
      "x-displayName": "Webhook"
    },
    {
      "name": "Account",
      "description": "Actions on resource Account.",
      "x-displayName": "Account"
    },
    {
      "name": "Health Check",
      "description": "Actions on Health checks.",
      "x-displayName": "Health Check"
    },
    {
      "name": "System Resources",
      "description": "Actions on system resources.",
      "x-displayName": "System Resources"
    },
    {
      "name": "External Template",
      "description": "External Templates.",
      "x-displayName": "External Templates"
    }
  ],
  "servers": [
    {
      "url": "https://{tenantId}.api.zephr.com",
      "variables": {
        "tenantId": {
          "default": "demo",
          "description": "Your tenant ID."
        }
      }
    }
  ],
  "security": [
    {
      "ZephrHmacHttp": []
    }
  ],
  "paths": {
    "/v3/accounts/{account_id}/users": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account-user"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "user_id": "0123456789ABCD",
                        "account_id": "0123456789ABCD"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "summary": "List account users",
        "operationId": "listAccountUsers",
        "description": "Retrieves all the account users.",
        "tags": [
          "Account User"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Unique Account identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/accounts/{account_id}/users/{user_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account-user"
                },
                "examples": {
                  "response": {
                    "value": {
                      "user_id": "0123456789ABCD",
                      "account_id": "0123456789ABCD"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve an account user",
        "operationId": "retrieveAccountUser",
        "description": "Retrieves an account user.",
        "tags": [
          "Account User"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete an account user",
        "operationId": "deleteAccountUser",
        "description": "Deletes an account user.",
        "tags": [
          "Account User"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK - User was successfully inserted or updated.",
            "headers": {}
          },
          "201": {
            "description": "Created - The request has been fulfilled and user was inserted or updated",
            "headers": {}
          },
          "400": {
            "description": "Bad Request - Cannot find an existing user for the supplied `user_id` and `account_id`",
            "headers": {}
          }
        },
        "summary": "Save or Create an account user",
        "operationId": "saveAccountUser",
        "description": "Saves or Creates an account specified by `account_id` and `user_id`.",
        "tags": [
          "Account User"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "example": "5fag4a2d-86cd-4bb0-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "example": "3f589a2d-86ad-4b70-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/zephr/integration/users/v1/users": {
      "delete": {
        "summary": "Delete an end user by primary ID or foreign key",
        "operationId": "deleteUserByPrimaryOrForeignKey",
        "description": "Deletes an end user and associated data from the system.\n\nThis endpoint applies to **end users (C2 users)**, not admin users.\n\nYou must provide **exactly one** of the following identifier options:\n  **Option A — Delete by primary ID**\n  - `primary_id`\n  **Option B — Delete by foreign key**\n  - `foreign[system]` and `foreign[key]`\n\n**Rules**\n  - Provide **either** `primary_id` **or** both `foreign[system]` and `foreign[key]`.\n  - Do **not** provide both identifier options in the same request.\n  - If parameters are missing, incomplete, or conflicting, the API returns **400**.\n\n**Important:**  \nTo delete JWT users who do not have a foreign system mapping (for example, users whose data exists in DynamoDB but not in the SQL database), provide `zephr` as the value for the `foreign[system]` parameter.\n\nExamples:\n  - Delete by primary ID:  \n    `DELETE /zephr/integration/users/v1/users?primary_id=123456`\n\n  - Delete by foreign key:\n    `DELETE /zephr/integration/users/v1/users?foreign[system]=my-system&foreign[key]=alexuser-12345`\n\n  - Delete JWT user with no foreign mapping (DynamoDB-only):  \n   `DELETE /zephr/integration/users/v1/users?foreign[system]=zephr&foreign[key]=alexuser-12345`\n",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "primary_id",
            "in": "query",
            "description": "The Zephr internal primary user ID of the user to be deleted.\nProvide this parameter **only** when deleting by primary ID (Option A).\n",
            "required": false,
            "schema": {
              "type": "string",
              "example": "123456"
            }
          },
          {
            "name": "foreign[system]",
            "in": "query",
            "description": "The configured foreign key system defined in the JWT settings.\nRequired when deleting by foreign key (Option B).\n",
            "required": false,
            "example": "zephr",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "foreign[key]",
            "in": "query",
            "description": "The external persistent user identifier linked to the user (from the JWT).\nRequired when deleting by foreign key (Option B).\n",
            "required": false,
            "example": "user_998877",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted successfully (no content)."
          },
          "400": {
            "description": "Bad request (missing, incomplete, or conflicting query parameters)."
          },
          "404": {
            "description": "User not found."
          }
        }
      }
    },
    "/v3/admin/users": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-user-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "user_id": "b859f5dd-8184-4d01-8bf9-e3e771f68a62",
                      "message": "Admin user created successfully",
                      "uri": "http://company.com/v3/admin/users/b859f5dd-8184-4d01-8bf9-e3e771f68a62"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create an admin user",
        "operationId": "createAdminUser",
        "description": "Creates a new admin user.",
        "tags": [
          "Admin User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "type": "object",
                    "properties": {
                      "email_address": {
                        "type": "string"
                      }
                    }
                  },
                  "validators": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string"
                      },
                      "use_sso": {
                        "type": "boolean",
                        "description": "When this is present there should be no identifiers in the body. The user is identified through a `blaize_session` cookie."
                      }
                    }
                  }
                },
                "required": [
                  "identifiers"
                ],
                "example": {
                  "identifiers": {
                    "email_address": "joe.blow@company.com"
                  },
                  "validators": {
                    "password": "mysecurepassword123"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/admin/login": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-user-login-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "cookie": "blaize_admin_session=...",
                      "message": "Login successful"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized",
            "headers": {}
          }
        },
        "summary": "Log in to an admin user account",
        "operationId": "logInAdminUserAccount",
        "description": "Logs in to an admin user account.",
        "tags": [
          "Admin User"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "type": "object",
                    "properties": {
                      "email_address": {
                        "type": "string"
                      }
                    }
                  },
                  "validators": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string"
                      },
                      "use_sso": {
                        "type": "boolean",
                        "description": "When this is present there should be no identifiers in the body. The user is identified through a `blaize_session` cookie."
                      }
                    }
                  }
                },
                "required": [
                  "identifiers",
                  "validators"
                ],
                "example": {
                  "identifiers": {
                    "email_address": "joe.blow@company.com"
                  },
                  "validators": {
                    "password": "mysecurepassword123"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/admin/logout": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/logout-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Session deleted"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Log out of the admin user account",
        "operationId": "logOutAdminUserAccount",
        "description": "Logs out of the admin user account.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "blaize-admin-session",
            "in": "header",
            "description": "e.g. (string)",
            "required": false,
            "example": "(string)",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/admin/users/{user_id}/keypairs": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/issue-keypair-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "access_key": "access key...",
                      "secret_key": "secret key...",
                      "message": "Keypair created: you will not be able to recover the secret, so take note of it"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Issue a key pair",
        "operationId": "issueKeyPair",
        "description": "Issues a new key pair for the admin user.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User Identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/get-access-key-response"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "access_key": "access key..."
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List access keys",
        "operationId": "listAccessKeys",
        "description": "Retrieves a list of access keys for the admin user.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User Identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/admin/users/{user_id}/keypairs/{access_key}": {
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/revoke-keypair-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Keypair revoked"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Revoke a keypair",
        "operationId": "revokeKeypair",
        "description": "Revokes a keypair.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "access_key",
            "in": "path",
            "description": "Access Key identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/admin/users/{user_id}/roles": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-roles"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "email": "admin@company.com",
                        "role": "role..."
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List user roles",
        "operationId": "listUserRoles",
        "description": "Retrieves the user roles an admin user is assigned.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/admin/users/{user_id}/roles/{tenant}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-roles"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "email": "admin@company.com",
                        "role": "role..."
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List user roles by tenant",
        "operationId": "listUserTenantRoles",
        "description": "Retrieves the admin user's roles by tenant.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/admin/roles": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-role-creation-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Admin role created successfully"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create admin user roles",
        "operationId": "createAdminRole",
        "description": "Creates admin user roles.",
        "tags": [
          "Admin User"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_Admin_RoleBody"
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/list-admin-roles-response"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "role_id": "0123456789ABCD",
                        "email": "admin@company.com",
                        "role": "role..."
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List admin user roles",
        "operationId": "listRoles",
        "description": "Retrieves the admin user roles by tenant.",
        "tags": [
          "Admin User"
        ]
      }
    },
    "/v3/admin/roles/{role_id}": {
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-role-update-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Admin role updated successfully"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Update an admin user role",
        "operationId": "updateRole",
        "description": "Updates an admin user role by ID.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "role_id",
            "in": "path",
            "description": "Unique Role identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_Admin_RoleBody"
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/list-admin-role-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "role_id": "0123456789ABCD",
                      "email": "admin@company.com",
                      "role": "role..."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve an admin user role",
        "operationId": "getRole",
        "description": "Retrieves an admin user role.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "role_id",
            "in": "path",
            "description": "Unique Role identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-role-deleted-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Admin role deleted successfully"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete an admin user role",
        "operationId": "deleteRole",
        "description": "Deletes an admin user role.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "role_id",
            "in": "path",
            "description": "Unique Role identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/admin/sessions/{blaize_admin_session_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user_identifier"
                },
                "examples": {
                  "response": {
                    "value": {
                      "user_id": "123456789ABCD"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve an admin user by session ID",
        "operationId": "getSessionUser",
        "description": "Retrieves an admin user by session ID.",
        "tags": [
          "Admin User"
        ],
        "parameters": [
          {
            "name": "blaize_admin_session_id",
            "in": "path",
            "description": "Admin User Session identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/users/{userId}/foreign-key/update/{key}": {
      "put": {
        "responses": {
          "200": {
            "description": "OK - Foreign key was successfully inserted or updated",
            "headers": {}
          },
          "404": {
            "description": "Not Found - Cannot find a user with the supplied `userId`",
            "headers": {}
          }
        },
        "summary": "Inserts or updates a foreign key",
        "operationId": "upsertForeignKey",
        "description": "Inserts or updates the provided foreign key, if the supplied `userId` and `key` match.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "example": "3f589a2d-86cd-4b70-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "Foreign system key",
            "required": true,
            "example": "foreign_system_key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              },
              "example": "65xcb76a3a2f1"
            }
          }
        }
      }
    },
    "/v3/bundles": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/bundles"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Returned if no valid authentication was provided.",
            "headers": {}
          }
        },
        "summary": "List Bundles",
        "operationId": "listBundles",
        "description": "Retrieves a list of bundles wrapped in the element \"results\". Each bundle contains a list of entitlements, meters, credits, and other bundles.",
        "tags": [
          "Bundle"
        ]
      },
      "put": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create Bundles",
        "operationId": "createBundles",
        "description": "Creates Bundles.",
        "tags": [
          "Bundle"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_BundleBody"
        }
      }
    },
    "/v3/bundles/{id}": {
      "put": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a Bundle",
        "operationId": "createBundle",
        "description": "Creates a Bundle.",
        "tags": [
          "Bundle"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Bundle identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_BundleBody"
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/bundle"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Returned if no valid authentication was provided.",
            "headers": {}
          },
          "404": {
            "description": "Not Found. Returned if the ID is invalid. No bundle found.",
            "headers": {}
          }
        },
        "summary": "Retrieve a Bundle",
        "operationId": "getBundle",
        "description": "Retrieves a single bundle. Each bundle contains a list of entitlements, meters, credits, and other bundles.",
        "tags": [
          "Bundle"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Bundle Identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK. Returned if the bundle was successfully deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Bundle deleted successfully"
                    }
                  }
                }
              }
            },
            "headers": {}
          },
          "401": {
            "description": "Unauthorized. Returned if no valid authentication was provided.",
            "headers": {}
          },
          "404": {
            "description": "Not Found. Returned if the ID is invalid. No bundle found.",
            "headers": {}
          }
        },
        "summary": "Delete Bundle",
        "operationId": "deleteBundle",
        "description": "Deletes a Bundle.",
        "tags": [
          "Bundle"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Bundle Identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/cache-configurations": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cache_configurations_objects"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "label": "Test",
                          "conditions": {
                            "url_pattern": "^/forum",
                            "header_patterns": {
                              "Content-Type": "^text/html"
                            }
                          },
                          "cache": {
                            "origin": false,
                            "decision_points": false
                          },
                          "redirect": {
                            "on": false,
                            "target": "/some/path",
                            "status": 301
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List cache configurations",
        "operationId": "listCacheConfigurations",
        "description": "Retrieves a list of cache configurations wrapped in the element \"results\".",
        "tags": [
          "Cache Configurations"
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a cache configuration",
        "operationId": "createCacheConfiguration",
        "description": "Creates a Cache Configuration.",
        "tags": [
          "Cache Configurations"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_Cache_ConfigurationBody"
        }
      }
    },
    "/v3/cache-configurations/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/cache_configurations_object"
                },
                "examples": {
                  "response": {
                    "value": {
                      "label": "Test",
                      "conditions": {
                        "url_pattern": "^/forum",
                        "header_patterns": {
                          "Content-Type": "^text/html"
                        }
                      },
                      "cache": {
                        "origin": false,
                        "decision_points": false
                      },
                      "redirect": {
                        "on": false,
                        "target": "/some/path",
                        "status": 301
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a cache configuration",
        "operationId": "getCacheConfiguration",
        "description": "Retrieves a single cache configuration.",
        "tags": [
          "Cache Configurations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Cache Configuration identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a cache configuration",
        "operationId": "deleteCacheConfiguration",
        "description": "Deletes a cache configuration",
        "tags": [
          "Cache Configurations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Cache Configuration identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Update a cache configuration",
        "operationId": "updateCacheConfiguration",
        "description": "Updates a cache configuration.",
        "tags": [
          "Cache Configurations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Cache Configuration identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_Cache_ConfigurationBody"
        }
      }
    },
    "/v3/cache-management/evict-origin": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Evict cached origin requests",
        "operationId": "evictOrigin",
        "description": "Evicts all cached origin requests with path matching the supplied regular expression.",
        "tags": [
          "Cache Management"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": "1 line containing valid Java Regular Expression."
            }
          }
        }
      }
    },
    "/v4/cache-management/evict-origin": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Evict cached origin requests (V4)",
        "operationId": "evictOriginSiteV4",
        "description": "Evicts all cached origin requests with path matching the supplied regular expression.",
        "tags": [
          "Cache Management"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": "1 line containing valid Java Regular Expression."
            }
          }
        }
      }
    },
    "/v4/cache-management/evict-origin/{site}": {
      "post": {
        "responses": {
          "200": {
            "description": "OK. The specified origin cache has successfully been evicted.",
            "headers": {}
          },
          "400": {
            "description": "Bad Request. Path to delete must be a valid regex",
            "headers": {}
          },
          "403": {
            "description": "Forbidden. Not permitted for V3 tenant.",
            "headers": {}
          }
        },
        "summary": "Evict cached origin requests for a given site in V4",
        "operationId": "evictOriginV4",
        "description": "Evicts all of the origin cache matching the path pattern provided in the request body for a given site, evicts all paths if .* is provided as path pattern.",
        "tags": [
          "Cache Management"
        ],
        "parameters": [
          {
            "name": "site",
            "in": "path",
            "description": "Site Slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": "1 line containing valid Java Regular Expression."
            }
          }
        }
      }
    },
    "/v3/companies": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/companies"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "name": "Company name",
                          "description": "Company description",
                          "website": "company.com",
                          "contact": "Company contact",
                          "account_manager": "Company account manager"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List companies",
        "operationId": "listCompanies",
        "description": "Retrieves a list of companies wrapped in the element \"results\".",
        "tags": [
          "Company"
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a company",
        "operationId": "createCompany",
        "description": "Creates a company.",
        "tags": [
          "Company"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_CompanyBody"
        }
      }
    },
    "/v3/companies/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company"
                },
                "examples": {
                  "response": {
                    "value": {
                      "name": "Company name",
                      "description": "Company description",
                      "website": "company.com",
                      "contact": "Company contact",
                      "account_manager": "Company account manager"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a company",
        "operationId": "getCompany",
        "description": "Retrieves a single company.",
        "tags": [
          "Company"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Company identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a company",
        "operationId": "deleteCompany",
        "description": "Deletes a company.",
        "tags": [
          "Company"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Company identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Update a company",
        "operationId": "updateCompany",
        "description": "Updates a company.",
        "tags": [
          "Company"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Company identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_CompanyBody"
        }
      }
    },
    "/v4/companies": {
      "post": {
        "responses": {
          "201": {
            "description": "OK - Company has been created successfully"
          },
          "400": {
            "description": "Bad Request - Company name is missing from the request"
          }
        },
        "summary": "Create a company",
        "description": "Creates a company with the details specified in the request body",
        "tags": [
          "Company"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_CompanyBody_v4"
        }
      }
    },
    "/v4/companies/{companyId}": {
      "get": {
        "summary": "Retrieve a company",
        "description": "Retrieves company information for a company specified by the provided identifier (`companyId`)",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "The company's unique identifier",
            "required": true,
            "example": "1f6841a8-7f3b-4505-856e-4549be433545",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Company information was successfully retrieved",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/companyv4"
                },
                "example": {
                  "company_id": "1f6841a8-7f3b-4505-856e-4549be433545",
                  "name": "My Company",
                  "description": "This is an example company",
                  "website": "https://company.com",
                  "contact": "email@company.com",
                  "account_manager": "Joe Blow",
                  "tenantId": "my-tenant",
                  "subTenantId": "my-tenant"
                }
              }
            }
          },
          "404": {
            "description": "Not found - No companies were found with the supplied identifier",
            "headers": {}
          }
        },
        "tags": [
          "Company"
        ]
      }
    },
    "/v3/configuration": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Save the tenant configuration",
        "operationId": "saveConfiguration",
        "description": "Creates or updates the tenant configuration.",
        "tags": [
          "Configuration"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "db.tables.extendedProfiles": {
                    "type": "string"
                  },
                  "db.tables.grants": {
                    "type": "string"
                  },
                  "db.tables.forms": {
                    "type": "string"
                  },
                  "db.tables.features": {
                    "type": "string"
                  },
                  "db.tables.requestRules": {
                    "type": "string"
                  },
                  "db.tables.entitlements": {
                    "type": "string"
                  },
                  "db.tables.formFields": {
                    "type": "string"
                  },
                  "db.tables.companies": {
                    "type": "string"
                  },
                  "db.tables.accounts": {
                    "type": "string"
                  },
                  "db.tables.userSchemaFields": {
                    "type": "string"
                  },
                  "db.tables.users": {
                    "type": "string"
                  },
                  "db.tables.userAttributes": {
                    "type": "string"
                  },
                  "db.tables.accountUsers": {
                    "type": "string"
                  },
                  "db.tables.staticItems": {
                    "type": "string"
                  },
                  "db.tables.webhooks": {
                    "type": "string"
                  },
                  "db.tables.adminUserTenantRoles": {
                    "type": "string"
                  },
                  "db.tables.adminUsers": {
                    "type": "string"
                  },
                  "db.tables.adminKeyPairs": {
                    "type": "string"
                  },
                  "oauth.google.apis.host": {
                    "type": "string"
                  },
                  "oauth.linkedin.clientSecret": {
                    "type": "string"
                  },
                  "oauth.linkedin.apis.host": {
                    "type": "string"
                  },
                  "oauth.google.clientSecret": {
                    "type": "string"
                  },
                  "oauth.google.callbackUri": {
                    "type": "string"
                  },
                  "oauth.linkedin.clientId": {
                    "type": "string"
                  },
                  "oauth.linkedin.callbackUri": {
                    "type": "string"
                  },
                  "oauth.google.clientId": {
                    "type": "string"
                  },
                  "oauth.facebook.callbackUri": {
                    "type": "string"
                  },
                  "oauth.facebook.clientSecret": {
                    "type": "string"
                  },
                  "oauth.facebook.apis.host": {
                    "type": "string"
                  },
                  "oauth.facebook.clientId": {
                    "type": "string"
                  },
                  "cdn.origin": {
                    "type": "string"
                  },
                  "redis.port": {
                    "type": "string"
                  },
                  "elasticsearch.url": {
                    "type": "string"
                  },
                  "aws.region": {
                    "type": "string"
                  },
                  "redis.host": {
                    "type": "string"
                  },
                  "email.from": {
                    "type": "string"
                  },
                  "authentication.password.requireEmailVerfication": {
                    "type": "string"
                  }
                },
                "example": {
                  "db.tables.extendedProfiles": "value",
                  "db.tables.grants": "value",
                  "db.tables.forms": "value",
                  "db.tables.features": "value",
                  "db.tables.requestRules": "value",
                  "db.tables.entitlements": "value",
                  "db.tables.formFields": "value",
                  "db.tables.companies": "value",
                  "db.tables.accounts": "value",
                  "db.tables.userSchemaFields": "value",
                  "db.tables.users": "value",
                  "db.tables.userAttributes": "value",
                  "db.tables.accountUsers": "value",
                  "db.tables.staticItems": "value",
                  "db.tables.webhooks": "value",
                  "db.tables.adminUserTenantRoles": "value",
                  "db.tables.adminUsers": "value",
                  "db.tables.adminKeyPairs": "value",
                  "oauth.google.apis.host": "value",
                  "oauth.linkedin.clientSecret": "value",
                  "oauth.linkedin.apis.host": "value",
                  "oauth.google.clientSecret": "value",
                  "oauth.google.callbackUri": "value",
                  "oauth.linkedin.clientId": "value",
                  "oauth.linkedin.callbackUri": "value",
                  "oauth.google.clientId": "value",
                  "oauth.facebook.callbackUri": "value",
                  "oauth.facebook.clientSecret": "value",
                  "oauth.facebook.apis.host": "value",
                  "oauth.facebook.clientId": "value",
                  "cdn.origin": "value",
                  "redis.port": "value",
                  "elasticsearch.url": "value",
                  "aws.region": "value",
                  "redis.host": "value",
                  "email.from": "value",
                  "authentication.password.requireEmailVerfication": "value"
                }
              }
            }
          }
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/configuration"
                },
                "examples": {
                  "response": {
                    "value": {
                      "db.tables.extendedProfiles": "value",
                      "db.tables.grants": "value",
                      "db.tables.forms": "value",
                      "db.tables.features": "value",
                      "db.tables.requestRules": "value",
                      "db.tables.entitlements": "value",
                      "db.tables.formFields": "value",
                      "db.tables.companies": "value",
                      "db.tables.accounts": "value",
                      "db.tables.userSchemaFields": "value",
                      "db.tables.users": "value",
                      "db.tables.userAttributes": "value",
                      "db.tables.accountUsers": "value",
                      "db.tables.staticItems": "value",
                      "db.tables.webhooks": "value",
                      "db.tables.adminUserTenantRoles": "value",
                      "db.tables.adminUsers": "value",
                      "db.tables.adminKeyPairs": "value",
                      "oauth.google.apis.host": "value",
                      "oauth.linkedin.clientSecret": "value",
                      "oauth.linkedin.apis.host": "value",
                      "oauth.google.clientSecret": "value",
                      "oauth.google.callbackUri": "value",
                      "oauth.linkedin.clientId": "value",
                      "oauth.linkedin.callbackUri": "value",
                      "oauth.google.clientId": "value",
                      "oauth.facebook.callbackUri": "value",
                      "oauth.facebook.clientSecret": "value",
                      "oauth.facebook.apis.host": "value",
                      "oauth.facebook.clientId": "value",
                      "cdn.origin": "value",
                      "redis.port": "value",
                      "elasticsearch.url": "value",
                      "aws.region": "value",
                      "redis.host": "value",
                      "email.from": "value",
                      "authentication.password.requireEmailVerfication": "value"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve the tenant configuration",
        "operationId": "getConfiguration",
        "description": "Retrieves the tenant configuration.",
        "tags": [
          "Configuration"
        ]
      }
    },
    "/v4/blacklisted-email-domains": {
      "put": {
        "responses": {
          "200": {
            "description": "OK - Blacklisted email domains were updated successfully",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/blacklisted-email-domains-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Blacklisted email domains updated successfully"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created - Blacklisted email domains were created successfully",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/blacklisted-email-domains-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Blacklisted email domains created successfully"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "headers": {}
          }
        },
        "summary": "Update blacklisted email domains",
        "operationId": "updateBlacklistedEmailDomains",
        "description": "Replaces the full list of blacklisted email domains for the tenant.\nExisting blacklisted email domains are removed and replaced with the values provided in the request body.\n\nTo remove all blacklisted email domains, provide an empty array.\n",
        "tags": [
          "Configuration"
        ],
        "requestBody": {
          "description": "List of email domains to blacklist",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/blacklisted-email-domains-request"
              },
              "examples": {
                "singleDomain": {
                  "value": [
                    "spam.com"
                  ]
                },
                "multipleDomains": {
                  "value": [
                    "spam.com",
                    "disposable-email.com",
                    "temporary-mail.net"
                  ]
                },
                "emptyList": {
                  "value": []
                }
              }
            }
          }
        }
      }
    },
    "/v3/initialize": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Install a tenant",
        "operationId": "installTenant",
        "description": "Installs a tenant in Blaize.",
        "tags": [
          "Configuration"
        ]
      }
    },
    "/v3/certs": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a cert",
        "operationId": "createCert",
        "description": "Creates a cert.",
        "tags": [
          "Configuration"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "private_key": {
                    "type": "string"
                  },
                  "cert": {
                    "type": "string"
                  }
                },
                "example": {
                  "label": "company.com",
                  "private_key": "private_key...",
                  "cert": "cert..."
                }
              }
            }
          }
        }
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a cert",
        "operationId": "deleteCert",
        "description": "Deletes a cert.",
        "tags": [
          "Configuration"
        ]
      }
    },
    "/v3/credits": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/credits"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "label": "Test credit",
                          "description": "This is an credit",
                          "delivers": [
                            "ENTITLEMENT_ID"
                          ],
                          "unit": "views",
                          "quantity": 5,
                          "auto_assign": "none"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List credits",
        "operationId": "Credits",
        "description": "Retrieves a list of credits wrapped in the element \"results\".",
        "tags": [
          "Credit"
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create Credit",
        "operationId": "createCredits",
        "description": "Create an Credit",
        "tags": [
          "Credit"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_CreditBody"
        }
      }
    },
    "/v3/credits/{id}": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a credit",
        "operationId": "createCredit",
        "description": "Creates a credit.",
        "tags": [
          "Credit"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Credit identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_CreditBody"
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/credit"
                },
                "examples": {
                  "response": {
                    "value": {
                      "label": "Test credit",
                      "description": "This is an credit",
                      "delivers": [
                        "ENTITLEMENT_ID"
                      ],
                      "unit": "views",
                      "quantity": 5,
                      "auto_assign": "none"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve a credit",
        "operationId": "getCredit",
        "description": "Retrieves a single credit.",
        "tags": [
          "Credit"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Credit identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a credit",
        "operationId": "deleteCredit",
        "description": "Deletes a credit.",
        "tags": [
          "Credit"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Credit identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/resources/{resourceId}/content": {
      "put": {
        "summary": "Update system resource",
        "description": "Update system resource by provided resourceId",
        "tags": [
          "System Resources"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "description": "Unique Resource identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": "{ Resource updated successfully resourceID }"
                }
              }
            }
          },
          "404": {
            "description": "Cannot find system resource with the provided ID",
            "headers": {}
          }
        }
      }
    },
    "/v3/decision-engine": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/access-decision-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "status": "301",
                      "body": "Redirecting to login page...",
                      "headers": {
                        "Location": "/login.html"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {}
          }
        },
        "summary": "Invoke the decision engine",
        "operationId": "invokeDecisionEngine",
        "description": "Invokes the decision engine.\nThe Blaize Decision Engine can be invoked via the Admin API to calculate an HTTP Response based upon Request-Level Rules created in the Admin Console. This functionality is build into the Blaize Dynamic CDN but the API variant is useful for CMS or edge side integrations.",
        "tags": [
          "Decision Engine"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "http_method": {
                    "type": "string"
                  },
                  "session": {
                    "type": "string"
                  },
                  "foreign_keys": {
                    "type": "object",
                    "properties": {},
                    "description": "Foreign system and ID used to identify the user"
                  },
                  "request_headers": {
                    "type": "object",
                    "properties": {
                      "User-Agent": {
                        "type": "string"
                      }
                    }
                  },
                  "content_metadata": {
                    "type": "object",
                    "properties": {
                      "publishedDate": {
                        "type": "string"
                      }
                    }
                  },
                  "jwt": {
                    "type": "string"
                  },
                  "btr": {
                    "type": "string",
                    "description": "MD5-hex-encoding of: path + \"|\" + trusted referrer secret"
                  }
                },
                "required": [
                  "path"
                ],
                "example": {
                  "path": "/x.html",
                  "http_method": "POST",
                  "session": "xxx-xxx-xxx",
                  "foreign_keys": {},
                  "request_headers": {
                    "User-Agent": "<userAgent>"
                  },
                  "content_metadata": {
                    "publishedDate": "<contentAge>"
                  },
                  "jwt": "xxx-xxx-xxx",
                  "btr": "17e74b9e49e66282e55d4b7ec73de951"
                }
              }
            }
          }
        }
      }
    },
    "/v4/email-templates": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/email-templates"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "templateType": "template type",
                          "slug": "email template slug",
                          "label": "Name of the email template",
                          "subject": "Email subject",
                          "content": "Email content",
                          "default": false
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List email templates",
        "operationId": "listEmailTemplates",
        "description": "Retrieves a list of email templates.",
        "tags": [
          "Email Templates"
        ]
      }
    },
    "/v4/email-templates/{slug}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/email-template"
                },
                "examples": {
                  "response": {
                    "value": {
                      "templateType": "template type",
                      "slug": "email template slug",
                      "label": "Name of the email template",
                      "subject": "Email subject",
                      "content": "Email content",
                      "default": false
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve an email template",
        "operationId": "getEmailTemplate",
        "description": "Retrieves a single email template.",
        "tags": [
          "Email Templates"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Slug of the Email template",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete an email template",
        "operationId": "deleteEmailTemplate",
        "description": "Deletes an email template.",
        "tags": [
          "Email Templates"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Slug of the Email template",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Save an email template",
        "operationId": "saveEmailTemplate",
        "description": "Saves an email template.",
        "tags": [
          "Email Templates"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Slug of the Email template",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "templateType": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  }
                },
                "example": {
                  "templateType": "User Password Reset",
                  "label": "my modified default password reset",
                  "subject": "my modified default Password Reset Subject",
                  "content": "<p>New content</p>"
                }
              }
            }
          }
        }
      }
    },
    "/v3/entitlements": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/entitlements"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "label": "Test entitlement",
                          "description": "This is an entitlement",
                          "auto_assign": "none"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List entitlements",
        "operationId": "listEntitlements",
        "description": "Retrieves a list of entitlements wrapped in the element \"results\".",
        "tags": [
          "Entitlement"
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create entitlements",
        "operationId": "createEntitlements",
        "description": "Creates entitlements.",
        "tags": [
          "Entitlement"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_EntitlementBody"
        }
      }
    },
    "/v3/entitlements/{id}": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create an entitlement",
        "operationId": "createEntitlement",
        "description": "Creates an entitlement.",
        "tags": [
          "Entitlement"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Entitlement identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_EntitlementBody"
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/entitlement"
                },
                "examples": {
                  "response": {
                    "value": {
                      "label": "Test entitlement",
                      "description": "This is an entitlement",
                      "auto_assign": "none"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve an entitlement",
        "operationId": "getEntitlement",
        "description": "Retrieves a single entitlement.",
        "tags": [
          "Entitlement"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Entitlement identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete an entitlement",
        "operationId": "deleteEntitlement",
        "description": "Deletes an entitlement.",
        "tags": [
          "Entitlement"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Entitlement identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/feature-rules": {
      "get": {
        "responses": {
          "200": {
            "description": "OK - Feature rules have been retrieved successfully",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/feature_rules_response"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": "featureRuleId",
                        "version": 1,
                        "tags": [],
                        "label": "Test feature",
                        "description": "Test feature",
                        "last_updated": "2011-11-11T11:11:11.000",
                        "request_type": "json",
                        "target_name": "article",
                        "match_operation": "equals",
                        "target_value": "home_button"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Tags size exceeded the limit of 50",
            "headers": {}
          }
        },
        "summary": "List feature rules",
        "operationId": "listFeatureRules",
        "description": "Retrieves a list of feature rules.",
        "parameters": [
          {
            "name": "tags",
            "in": "query",
            "description": "A comma-separeted list of feature rule tags (Maximum 50 tags allowed)",
            "schema": {
              "type": "string",
              "example": "tag1,tag2,tag3"
            }
          }
        ],
        "tags": [
          "Feature Rules"
        ]
      }
    },
    "/v3/feature-rules/{featureRuleId}": {
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/feature_rule_deletion_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a feature rule",
        "operationId": "deleteFeatureRule",
        "description": "Deletes a feature rule.",
        "tags": [
          "Feature Rules"
        ],
        "parameters": [
          {
            "name": "featureRuleId",
            "in": "path",
            "description": "Unique Feature Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/feature-rules/{featureRuleId}/versions": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/feature_rules_response"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": "featureRuleId",
                        "version": 1,
                        "tags": [],
                        "label": "Test feature",
                        "description": "Test feature",
                        "last_updated": "2011-11-11T11:11:11.000"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "summary": "List the versions of a feature rule",
        "operationId": "getFeatureRuleVersions",
        "description": "Retrieves a lists of all the versions for a single feature rule.",
        "tags": [
          "Feature Rules"
        ],
        "parameters": [
          {
            "name": "featureRuleId",
            "in": "path",
            "description": "Unique Feature Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "201": {
            "description": "Created",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/feature_rule_creation_response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Feature Rule created successfully",
                      "uri": "http://host/v3/feature-rules/featureRuleId/versions"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a feature rule version",
        "operationId": "createFeatureRule",
        "description": "Creates a feature rule version.",
        "tags": [
          "Feature Rules"
        ],
        "parameters": [
          {
            "name": "featureRuleId",
            "in": "path",
            "description": "Unique Feature Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "requirements_script": {
                    "type": "string"
                  },
                  "action_script": {
                    "type": "string"
                  },
                  "script_type": {
                    "type": "string"
                  },
                  "graph_state": {
                    "type": "string"
                  },
                  "editing_mode": {
                    "type": "string"
                  }
                },
                "example": {
                  "label": "Test feature",
                  "description": "Test feature",
                  "requirements_script": "return []",
                  "action_script": "return \"this is a test\"",
                  "script_type": "javascript",
                  "graph_state": "{\"property1\": \"value1\"}",
                  "editing_mode": "manual"
                }
              }
            }
          }
        }
      }
    },
    "/v3/feature-rules/{featureRuleId}/versions/{versionId}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/feature_rule_version_response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "featureRuleId",
                      "version": 1,
                      "tags": [],
                      "label": "Test feature",
                      "description": "Test feature",
                      "requirements_script": "return []",
                      "action_script": "return \"this is a test\"",
                      "script_type": "javascript",
                      "graph_state": "{\"property1\": \"value1\"}",
                      "editing_mode": "manual",
                      "last_updated": "2011-11-11T11:11:11.000"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a feature rule version",
        "operationId": "getFeatureRuleVersion",
        "description": "Retrieves a version for a single feature rule.",
        "tags": [
          "Feature Rules"
        ],
        "parameters": [
          {
            "name": "featureRuleId",
            "in": "path",
            "description": "Unique Feature Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "description": "Unique Version identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/feature_rule_deletion_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a feature rule version",
        "operationId": "deleteFeatureRuleVersion",
        "description": "Deletes a single version of a feature rule.",
        "tags": [
          "Feature Rules"
        ],
        "parameters": [
          {
            "name": "featureRuleId",
            "in": "path",
            "description": "Unique Feature Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "description": "Unique Version identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/feature-rules/{featureRuleId}/versions/{versionId}/tags": {
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "201": {
            "description": "Created",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/feature_rule_version_tags_update_response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "featureRuleId tag/s saved successfully",
                      "uri": "http://host/v3/feature-rules/featureRuleId/versions/versionId/tags"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Save feature rule version tags",
        "operationId": "saveFeatureRule",
        "description": "Saves the feature rule version tags.",
        "tags": [
          "Feature Rules"
        ],
        "parameters": [
          {
            "name": "featureRuleId",
            "in": "path",
            "description": "Unique Feature Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "description": "Unique Version identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {}
              }
            }
          }
        }
      }
    },
    "/v3/forms": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/forms"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "title": "Test",
                          "internal-description": "This form is for testing",
                          "public-description": "Please provide some info",
                          "registration": true,
                          "fields": [
                            {
                              "slug": "first-name",
                              "placeholder": "First name",
                              "required": true,
                              "order": 1
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List forms",
        "operationId": "listForms",
        "description": "Retrieves a list of forms wrapped in the element \"results\".",
        "tags": [
          "Form"
        ]
      }
    },
    "/v3/forms/{slug}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/form"
                },
                "examples": {
                  "response": {
                    "value": {
                      "title": "Test",
                      "internal-description": "This form is for testing",
                      "public-description": "Please provide some info",
                      "registration": true,
                      "fields": [
                        {
                          "slug": "first-name",
                          "placeholder": "First name",
                          "required": true,
                          "order": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve Form",
        "operationId": "getForm",
        "description": "Retrieves a single form.",
        "tags": [
          "Form"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Unique Form identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a form",
        "operationId": "deleteForm",
        "description": "Deletes a form.",
        "tags": [
          "Form"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Unique Form identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Save a form",
        "operationId": "saveForm",
        "description": "Saves a form.",
        "tags": [
          "Form"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Unique Form identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "internal-description": {
                    "type": "string"
                  },
                  "public-description": {
                    "type": "string"
                  },
                  "registration": {
                    "type": "boolean"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/field"
                    }
                  }
                },
                "example": {
                  "title": "Test",
                  "internal-description": "This form is for testing",
                  "public-description": "Please provide some info",
                  "registration": true,
                  "fields": [
                    {
                      "slug": "first-name",
                      "placeholder": "First name",
                      "required": true,
                      "order": 1
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v4/thumbnails/upload-url": {
      "post": {
        "summary": "Generate Thumbnail Upload URL",
        "operationId": "generateThumbnailUploadUrl",
        "tags": [
          "Component Library"
        ],
        "description": "Generates a pre-signed URL for securely uploading a thumbnail image. The link expires after *10 minutes*.\n\n**Considerations:**\n- Uploaded images are not optimized by the server; please upload images pre-optimized for web use.\n- Each uploaded file receives a unique `thumbnailId` for reference within your application, but the file name in the bucket is derived from this ID, ensuring no conflicts with existing files.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string",
                    "description": "The name of the file. Unique file names are recommended but not enforced; the system generates a unique ID for each upload."
                  },
                  "contentType": {
                    "type": "string",
                    "description": "The MIME type of the file. Supported MIME types include image/jpeg, image/png, and image/gif."
                  }
                },
                "example": {
                  "fileName": "unique-thumbnail.jpg",
                  "contentType": "image/jpeg"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully generated URL for thumbnail upload.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "A unique identifier for the uploaded thumbnail, used for referencing in the application."
                    },
                    "uploadUrl": {
                      "type": "string",
                      "description": "The pre-signed URL for uploading the thumbnail."
                    }
                  }
                },
                "examples": {
                  "application/json": {
                    "value": {
                      "id": "4f5c49a5-e433-4ac1-b0ad-d67897988899",
                      "uploadUrl": "https://zephr-thumbnails.s3.amazonaws.com/{generated-path}?..."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid. A required attribute is missing or an attribute did not meet the expected criteria.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "missingName": {
                    "value": {
                      "error": "Please provide name of file to upload"
                    }
                  },
                  "invalidType": {
                    "value": {
                      "error": "Unsupported MIME type provided"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication credentials were not provided or are invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "missingCredentials": {
                    "value": {
                      "error": "Authentication credentials are required"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/gift": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/gifts"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": "58c3852bb23f3467",
                        "created": "2018-04-27T09:15:28Z",
                        "uri": "/news/local/story"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "summary": "List all the unclaimed gifts",
        "operationId": "listAllUnclaimedGifts",
        "description": "Lists all the unclaimed gifts.",
        "tags": [
          "Gifts"
        ]
      },
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gift": {
                      "type": "string",
                      "description": "id: 65c7da04b734a15f (string)"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Create a gift",
        "operationId": "createGift",
        "description": "Creates a gift.",
        "tags": [
          "Gifts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Gift Id (passed as ?gift parameter in claim link)"
                  },
                  "created": {
                    "type": "string",
                    "description": "UTC timestamp when gift was created"
                  },
                  "claimed": {
                    "type": "string",
                    "description": "UTC timestamp when gift was claimed"
                  },
                  "uri": {
                    "type": "string",
                    "description": "1823.html (string) - Path portion of URL gift will allow access to"
                  },
                  "cross_device_session": {
                    "type": "string",
                    "description": "ID of cross-device session of claiming user (if claimed)"
                  }
                },
                "example": {
                  "id": "58c3852bb23f3467",
                  "created": "2018-04-27T09:15:28Z",
                  "uri": "/news/local/story"
                }
              }
            }
          }
        }
      }
    },
    "/v3/gift/{giftId}": {
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a gift",
        "operationId": "deleteGift",
        "description": "Deletes a gift.",
        "tags": [
          "Gifts"
        ],
        "parameters": [
          {
            "name": "giftId",
            "in": "path",
            "description": "",
            "required": true,
            "example": "469efefbe4c4cae0",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/users/{userId}/grants": {
      "get": {
        "responses": {
          "200": {
            "description": "Returns a list of grants for the user",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/grants-response"
                    },
                    {
                      "$ref": "#/components/schemas/active-grants-response"
                    }
                  ]
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "grant_id": "5700aae1-461d-47d7-9a4c-d84412da7053",
                          "user_id": "16b26d63-4ee9-4955-9d8b-f6625300d040",
                          "entitlement_type": "bundle",
                          "entitlement_id": "cae85210-c942-490f-a24a-614033c51e49",
                          "expiry_state": "active",
                          "startTime": "2024-02-01 00:00:00",
                          "endTime": "2025-02-01 23:59:59",
                          "created_at": "2024-02-01 00:00:00",
                          "product_id": "gold"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {}
          }
        },
        "summary": "List user grants",
        "operationId": "listUserGrants",
        "description": "Retrieves a list of user grants.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active",
            "in": "query",
            "description": "Whether or not to include only active grants",
            "required": false,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          }
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "403": {
            "description": "Forbidden. You need one of the following privileges to access this endpoint: Identity Module, Products Module, B2B Module or Journey Module"
          },
          "409": {
            "description": "The user does not exist",
            "headers": {}
          }
        },
        "summary": "Create a grant",
        "operationId": "createGrants",
        "description": "Creates a user grant.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_GrantBody"
        }
      }
    },
    "/v3/users/{userId}/grants/{grantId}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/grant"
                }
              }
            }
          }
        },
        "summary": "Retrieve a grant",
        "operationId": "getAccountGrant",
        "description": "Retrieves a single grant.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "description": "Unique Grant identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK - The grant was found and successfully deleted",
            "headers": {}
          },
          "404": {
            "description": "Not Found - Cannot find an existing grant for the supplied `userId` and `grantId`",
            "headers": {}
          }
        },
        "summary": "Delete a grant",
        "operationId": "deleteUserGrant",
        "description": "Deletes a grant specified by the `grantId`. This is for a user that is specified by the `userId`",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "example": "3f589a2d-86ad-4b70-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "description": "Unique Grant identifier",
            "required": true,
            "example": "5fag4a2d-86cd-4bb0-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create an account grant",
        "operationId": "createGrant",
        "description": "Creates an account grant.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "description": "Unique Grant identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_GrantBody"
        }
      }
    },
    "/v3/users/{userId}/accessModel": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/access_model"
                },
                "examples": {
                  "response": {
                    "value": {
                      "meters": {},
                      "credits": {},
                      "delivered_entitlements": [
                        {
                          "id": "0123456789ABCD",
                          "direct": true,
                          "meteredBy": [],
                          "creditedBy": []
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve a user access model",
        "operationId": "retrieveUserAccessModel",
        "description": "Retrieves a user access model.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/accounts/{accountId}/grants": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/grant"
                  }
                }
              }
            }
          }
        },
        "summary": "List account grants",
        "operationId": "listAccountGrants",
        "description": "Retrieves a list of account grants.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create an account grant",
        "operationId": "createAccountGrant",
        "description": "Creates an account grant.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_GrantBody"
        }
      }
    },
    "/v3/accounts/{accountId}/grants/{grantId}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK - Retrieved an account grant",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/grant-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "grantId": "0123456789ABCD",
                      "entitlement_type": "bundle",
                      "entitlement_id": "8dfb3e7c-7a9e-4f23-b6c1-e2d8c41fb9a8",
                      "startTime": "2022-06-01 00:00:00",
                      "endTime": "2022-12-31 23:59:59",
                      "product_id": "PRD-2024-ABC123"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "NOT FOUND - Cannot find an existing grant information for the supplied `accountId` and `grantId`",
            "headers": {},
            "content": {}
          }
        },
        "summary": "Retrieve an account grant",
        "operationId": "getUserGrant",
        "description": "Retrieves a single account grant information, if the supplied `accountId` and `grantId` match",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "example": "5fag4a2d-86cd-4bb0-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "description": "Unique Grant identifier",
            "required": true,
            "example": "0123456789ABCD",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK - The grant was found and successfully deleted",
            "headers": {}
          },
          "404": {
            "description": "Not Found - Cannot find an existing grant for the supplied `accountId` and `grantId`",
            "headers": {}
          }
        },
        "summary": "Delete an account grant",
        "operationId": "deleteAccountGrantById",
        "description": "Deletes an account grant specified by the `grantId`. This is for a user that is specified by the `accountId`.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "example": "3f589a2d-86ad-4b70-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "description": "Unique Grant identifier",
            "required": true,
            "example": "5fag4a2d-86cd-4bb0-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/meters": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/meters"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "label": "Test meter",
                          "description": "This is a meter",
                          "unit": "views",
                          "limit": 5,
                          "cycle": "calendar",
                          "period": "monthly",
                          "timezone": "+0:00",
                          "auto_assign": "none"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "List meters",
        "operationId": "listMeters",
        "description": "Retrieves a list of meters wrapped in the element \"results\".",
        "tags": [
          "Meter"
        ]
      }
    },
    "/v3/meters/{id}": {
      "post": {
        "responses": {
          "200": {
            "description": "Created successfully",
            "headers": {}
          },
          "201": {
            "description": "Updated successfully",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a meter",
        "operationId": "createMeter",
        "description": "Creates or updates a meter for specified `id`.",
        "tags": [
          "Meter"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Meter identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_MeterBody"
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/meter"
                },
                "examples": {
                  "response": {
                    "value": {
                      "label": "Test meter",
                      "description": "This is a meter",
                      "unit": "views",
                      "limit": 5,
                      "cycle": "calendar",
                      "period": "monthly",
                      "timezone": "+0:00",
                      "auto_assign": "none"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve a meter",
        "operationId": "getMeter",
        "description": "Retrieves a single meter with specified `id`.",
        "tags": [
          "Meter"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Meter identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK - meter was deleted successfully",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a meter",
        "operationId": "deleteMeter",
        "description": "Deletes a meter if the meter with `id` exists.",
        "tags": [
          "Meter"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Meter identifier",
            "required": true,
            "example": "ad29c8fb-9a4b-428d-98d4-893116ef2afc",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/products": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/products"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "id": "one",
                          "label": "One month access",
                          "description": "One month access",
                          "entitlement": {
                            "id": "gold-bundle",
                            "type": "bundle"
                          },
                          "mapping": {
                            "braintree_one_off": {
                              "price_points": [
                                {
                                  "id": "ten",
                                  "label": "Ten Dollars",
                                  "price": 10
                                }
                              ]
                            }
                          },
                          "sharingLimit": 0
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List products",
        "operationId": "listProducts",
        "description": "Retrieves all configured products.",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created. The product was created.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Product created successfully"
                    },
                    "uri": {
                      "type": "string",
                      "example": "https://company.api.zephr.com/v3/products/63b68935-c996-4e90-b88a-dd6a133a7a3"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Returned if the request body is invalid.",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized. Returned if no valid authentication was provided.",
            "headers": {}
          },
          "409": {
            "description": "Conflict. Returned when missing a reference to the entitlement.",
            "headers": {}
          }
        },
        "summary": "Save a product",
        "operationId": "saveProduct",
        "description": "This endpoint saves a product with the given details specified in the body of the request. The product ID is randomyly generated and provided as part of the URI path parameter response returned on success.",
        "tags": [
          "Products"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/product-request"
              }
            }
          }
        }
      }
    },
    "/v3/products/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK. Returns the product details.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/product"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Returned if no valid authentication was provided.",
            "headers": {}
          },
          "404": {
            "description": "Not Found. The product does not exist.",
            "headers": {}
          }
        },
        "summary": "Retrieve a product",
        "operationId": "getProduct",
        "description": "Retrieves a single product. The product is identified by the `id` path parameter.",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Product identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK. The product was deleted.",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized. Returned if no valid authentication was provided.",
            "headers": {}
          },
          "404": {
            "description": "Not Found. The product does not exist.",
            "headers": {}
          }
        },
        "summary": "Delete a product",
        "operationId": "deleteProduct",
        "description": "Deletes a product. The product is identified by the `id` path parameter.",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Product identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK. The product was updated.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Product updated successfully"
                    },
                    "uri": {
                      "type": "string",
                      "example": "https://company.api.zephr.com/v3/products/gold"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created. The product was created.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Product created successfully"
                    },
                    "uri": {
                      "type": "string",
                      "example": "https://company.api.zephr.com/v3/products/gold"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Returned if the request body is invalid.",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized. Returned if no valid authentication was provided.",
            "headers": {}
          },
          "409": {
            "description": "Conflict. Returned when missing a reference to the entitlement.",
            "headers": {}
          }
        },
        "summary": "Save a product with the given ID",
        "operationId": "saveProducts",
        "description": "This endpoint both saves and updates a product. The product is identified by the `id` path parameter. If the product ID does not exist, then a new product with the corresponding ID will be created. Otherwise, the existing product will be modified.",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Product identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/product-request"
              }
            }
          }
        }
      }
    },
    "/v3/request-rules": {
      "get": {
        "responses": {
          "200": {
            "description": "OK - Request rules have been retrieved successfully",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/request_rules_container_object"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "label": "Test",
                          "conditions": {
                            "url_pattern": "^/forum",
                            "method": "GET"
                          },
                          "requirements_script": "return []",
                          "action_script": "return \"this is a test\"",
                          "script_type": "javascript",
                          "graph_state": "{\"property1\": \"value1\"}",
                          "editing_mode": "manual",
                          "version": 1,
                          "description": "Test description",
                          "priority": 1,
                          "last_updated": "2011-11-11T11:11:11.000"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Tags size exceeded the limit of 50",
            "headers": {}
          }
        },
        "summary": "List request rules",
        "operationId": "listRequestRules",
        "description": "Retrieves a list of request rules wrapped in the element \"results\".",
        "parameters": [
          {
            "name": "tags",
            "in": "query",
            "description": "A comma-separeted list of request rule tags (Maximum 50 tags allowed)",
            "schema": {
              "type": "string",
              "example": "tag1,tag2,tag3"
            }
          }
        ],
        "tags": [
          "Request Rules"
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Save a request rule",
        "operationId": "saveRequestRule",
        "description": "Saves a request rule.",
        "tags": [
          "Request Rules"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "conditions": {
                    "type": "object",
                    "properties": {
                      "url_pattern": {
                        "type": "string"
                      },
                      "method": {
                        "type": "string"
                      }
                    }
                  },
                  "requirements_script": {
                    "type": "string"
                  },
                  "action_script": {
                    "type": "string"
                  },
                  "script_type": {
                    "type": "string"
                  },
                  "graph_state": {
                    "type": "string"
                  },
                  "editing_mode": {
                    "type": "string"
                  }
                },
                "example": {
                  "label": "Test",
                  "conditions": {
                    "url_pattern": "^/forum",
                    "method": "GET"
                  },
                  "requirements_script": "return []",
                  "action_script": "return \"this is a test\"",
                  "script_type": "javascript",
                  "graph_state": "{\"property1\": \"value1\"}",
                  "editing_mode": "manual"
                }
              }
            }
          }
        }
      }
    },
    "/v3/request-rules/{id}": {
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a request rule",
        "operationId": "deleteRequestRule",
        "description": "Deletes a request rule.",
        "tags": [
          "Request Rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Request Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/request-rules/{id}/versions/{versionId}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/request_rules_object"
                }
              }
            }
          }
        },
        "summary": "Retrieve a particular version of a request rule",
        "operationId": "getRequestRuleVersion",
        "description": "Retrieves a request rule version.",
        "tags": [
          "Request Rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Request Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "description": "Unique Request Rule version number",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a request rule version",
        "operationId": "deleteRequestRuleVersion",
        "description": "Deletes a request rule version.",
        "tags": [
          "Request Rules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Request Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "description": "Unique Request Rule version identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/sessions": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/session"
                },
                "examples": {
                  "response": {
                    "value": {
                      "expiryDate": "2018-11-15 14:29 PM UTC",
                      "startDate": "2017-11-15 14:29 PM UTC",
                      "authenticated": true,
                      "session_id": "SS0123456789ABCD",
                      "user_id": "UU0123456789ABCD"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a session",
        "operationId": "createNewSession",
        "description": "Creates a new session.",
        "tags": [
          "Session"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "type": "object",
                    "properties": {
                      "email_address": {
                        "type": "string"
                      }
                    }
                  },
                  "validators": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string"
                      },
                      "use_sso": {
                        "type": "boolean",
                        "description": "When this is present there should be no identifiers in the body. The user is identified through a `blaize_session` cookie."
                      }
                    }
                  }
                },
                "required": [
                  "identifiers",
                  "validators"
                ],
                "example": {
                  "identifiers": {
                    "email_address": "joe.blow@company.com"
                  },
                  "validators": {
                    "password": "mysecurepassword123"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/sessions/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/session-lookup"
                },
                "examples": {
                  "response": {
                    "value": {
                      "session_variables": {},
                      "user_id": "UU0123456789ABCD",
                      "sessions": [
                        {
                          "expiryDate": "2018-11-15 14:29 PM UTC",
                          "startDate": "2017-11-15 14:29 PM UTC",
                          "authenticated": true,
                          "session_id": "SS0123456789ABCD",
                          "user_id": "UU0123456789ABCD"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a session",
        "operationId": "getSession",
        "description": "Looks up a session.",
        "tags": [
          "Session"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Session identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/static": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/static_items"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "id": "123456789ABCD"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List static items",
        "operationId": "listStaticItems",
        "description": "Retrieves a list of static item ids wrapped in the element \"results\".",
        "tags": [
          "Static Items"
        ]
      }
    },
    "/v3/static/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/static_single_item"
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "123456789ABCD",
                      "item": "Lorem ipsum..."
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a static item",
        "operationId": "getItem",
        "description": "Retrieves a static item.",
        "tags": [
          "Static Items"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Static Item identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a static item",
        "operationId": "Delete_Item",
        "description": "Deletes a static item.",
        "tags": [
          "Static Items"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Static Item identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Save a static item",
        "operationId": "saveItem",
        "description": "Saves a static item.",
        "tags": [
          "Static Items"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Static Item identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/zephr/oauth2/token": {
      "post": {
        "security": [],
        "summary": "Token refresh or exchange",
        "operationId": "refreshOrExchangeToken",
        "description": "Exchanges the OAuth2 authorization code for an access token, or refreshes an existing access token using a refresh token.",
        "tags": [
          "Third Party Authentication"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "oneOf": [
                  {
                    "required": [
                      "grant_type",
                      "refresh_token"
                    ],
                    "properties": {
                      "grant_type": {
                        "type": "string",
                        "enum": [
                          "refresh_token"
                        ]
                      },
                      "refresh token": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "required": [
                      "grant_type",
                      "code",
                      "redirect_uri"
                    ],
                    "properties": {
                      "grant_type": {
                        "type": "string",
                        "enum": [
                          "authorization_code"
                        ]
                      },
                      "code": {
                        "type": "string"
                      },
                      "redirect_uri": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "RefreshToken": {
                  "summary": "Refresh token request",
                  "value": {
                    "grant_type": "refresh_token",
                    "refresh_token": "6kuabo4gug8t9h13x7gt43cm"
                  }
                },
                "AuthorizationCode": {
                  "summary": "Authorization code request",
                  "value": {
                    "grant_type": "authorization_code",
                    "code": 1234567890,
                    "redirect_uri": "https://someUrl.com/callback"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/oauth2-token-exchange-response"
                    },
                    {
                      "$ref": "#/components/schemas/oauth2-token-refresh-response"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v3/user-export": {
      "get": {
        "responses": {
          "200": {
            "description": "OK - The paginated user data has been exported successfully.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user-export-paginated-response"
                }
              }
            }
          }
        },
        "summary": "Export users",
        "operationId": "exportUsers",
        "description": "Export users who match the provided parameters.",
        "tags": [
          "User Export"
        ],
        "parameters": [
          {
            "name": "attributes",
            "in": "query",
            "description": "Whether or not to include core attributes.",
            "required": true,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "appIds",
            "in": "query",
            "description": "Comma-delimited list of appIds to retrieve extended profile data for. If appIds is present and attributes isn't, only users with matching extended profiles will be returned.",
            "required": true,
            "example": "quiz1,survey4",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appIdsRestrictive",
            "in": "query",
            "description": "Only include users with a matching extended profile",
            "required": false,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "grants",
            "in": "query",
            "description": "Include information about entitlements",
            "required": false,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Users who were updated after the specified date",
            "required": false,
            "example": "2020-01-01T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registeredSince",
            "in": "query",
            "description": "Users who have registered after the specified date",
            "required": false,
            "example": "2020-01-01T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registeredBefore",
            "in": "query",
            "description": "Users who have registered before the specified date",
            "required": false,
            "example": "2020-01-01T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rpp",
            "in": "query",
            "description": "Results per page",
            "required": false,
            "example": 40,
            "schema": {
              "type": "number",
              "default": 500
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The requested page of results",
            "required": false,
            "example": 1,
            "schema": {
              "type": "number",
              "default": 1
            }
          }
        ]
      }
    },
    "/v4/user-export": {
      "get": {
        "responses": {
          "200": {
            "description": "OK - User and user event data have been returned successfully",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user-export-paginated-response"
                }
              }
            }
          }
        },
        "summary": "Export users and user events",
        "operationId": "exportUserAndEventsCSV",
        "description": "Downloads all subscribers and subscriber events data in csv format. \n- To download subscribers data, specify the `attributes` query parameter to `true`, and use the `attr`, `appIds`, `appIdsRestrictive`, `grants`, `since`, `registeredSince`, `registeredBefore`, `foreignKeys` query parameters.\n- To download subscriber events data, specify the `eventsExport` query parameter to `true`, and use the `from` and `to` query parameters.\n- For pagination, use the `rpp` and `page` query parameters\n",
        "tags": [
          "User Export"
        ],
        "parameters": [
          {
            "name": "attributes",
            "in": "query",
            "description": "Whether or not to include core attributes",
            "required": false,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "attr",
            "in": "query",
            "description": "Comma-delimited list of user attribute filters in the following format: `attributeKey.operation.value` or `attributeKey.operation.value1.value2`.",
            "required": false,
            "example": "attr1.contains.a,attr2.equals.3",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appIds",
            "in": "query",
            "description": "Comma-delimited list of appIds to retrieve extended profile data for. If appIds is present and attributes isn't, only users with matching extended profiles will be returned. Use `all` to retrieve all extended profile data.",
            "required": false,
            "example": "quiz1,survey4,all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "appIdsRestrictive",
            "in": "query",
            "description": "Only include users with a matching extended profile",
            "required": false,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "grants",
            "in": "query",
            "description": "Include information about entitlements",
            "required": false,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "Users who were updated after the specified date",
            "required": false,
            "example": "2020-01-01T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registeredSince",
            "in": "query",
            "description": "Users who have registered after the specified date",
            "required": false,
            "example": "2020-01-01T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "registeredBefore",
            "in": "query",
            "description": "Users who have registered before the specified date",
            "required": false,
            "example": "2020-01-01T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "foreignKeys",
            "in": "query",
            "description": "Include user foreign keys",
            "required": false,
            "example": "true",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "eventsExport",
            "in": "query",
            "description": "Indicates to export the subscriber events csv file",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Subscriber event after the specified date",
            "required": false,
            "example": "2020-01-01T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Subscriber event before the specified date",
            "required": false,
            "example": "2020-01-02T00:00:00Z",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rpp",
            "in": "query",
            "description": "Results per page",
            "required": false,
            "example": 40,
            "schema": {
              "type": "number",
              "default": 500
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The requested page of results",
            "required": false,
            "example": 1,
            "schema": {
              "type": "number",
              "default": 1
            }
          }
        ]
      }
    },
    "/v3/schema/users": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schemas"
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "slug": "slug1",
                        "label": "Test",
                        "internal-description": "This is for testing",
                        "public-description": "Please provide some info",
                        "required": false,
                        "decision-point": false,
                        "validation-expression": "test",
                        "input-type": "text",
                        "select-options": "null",
                        "range-start": 0,
                        "range-end": 100,
                        "range-step": 5
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a user schema",
        "operationId": "retrieveUserSchema",
        "description": "Retrieves a user Schema.",
        "tags": [
          "User Schema"
        ]
      }
    },
    "/v3/schema/users/{slug}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema-field"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve a schema slug",
        "operationId": "getSchemaSlug",
        "description": "Retrieves a schema slug.",
        "tags": [
          "User Schema"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Unique identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/schema-field-deletion-response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a schema slug",
        "operationId": "deleteSchemaSlug",
        "description": "Deletes a schema slug.",
        "tags": [
          "User Schema"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Unique identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "Updated",
            "headers": {}
          },
          "201": {
            "description": "Created",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema-field-creation-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Field added to user schema successfully",
                      "uri": "http://host/v3/schema/users/slug"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Save a schema slug",
        "operationId": "saveSchemaSlug",
        "description": "Saves a schema slug.",
        "tags": [
          "User Schema"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Unique identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/schema-field"
              }
            }
          }
        }
      }
    },
    "/v3/users": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "user_id": "123456789ABCD",
                          "identifiers": {
                            "email_address": "joe.blow@company.com"
                          },
                          "attributes": {
                            "first_name": "Joe",
                            "surname": "Blow"
                          },
                          "email_verified": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "List users",
        "operationId": "listUsers",
        "description": "Retrieves a list of users wrapped in the element \"results\".",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "identifiers.email_address",
            "in": "query",
            "description": "Email address of the user to search for.",
            "required": true,
            "example": "example@example.com",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "identifiers.username",
            "in": "query",
            "description": "Username of the user to search for.",
            "required": true,
            "example": "username",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "foreign_key.xxx",
            "in": "query",
            "description": "Foreign key of the user to search for. The foreign system is parsed as the remainder of the parameter key name following 'foreign_id.'",
            "required": true,
            "example": "123abc",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Performs a general search for the specified value across multiple fields, including attributes.",
            "required": true,
            "example": "abc",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search_by_attributes",
            "in": "query",
            "description": "Several attribute filters can be specified to search for users with particular attributes. It needs to be Base64 and URL encoded.",
            "schema": {
              "$ref": "#/components/schemas/search_by_attributes"
            }
          }
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "data": {
                        "user_id": "123456789ABCD",
                        "identifiers": {
                          "email_address": "joe.blow@company.com"
                        },
                        "attributes": {
                          "first_name": "Joe",
                          "surname": "Blow"
                        },
                        "email_verified": true
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a user",
        "operationId": "createUser",
        "description": "Creates a new user.",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/user-creation"
              }
            }
          }
        }
      }
    },
    "/v3/users/{user_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "user_id": "123456789ABCD",
                      "identifiers": {
                        "email_address": "joe.blow@company.com"
                      },
                      "attributes": {
                        "first_name": "Joe",
                        "surname": "Blow"
                      },
                      "email_verified": true
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a user",
        "operationId": "getUser",
        "description": "Retrieves a user.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a user",
        "operationId": "deleteUser",
        "description": "Deletes a user.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/users/{user_id}/attributes": {
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Update all user attributes",
        "operationId": "replaceUserAttributes",
        "description": "Replaces a user's attributes. This will replace any existing attributes for the user with the attributes in the payload.\nTo leave existing attributes in place, use PATCH.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Update_User_attributesBody"
        }
      },
      "patch": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Update user attributes",
        "operationId": "updateUserAttribute",
        "description": "Updates a user's attributes. Any of the user's existing attributes not specified in the payload will be left in-place.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Update_User_attributesBody"
        }
      }
    },
    "/v3/users/{user_id}/profile/{app_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "User extended profile"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. Thrown when app_id starts with _restricted.",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized. The user is not authorized to fetch the profile.",
            "headers": {}
          },
          "404": {
            "description": "Not Found. The provided user does not exist.",
            "headers": {}
          }
        },
        "summary": "Retrieve Extended User Profiles",
        "description": "Extended Profile is used to store additional user information that is not part of the core profile. This endpoint is designed to be used for retrieving the user's Extended Profile. The body can be any valid JSON.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User Identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "app_id",
            "in": "path",
            "description": "Unique App Identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/user-updates": {
      "post": {
        "summary": "Update users in bulk",
        "operationId": "updateBulkUsers",
        "description": "Updates user's attributfoes or delete users on a bulk basis. \n\nWhen setting attributes, any of the user's existing attributes not specified in the payload will be left in-place.\n",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Bulk_User_Update_Request"
        },
        "responses": {
          "202": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bulk_User_Update_Response"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid. A required attribute is missing or an attribute did not meet the expected criteria.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "missingName": {
                    "value": {
                      "error": "Please provide name of file to upload"
                    }
                  },
                  "invalidType": {
                    "value": {
                      "error": "Unsupported MIME type provided"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication credentials were not provided or are invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "missingCredentials": {
                    "value": {
                      "error": "Authentication credentials are required"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Get_Bulk_User_Update_Jobs_Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List all bulk user update jobs",
        "operationId": "listBulkUserUpdateJobs",
        "description": "Lists all bulk user update jobs.\n",
        "tags": [
          "Users"
        ]
      }
    },
    "/v4/user-updates/{job_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Get_Bulk_User_Update_Job_Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieves a bulk user update job",
        "operationId": "retrieveBulkUserUpdateJob",
        "description": "Retrieves the status of a bulk user update job.\n",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "description": "Id of the job.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/users/segments": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a user segment",
        "operationId": "createUserSegment",
        "description": "Creates a new User Segment.",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_User_Segment_Body"
        }
      },
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User_Segments_Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List user segments",
        "operationId": "listUserSegment",
        "description": "Lists all user segments available for users.",
        "tags": [
          "Users"
        ]
      }
    },
    "/v4/users/segments/{segmentId}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User_Segment_Response"
                }
              }
            }
          }
        },
        "summary": "Retrieve a user segment",
        "operationId": "getUserSegment",
        "description": "Retrieves a user segment.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "segmentId",
            "in": "path",
            "description": "Unique User Segment Identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          }
        },
        "summary": "Delete a user segment",
        "operationId": "deleteUserSegment",
        "description": "Deletes a user segment by ID.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "segmentId",
            "in": "path",
            "description": "Unique User Segment Identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/users/{userId}/segments": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User_Segments_Response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List user segments for a user",
        "operationId": "listUserSegmentsforUser",
        "description": "Lists all user segments for a given `userId`.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "example": "3f589a2d-86ad-4b70-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/users/{user_id}/update-email": {
      "post": {
        "responses": {
          "201": {
            "description": "OK. The process to update email started and is potentially already completed, depending on the Email Verification configuration flag. See endpoint description for more information.\n",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "404": {
            "description": "User ID not Found",
            "headers": {}
          },
          "409": {
            "description": "Email address already in use",
            "headers": {}
          }
        },
        "summary": "Start an email address update",
        "operationId": "startEmailAddressUpdate",
        "description": "Starts an email address update. \nIf the Require Email Verification configuration flag is set, to update a user's email address, first they need to verify their new address. If the Email Change Override feature flag is enabled, the an email with a link to verify the address will be sent to the new address. Otherwise the email will be sent to the old address.\nIf the Require Email Verification configuration flag is not set, this endpoint sets the new email address immediately. If the user has a username and the provided email address is blank, the email address is deleted. If the user does not have a username and the provided email address is blank, a 400 is returned.\n",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new_identifiers": {
                    "type": "object",
                    "properties": {
                      "email_address": {
                        "type": "string",
                        "pattern": ".+@.+\\..+"
                      }
                    },
                    "required": [
                      "email_address"
                    ]
                  }
                },
                "required": [
                  "new_identifiers"
                ],
                "example": {
                  "new_identifiers": {
                    "email_address": "joe.blow@company.com"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v4/users/reset": {
      "post": {
        "responses": {
          "200": {
            "description": "OK - The password reset flow has been started successfully",
            "headers": {}
          },
          "400": {
            "description": "Bad Request - Incorrect payload was submitted",
            "headers": {}
          },
          "404": {
            "description": "Not Found - Site not found with the supplied `siteSlug`, or user not found with the supplied email address",
            "headers": {}
          }
        },
        "summary": "Start a password reset",
        "operationId": "startPasswordReset",
        "description": "Starts a password reset.\n\n**IMPORTANT**: To reset a user password, first is required to send a POST to request an email to be sent to the user’s email with a link for the user to click on, so as to verify that they requested this password change.\n",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "type": "object",
                    "properties": {
                      "email_address": {
                        "type": "string",
                        "example": "joe.blow@company.com"
                      }
                    }
                  },
                  "siteSlug": {
                    "type": "string",
                    "description": "The slug of the site where the user account is registered.\n",
                    "example": "my-site"
                  }
                },
                "required": [
                  "identifiers",
                  "siteSlug"
                ],
                "example": {
                  "identifiers": {
                    "email_address": "joe.blow@company.com"
                  },
                  "siteSlug": "my-site"
                }
              }
            }
          }
        }
      }
    },
    "/v3/users/token-exchange": {
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Start a passwordless authentication",
        "operationId": "startPasswordlessAuthentication",
        "description": "Starts a passwordless authentication.\n\n**IMPORTANT**: For passwordless authentication, first is required to send a POST to request an email to be sent to the user’s email with a link for the user to click on to verify his email.\n",
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "type": "object",
                    "properties": {
                      "email_address": {
                        "type": "string"
                      }
                    }
                  },
                  "delivery": {
                    "type": "object",
                    "properties": {
                      "method": {
                        "type": "string"
                      },
                      "destination": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string"
                      },
                      "redirect": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "identifiers",
                  "delivery"
                ],
                "example": {
                  "identifiers": {
                    "email_address": "joe.blow@company.com"
                  },
                  "delivery": {
                    "method": "email",
                    "destination": "joe.blow@company.com",
                    "action": "login",
                    "redirect": "/"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v3/users/{user_id}/sessions": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/session-lookup"
                    },
                    {
                      "$ref": "#/components/schemas/sessions"
                    }
                  ]
                },
                "examples": {
                  "response": {
                    "value": {
                      "session_variables": {},
                      "user_id": "UU0123456789ABCD",
                      "sessions": [
                        {
                          "expiryDate": "2018-11-15 14:29 PM UTC",
                          "startDate": "2017-11-15 14:29 PM UTC",
                          "authenticated": true,
                          "session_id": "SS0123456789ABCD",
                          "user_id": "UU0123456789ABCD"
                        }
                      ],
                      "access_model": {
                        "meters": [],
                        "credits": [],
                        "delivered_entitlements": []
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List user sessions",
        "operationId": "listUserSessions",
        "description": "Retrieves a list of the user's sessions.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/users/{user_id}/accounts": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/account-user"
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "user_id": "0123456789ABCD",
                          "account_id": "0123456789ABCD"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "List user accounts",
        "operationId": "listUserAccounts",
        "description": "Retrieves a list of the user's accounts.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/users/{user_id}/authorization/refresh": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/access_model"
                },
                "examples": {
                  "response": {
                    "value": {
                      "meters": {},
                      "credits": {},
                      "delivered_entitlements": [
                        {
                          "id": "0123456789ABCD",
                          "direct": true,
                          "meteredBy": [],
                          "creditedBy": []
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Refresh a access model",
        "operationId": "refreshAccessModel",
        "description": "Refreshes the user's access model.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/users/{user_Id}/legacyPassword": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin-user-response"
                },
                "examples": {
                  "response": {
                    "value": {
                      "message": "Legacy Password updated successfully to be used instead of password",
                      "user_id": "{userId}",
                      "uri": "http://localhost:8080/v3/users/{userId}/legacyPassword"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Reset a legacy password",
        "operationId": "resetLegacyPassword",
        "description": "Sets the current password to an empty string, also sets the legacy password to the provided string.",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "user_Id",
            "in": "path",
            "description": "Unique User identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/sessions/{site}": {
      "post": {
        "responses": {
          "201": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/session"
                },
                "examples": {
                  "response": {
                    "value": {
                      "expiryDate": "2018-11-15 14:29 PM UTC",
                      "startDate": "2017-11-15 14:29 PM UTC",
                      "authenticated": true,
                      "session_id": "SS0123456789ABCD",
                      "user_id": "UU0123456789ABCD"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Create a new session under a given site",
        "operationId": "createNewSessionUnderGivenSite",
        "description": "Creates a new session under a given site.",
        "tags": [
          "V4 Session"
        ],
        "parameters": [
          {
            "name": "site",
            "in": "path",
            "description": "The site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "type": "object",
                    "properties": {
                      "email_address": {
                        "type": "string"
                      }
                    }
                  },
                  "validators": {
                    "type": "object",
                    "properties": {
                      "password": {
                        "type": "string"
                      },
                      "use_sso": {
                        "type": "boolean",
                        "description": "When this is present there should be no identifiers in the body. The user is identified through a `blaize_session` cookie."
                      }
                    }
                  }
                },
                "required": [
                  "identifiers",
                  "validators"
                ],
                "example": {
                  "identifiers": {
                    "email_address": "joe.blow@company.com"
                  },
                  "validators": {
                    "password": "mysecurepassword123"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v4/sessions/{site}/{sessionId}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK. Returns the session details.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/session-lookup"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. No valid authentication was provided.",
            "headers": {}
          },
          "404": {
            "description": "No session found. The site or the session ID is invalid.",
            "headers": {}
          }
        },
        "summary": "Look up a session under a given site",
        "operationId": "lookupSessionUnderGivenSite",
        "description": "This endpoint allows you to access specific session details for a particular site. By providing the unique identifiers for the site and the session, you can retrieve detailed information about that session. This information can include the session's start time, end time, current status, and any associated user data. The exact content of the response will depend on the specific session and site identifiers provided in the request.",
        "tags": [
          "V4 Session"
        ],
        "parameters": [
          {
            "name": "site",
            "in": "path",
            "description": "The unique site identifier within the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "description": "Unique session identifier assigned to each session, enabling precise identification and retrieval of session-related information within the API.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK. The session was successfully deleted.",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized. No valid authentication was provided.",
            "headers": {}
          },
          "404": {
            "description": "No session found. The site or the session ID is invalid.",
            "headers": {}
          }
        },
        "summary": "Delete a session under a given site",
        "operationId": "deleteSessionUnderGivenSite",
        "description": "This endpoint is used to delete a specific session for a given site. You need to provide the unique identifiers for the site and the session. This operation is useful when you want to manually end a session before it naturally expires.",
        "tags": [
          "V4 Session"
        ],
        "parameters": [
          {
            "name": "site",
            "in": "path",
            "description": "The unique site identifier within the tenant.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "description": "Unique session identifier assigned to each session, enabling precise identification and retrieval of session-related information within the API.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/accounts/{accountId}/grants": {
      "get": {
        "responses": {
          "200": {
            "description": "OK - Users were found for `accountId`",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "userId": {
                        "type": "string"
                      },
                      "accountId": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "userId": "3f589a2d-86ad-4b70-a5df-68dca75a3a21",
                        "accountId": "5fag4a2d-86cd-4bb0-a5df-68dca75a3a21"
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Cannot find users with the supplied `accountId`",
            "headers": {}
          }
        },
        "summary": "List account users",
        "operationId": "listAccountUsersV4",
        "description": "Retrieves all the account users, if the `accountId` has users.",
        "tags": [
          "Account User"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "example": "5fag4a2d-86cd-4bb0-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create an account grant",
        "operationId": "createAccountGrantV4",
        "description": "Creates an account grant. This is for an account that is specified by the `accountId`",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/Create_GrantBody"
        }
      }
    },
    "/v4/accounts/{accountId}/grants/{grantId}": {
      "delete": {
        "responses": {
          "200": {
            "description": "OK - The grant was found and successfully deleted",
            "headers": {},
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": "Account grant revoked"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Cannot find an existing grant for the supplied `accountId` and `grantId`",
            "headers": {}
          }
        },
        "summary": "Delete an account grant",
        "operationId": "deleteAccountGrant",
        "description": "Deletes an account grant specified by the `grantId`. This is for a user that is specified by the `accountId`.",
        "tags": [
          "Grants"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "example": "3f589a2d-86ad-4b70-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "description": "Unique Grant identifier",
            "required": true,
            "example": "5fag4a2d-86cd-4bb0-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/accounts/{accountId}/users": {
      "post": {
        "responses": {
          "202": {
            "description": "OK - Adding account users to company account `accountId` was successful",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/add-bulk-account-users-by-domains"
                },
                "examples": {
                  "response": {
                    "value": "Bulk adding account users for account `accountId`"
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict - Cannot add account users to company account `accountId`",
            "headers": {}
          },
          "500": {
            "description": "Internal Error - Failed to bulk add account users for account `accountId`",
            "headers": {}
          }
        },
        "summary": "Post an account grant",
        "operationId": "postAccountBulking",
        "description": "Adding account users to company account by email domain.",
        "tags": [
          "Accounts"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Unique Account Company identifier",
            "required": true,
            "example": "3f589a2d-86ad-4b70-a5df-68dca75a3a21",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/anonymous-sessions/{site}": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/session"
                },
                "examples": {
                  "response": {
                    "value": {
                      "expiryDate": "2018-11-15 14:29 PM UTC",
                      "startDate": "2017-11-15 14:29 PM UTC",
                      "authenticated": true,
                      "session_id": "SS0123456789ABCD",
                      "user_id": "UU0123456789ABCD"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {}
          }
        },
        "summary": "Create an anonymous session under a given site",
        "operationId": "createAnonymousSessionUnderGivenSite",
        "description": "Creates an anonymous session under a given site.",
        "tags": [
          "V4 Session"
        ],
        "parameters": [
          {
            "name": "site",
            "in": "path",
            "description": "The site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/webhooks": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/webhook-responses-container"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "webhook_id": "01234567890ABCD",
                          "label": "Test webhook",
                          "triggers": [
                            "user.create",
                            "user.delete"
                          ],
                          "method": "POST",
                          "target": "http://localhost:9999"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List webhooks",
        "operationId": "listWebhooks",
        "description": "Retrieves a list of webhooks wrapped in the element \"results\".",
        "tags": [
          "Webhook"
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a webhook",
        "operationId": "createWebhook",
        "description": "Creates a Webhook.",
        "tags": [
          "Webhook"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "triggers": {
                    "type": "array",
                    "items": {}
                  },
                  "method": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  }
                },
                "example": {
                  "label": "Test webhook",
                  "triggers": [
                    "user.create",
                    "user.delete"
                  ],
                  "method": "POST",
                  "target": "http://localhost:9999"
                }
              }
            }
          }
        }
      }
    },
    "/v3/webhooks/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/webhooks-responses"
                },
                "examples": {
                  "response": {
                    "value": {
                      "webhook_id": "01234567890ABCD",
                      "label": "Test webhook",
                      "triggers": [
                        "user.create",
                        "user.delete"
                      ],
                      "method": "POST",
                      "target": "http://localhost:9999"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Retrieve a webhook",
        "operationId": "getWebhook",
        "description": "Retrieves a webhook.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Webhook identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete a webhook",
        "operationId": "deleteWebhook",
        "description": "Deletes a webhook.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Webhook identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Update a webhook",
        "operationId": "updateWebhook",
        "description": "Updates a webhook.",
        "tags": [
          "Webhook"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Webhook identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhook_id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "triggers": {
                    "type": "array",
                    "items": {}
                  },
                  "method": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  }
                },
                "example": {
                  "webhook_id": "01234567890ABCD",
                  "label": "Test webhook",
                  "triggers": [
                    "user.create",
                    "user.delete"
                  ],
                  "method": "POST",
                  "target": "http://localhost:9999"
                }
              }
            }
          }
        }
      }
    },
    "/v3/accounts": {
      "get": {
        "parameters": [
          {
            "name": "rpp",
            "in": "query",
            "description": "The number of results per page you want to retrieve.",
            "schema": {
              "type": "number",
              "example": 15,
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page number for which you want to retrieve results.",
            "schema": {
              "type": "number",
              "example": 15,
              "default": 10
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "The search query that searches accounts by their names",
            "schema": {
              "type": "string",
              "example": "My account"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Accounts have been retrieved successfully",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/simple_account_bodies"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "account_id": "10549fef-cddb-4b1f-92e4-27ab7cb2e555",
                          "name": "Account name",
                          "tenant_id": "my-tenant",
                          "number_of_seats": 7,
                          "email_address": "company@email.com"
                        }
                      ],
                      "total": 20
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List accounts",
        "operationId": "listAccounts",
        "description": "Retrieves a paginated list of accounts in `results` according to  the passed in `rpp`, `page` and `search` parameters alongside  the total number of items matching the search query (`total`).",
        "tags": [
          "Account"
        ]
      },
      "post": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create an account",
        "operationId": "createAccount",
        "description": "Creates an account.",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "description": "Description",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Create_AccountBody"
              }
            }
          }
        }
      }
    },
    "/v3/accounts/{id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response_accountbody"
                },
                "examples": {
                  "response": {
                    "value": {
                      "company_id": "123456789ABCD",
                      "name": "Account name",
                      "number_of_seats": 5,
                      "allow_oversubscription": true,
                      "notify_when_account_oversubscribed": true,
                      "notify_on_each_registration_when_account_is_oversubscribed": true,
                      "registration_code": "Registration code",
                      "on_premises_ips": "125.124.143.24",
                      "premises_tags": "[\"gold-tier\", \"university\"]",
                      "session_limit": 10,
                      "session_limit_behaviour": "PREVENT_LOGIN"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Account id not found"
          }
        },
        "summary": "Retrieve an account",
        "operationId": "getAccount",
        "description": "Retrieves an account.",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {}
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Delete an account",
        "operationId": "deleteAccount",
        "description": "Deletes an account.",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "responses": {
          "201": {
            "description": "Created",
            "headers": {}
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Update an account",
        "operationId": "updateAccount",
        "description": "Updates an account.",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Account identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Description",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Create_AccountBody",
                "examples": {
                  "response": {
                    "value": {
                      "company_id": "123456789ABCD",
                      "name": "Account name",
                      "number_of_seats": 5,
                      "allow_oversubscription": true,
                      "notify_when_account_oversubscribed": true,
                      "notify_on_each_registration_when_account_is_oversubscribed": true,
                      "registration_code": "Registration code",
                      "on_premises_ips": "125.124.143.24",
                      "premises_tags": "[\"gold-tier\", \"university\"]",
                      "session_limit": 10,
                      "session_limit_behaviour": "PREVENT_LOGIN"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v4/accounts/{account_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response_accountbody"
                },
                "examples": {
                  "response": {
                    "value": {
                      "company_id": "123456789ABCD",
                      "name": "Account name",
                      "number_of_seats": 5,
                      "allow_oversubscription": true,
                      "notify_when_account_oversubscribed": true,
                      "notify_on_each_registration_when_account_is_oversubscribed": true,
                      "registration_code": "Registration code",
                      "on_premises_ips": "125.124.143.24",
                      "premises_tags": "[\"gold-tier\", \"university\"]",
                      "session_limit": 10,
                      "session_limit_behaviour": "PREVENT_LOGIN"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Retrieve an account for V4",
        "operationId": "getAccountV4",
        "description": "Retrieves an V4 account.",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "Unique Account identifier V4",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v3/healthchecks/origin": {
      "get": {
        "responses": {
          "200": {
            "description": "OK - Returned when origin is returning available",
            "headers": {}
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {}
          },
          "503": {
            "description": "Service Unavailable - The V3 console doesn't handle a 401 response from this endpoint properly",
            "headers": {}
          }
        },
        "summary": "Check availability of the origin",
        "description": "Sends a request to the origin site to verify availability.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "cookie",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Health Check"
        ]
      }
    },
    "/v3/request-rules/{id}/versions": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/request_rules_object"
                },
                "examples": {
                  "response": {
                    "value": {
                      "label": "Test",
                      "conditions": {
                        "url_pattern": "^/forum",
                        "method": "POST"
                      },
                      "requirements_script": "return []",
                      "action_script": "return \"this is a test\"",
                      "script_type": "javascript",
                      "graph_state": "{\"property1\": \"value1\"}",
                      "editing_mode": "manual"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Create a request rule version",
        "operationId": "createRequestRuleVersion",
        "description": "Create a request rule version",
        "tags": [
          "Request Rules Version"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Unique Request Rule identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/zephr/public/template-components/v1/template-components/{templateConfigId}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "response": {
                    "value": [
                      "The template the-value::!"
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {}
          }
        },
        "summary": "Fetch external template",
        "operationId": "fetchExternalTemplate",
        "description": "Fetch External Template",
        "parameters": [
          {
            "name": "templateConfigId",
            "in": "path",
            "description": "Unique External Template identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v4/pages/upload-url": {
      "post": {
        "responses": {
          "201": {
            "description": "OK - An upload URL has successfully been generated",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "logoId": {
                      "type": "string",
                      "example": "857945ea-b4e1-4fba-84ce-73755d987243",
                      "description": "The generated ID for the page logo"
                    },
                    "uploadUrl": {
                      "type": "string",
                      "example": "https://s3.amazonaws.com/test-bucket/2022/test.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55",
                      "description": "The generated presigned S3 upload URL"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Generates an S3 upload URL",
        "operationId": "generatePageUploadURL",
        "description": "Generates a presigned S3 URL that can be used to upload a logo.",
        "tags": [
          "Pages"
        ]
      }
    },
    "/v4/accounts": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account_bodies"
                },
                "examples": {
                  "response": {
                    "value": {
                      "results": [
                        {
                          "company_id": "123456789ABCD",
                          "name": "Account name",
                          "number_of_seats": 5,
                          "allow_oversubscription": true,
                          "notify_when_account_oversubscribed": true,
                          "notify_on_each_registration_when_account_is_oversubscribed": true,
                          "registration_code": "Registration code",
                          "on_premises_ips": "125.124.143.24",
                          "premises_tags": "[\"gold-tier\", \"university\"]",
                          "session_limit": 10,
                          "session_limit_behaviour": "PREVENT_LOGIN"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "List accounts for v4",
        "operationId": "listAccountsV4",
        "description": "Retrieves a list of accounts for V4.",
        "tags": [
          "Account"
        ]
      }
    },
    "/zephr/integration/promo-codes/v1/redemptions": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/promo-code-redemption-result"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Process promo code redemptions",
        "operationId": "processPromoCodeRedemptions",
        "description": "Redeem promo codes that are configured from the Zephr console.\nResponds with a list of redemption results for each promo code.\n",
        "tags": [
          "Dynamic Offer Promo code redemption"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "promo_codes": {
                    "type": "array",
                    "description": "A list of promo codes that can be redeemed.",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/blaize/payment/braintree/subscriptions/{externalId}": {
      "delete": {
        "responses": {
          "200": {
            "description": "Subscription cancellation processed successfully.",
            "headers": {}
          },
          "403": {
            "description": "Forbidden - The request was not authorized.",
            "headers": {}
          },
          "409": {
            "description": "Conflict - There was a conflict processing the request.",
            "headers": {}
          },
          "500": {
            "description": "Internal Server Error - An error occurred while cancelling the subscription.",
            "headers": {}
          }
        },
        "summary": "Cancel Subscription",
        "operationId": "cancelSubscriptionLegacy",
        "description": "Cancels a subscription using the legacy method.",
        "tags": [
          "Subscription"
        ],
        "parameters": [
          {
            "name": "externalId",
            "in": "path",
            "description": "External subscription identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "responses": {
          "204": {
            "description": "No Content - The subscription update was successful.",
            "headers": {}
          },
          "401": {
            "description": "Unauthorized - Authentication is required.",
            "headers": {}
          },
          "500": {
            "description": "Internal Server Error - An error occurred while updating the subscription.",
            "headers": {}
          }
        },
        "summary": "Update Braintree Subscription",
        "operationId": "orchestrateUpdateBraintreeSubscription",
        "description": "Updates a Braintree subscription.",
        "tags": [
          "Subscription"
        ],
        "parameters": [
          {
            "name": "externalId",
            "in": "path",
            "description": "External subscription identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Update Subscription Request",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ZephrHmacHttp": {
        "description": "Requests to this API can be authenticated using an HMAC token signed with keys created in the admin console. For more information on signing requests with HMAC, see: https://developer.zuora.com/zephr-docs/zephr-api/zephr-api-tutorials/hmac-request-signing-and-key-pair/ For more information on generating keys for this, see: https://knowledgecenter.zuora.com/Zephr/Admin_User_Settings/Manage_Key_Pairs\n\nThe scheme name in the `Authorization` header, `ZEPHR-HMAC-*`, includes the signing algorithm as the final part of the name. For example: `ZEPHR-HMAC-SHA-256`.",
        "type": "http",
        "scheme": "ZEPHR-HMAC-*"
      }
    },
    "schemas": {
      "blacklisted-email-domains-request": {
        "type": "array",
        "description": "List of email domains to blacklist.",
        "items": {
          "type": "string",
          "example": "spam.com"
        },
        "uniqueItems": true,
        "minItems": 0
      },
      "blacklisted-email-domains-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Blacklisted email domains updated successfully"
          }
        }
      },
      "account-user": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "example": "54de866e-dc98-48d6-a2ea-4736a430f273"
          },
          "account_id": {
            "type": "string",
            "example": "e196ad75-a6d0-471b-90b3-de3843dd7860"
          },
          "user_type": {
            "type": "string",
            "example": "user"
          },
          "user_email": {
            "type": "string",
            "example": "user@example.com"
          },
          "user_name": {
            "type": "string",
            "example": "username123"
          }
        }
      },
      "admin-user-response": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "example": "b859f5dd-8184-4d01-8bf9-e3e771f68a62"
          },
          "message": {
            "type": "string",
            "example": "Admin user created successfully"
          },
          "uri": {
            "type": "string",
            "example": "http://company.com/v3/admin/users/b859f5dd-8184-4d01-8bf9-e3e771f68a62"
          }
        }
      },
      "admin-user-login-response": {
        "type": "object",
        "properties": {
          "cookie": {
            "type": "string",
            "example": "blaize_admin_session=..."
          },
          "message": {
            "type": "string",
            "example": "Login successful"
          }
        }
      },
      "logout-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Session deleted"
          }
        }
      },
      "access-key": {
        "type": "object",
        "properties": {
          "access_key": {
            "type": "string",
            "example": "access key..."
          }
        }
      },
      "keypair-response": {
        "type": "object",
        "properties": {
          "secret_key": {
            "type": "string",
            "example": "secret key..."
          },
          "message": {
            "type": "string",
            "example": "Keypair created: you will not be able to recover the secret, so take note of it"
          }
        }
      },
      "issue-keypair-response": {
        "type": "object",
        "properties": {
          "secret_key": {
            "type": "string",
            "example": "secret key..."
          },
          "message": {
            "type": "string",
            "example": "Keypair created: you will not be able to recover the secret, so take note of it"
          },
          "access_key": {
            "type": "string",
            "example": "access key..."
          }
        }
      },
      "get-access-key-response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/access-key"
        }
      },
      "revoke-keypair-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Keypair revoked"
          }
        }
      },
      "admin-role": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "example": "admin@company.com"
          },
          "role": {
            "type": "string",
            "example": "role..."
          }
        }
      },
      "admin-roles": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/admin-role"
        }
      },
      "admin-role-creation-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Admin role created successfully"
          }
        }
      },
      "list-admin-role-response": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "example": "admin@company.com"
          },
          "role": {
            "type": "string",
            "example": "role..."
          },
          "role_id": {
            "type": "string"
          }
        }
      },
      "list-admin-roles-response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/list-admin-role-response"
        }
      },
      "admin-role-update-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Admin role updated successfully"
          }
        }
      },
      "admin-role-deleted-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Admin role deleted successfully"
          }
        }
      },
      "user_identifier": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "example": "123456789ABCD"
          }
        }
      },
      "entitlement": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Test entitlement"
          },
          "description": {
            "type": "string",
            "example": "This is an entitlement"
          },
          "auto_assign": {
            "type": "string",
            "example": "none"
          }
        }
      },
      "includes": {
        "type": "object",
        "properties": {
          "entitlements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "meters": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "credits": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "bundles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          }
        }
      },
      "bundle": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "example": "company"
          },
          "subTenantId": {
            "type": "string",
            "example": "company|demo"
          },
          "type": {
            "type": "string",
            "example": "bundle"
          },
          "id": {
            "type": "string",
            "example": "1163991e-d671-4695-9ac0-b3d63fecfc20"
          },
          "label": {
            "type": "string",
            "example": "Test bundle"
          },
          "description": {
            "type": "string",
            "description": "Returned if not null",
            "example": "This is a bundle"
          },
          "includes": {
            "$ref": "#/components/schemas/includes"
          },
          "auto_assign": {
            "enum": [
              "none",
              "all",
              "anonymous",
              "authenticated"
            ],
            "example": "none"
          }
        }
      },
      "bundles": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/bundle"
            }
          }
        }
      },
      "cache_configurations_objects": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/cache_configurations_object"
            }
          }
        }
      },
      "cache_configurations_object": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Test"
          },
          "conditions": {
            "$ref": "#/components/schemas/conditions"
          },
          "cache": {
            "$ref": "#/components/schemas/cache"
          },
          "redirect": {
            "$ref": "#/components/schemas/redirect"
          }
        }
      },
      "conditions": {
        "type": "object",
        "properties": {
          "url_pattern": {
            "type": "string",
            "example": "^/forum"
          },
          "header_patterns": {
            "$ref": "#/components/schemas/header_patterns"
          }
        }
      },
      "header_patterns": {
        "type": "object",
        "properties": {
          "Content-Type": {
            "type": "string",
            "example": "^text/html"
          }
        }
      },
      "cache": {
        "type": "object",
        "properties": {
          "origin": {
            "type": "boolean"
          },
          "decision_points": {
            "type": "boolean"
          }
        }
      },
      "redirect": {
        "type": "object",
        "properties": {
          "on": {
            "type": "boolean"
          },
          "target": {
            "type": "string",
            "example": "/some/path"
          },
          "status": {
            "type": "integer",
            "example": 301
          }
        }
      },
      "companies": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/company"
        }
      },
      "company": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Company name"
          },
          "description": {
            "type": "string",
            "example": "Company description"
          },
          "website": {
            "type": "string",
            "example": "company.com"
          },
          "contact": {
            "type": "string",
            "example": "Company contact"
          },
          "account_manager": {
            "type": "string",
            "example": "Company account manager"
          }
        }
      },
      "companyv4": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string",
            "example": "1f6841a8-7f3b-4505-856e-4549be433545",
            "description": "Company identifier"
          },
          "name": {
            "type": "string",
            "description": "Company name",
            "example": "My Company"
          },
          "description": {
            "type": "string",
            "description": "Company description",
            "example": "This is an example company"
          },
          "website": {
            "type": "string",
            "description": "Company website",
            "example": "https://company.com"
          },
          "contact": {
            "type": "string",
            "description": "The company's contact information",
            "example": "email@company.com"
          },
          "account_manager": {
            "type": "string",
            "description": "Company account manager",
            "example": "Joe Blow"
          },
          "tenantId": {
            "type": "string",
            "description": "Tenant identifier",
            "example": "my-tenant"
          },
          "subTenantId": {
            "type": "string",
            "description": "Sub-tenant identifier (it will match the tenantId if the company is not part of a super tenant)",
            "example": "my-tenant"
          }
        }
      },
      "configuration": {
        "type": "object",
        "properties": {
          "db.tables.extendedProfiles": {
            "type": "string",
            "example": "value"
          },
          "db.tables.grants": {
            "type": "string",
            "example": "value"
          },
          "db.tables.forms": {
            "type": "string",
            "example": "value"
          },
          "db.tables.features": {
            "type": "string",
            "example": "value"
          },
          "db.tables.requestRules": {
            "type": "string",
            "example": "value"
          },
          "db.tables.entitlements": {
            "type": "string",
            "example": "value"
          },
          "db.tables.formFields": {
            "type": "string",
            "example": "value"
          },
          "db.tables.companies": {
            "type": "string",
            "example": "value"
          },
          "db.tables.accounts": {
            "type": "string",
            "example": "value"
          },
          "db.tables.userSchemaFields": {
            "type": "string",
            "example": "value"
          },
          "db.tables.users": {
            "type": "string",
            "example": "value"
          },
          "db.tables.userAttributes": {
            "type": "string",
            "example": "value"
          },
          "db.tables.accountUsers": {
            "type": "string",
            "example": "value"
          },
          "db.tables.staticItems": {
            "type": "string",
            "example": "value"
          },
          "db.tables.webhooks": {
            "type": "string",
            "example": "value"
          },
          "db.tables.adminUserTenantRoles": {
            "type": "string",
            "example": "value"
          },
          "db.tables.adminUsers": {
            "type": "string",
            "example": "value"
          },
          "db.tables.adminKeyPairs": {
            "type": "string",
            "example": "value"
          },
          "oauth.google.apis.host": {
            "type": "string",
            "example": "value"
          },
          "oauth.linkedin.clientSecret": {
            "type": "string",
            "example": "value"
          },
          "oauth.linkedin.apis.host": {
            "type": "string",
            "example": "value"
          },
          "oauth.google.clientSecret": {
            "type": "string",
            "example": "value"
          },
          "oauth.google.callbackUri": {
            "type": "string",
            "example": "value"
          },
          "oauth.linkedin.clientId": {
            "type": "string",
            "example": "value"
          },
          "oauth.linkedin.callbackUri": {
            "type": "string",
            "example": "value"
          },
          "oauth.google.clientId": {
            "type": "string",
            "example": "value"
          },
          "oauth.facebook.callbackUri": {
            "type": "string",
            "example": "value"
          },
          "oauth.facebook.clientSecret": {
            "type": "string",
            "example": "value"
          },
          "oauth.facebook.apis.host": {
            "type": "string",
            "example": "value"
          },
          "oauth.facebook.clientId": {
            "type": "string",
            "example": "value"
          },
          "cdn.origin": {
            "type": "string",
            "example": "value"
          },
          "redis.port": {
            "type": "string",
            "example": "value"
          },
          "elasticsearch.url": {
            "type": "string",
            "example": "value"
          },
          "aws.region": {
            "type": "string",
            "example": "value"
          },
          "redis.host": {
            "type": "string",
            "example": "value"
          },
          "email.from": {
            "type": "string",
            "example": "value"
          },
          "authentication.password.requireEmailVerfication": {
            "type": "string",
            "example": "value"
          }
        }
      },
      "credits": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/credit"
        }
      },
      "credit": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Test credit"
          },
          "description": {
            "type": "string",
            "example": "This is an credit"
          },
          "delivers": {
            "type": "array",
            "items": {}
          },
          "unit": {
            "type": "string",
            "example": "views"
          },
          "quantity": {
            "type": "number",
            "example": 5
          },
          "auto_assign": {
            "type": "string",
            "example": "none"
          }
        }
      },
      "access_model_credit": {
        "type": "object",
        "properties": {
          "remainingCredits": {
            "type": "integer",
            "example": 5
          },
          "contentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "123456789ABCD"
            ]
          },
          "contentIdTransform": {
            "type": "string",
            "enum": [
              "NONE",
              "PREPEND_RANDOM",
              "STRIP_PARAMS"
            ]
          }
        }
      },
      "headers": {
        "type": "object",
        "properties": {
          "Location": {
            "type": "string",
            "example": "/login.html"
          }
        }
      },
      "access-decision-response": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "301"
          },
          "body": {
            "type": "string",
            "example": "Redirecting to login page..."
          },
          "headers": {
            "$ref": "#/components/schemas/headers"
          }
        }
      },
      "email-templates": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/email-template"
        }
      },
      "email-template": {
        "type": "object",
        "properties": {
          "templateType": {
            "type": "string",
            "example": "template type",
            "description": "The template type. Supported types: User Password Reset, User Email Update, User Email Verification, User Complete Registration, User Passwordless Authentication, User Oversubscription Notification, User 2FA Authentication, User 2FA Password Reset, User Email Update Interstitial, Pages User Email Update, Pages User Password Reset, Admin User 2FA Authentication, Admin User Role, Admin User Password Reset"
          },
          "slug": {
            "type": "string",
            "example": "email template slug",
            "description": "It can be one of the default email template slugs provided or a custom one. Default email template slugs provided: password-reset-email, user-update-email, verify-email-address, complete-user-registration, passwordless-authentication-email, user-oversubscription-notification, two-factor-authentication-email, password-reset-email-2fa, user-interstitial-update-email, pages-user-email-update-otp-email-template, pages-password-reset-email, admin-user-2fa-email-template, v4-admin-user-role-assigned-email, v4-admin-user-password-reset-email."
          },
          "label": {
            "type": "string",
            "example": "Name of the email template",
            "description": "Name of the email template"
          },
          "subject": {
            "type": "string",
            "example": "Email subject",
            "description": "The subject on the email"
          },
          "content": {
            "type": "string",
            "example": "Email content",
            "description": "The content of the email"
          },
          "default": {
            "type": "boolean",
            "description": "Whether is one of the default email templates"
          }
        }
      },
      "entitlements": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/entitlement"
        }
      },
      "feature_rules_response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/feature_rule_response"
        }
      },
      "feature_rule_response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "featureRuleId"
          },
          "version": {
            "type": "number",
            "example": 1
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "label": {
            "type": "string",
            "example": "Test feature"
          },
          "description": {
            "type": "string",
            "example": "Test feature"
          },
          "last_updated": {
            "type": "string",
            "example": "2011-11-11T11:11:11.000"
          },
          "request_type": {
            "type": "string",
            "enum": [
              "html",
              "json",
              "graphql"
            ],
            "example": "html"
          },
          "target_name": {
            "type": "string",
            "example": "article"
          },
          "match_operation": {
            "type": "string",
            "enum": [
              "equals",
              "contains"
            ],
            "example": "equals"
          },
          "target_value": {
            "type": "string",
            "example": "home_bottom"
          },
          "css_selector": {
            "type": "string",
            "example": ".trial-download-single.trial"
          }
        }
      },
      "feature_rule_version_response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "featureRuleId"
          },
          "version": {
            "type": "number",
            "example": 1
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "label": {
            "type": "string",
            "example": "Test feature"
          },
          "description": {
            "type": "string",
            "example": "Test feature"
          },
          "requirements_script": {
            "type": "string",
            "example": "return []"
          },
          "action_script": {
            "type": "string",
            "example": "return \"this is a test\""
          },
          "script_type": {
            "type": "string",
            "example": "javascript"
          },
          "graph_state": {
            "type": "string",
            "example": "{\"property1\": \"value1\"}"
          },
          "editing_mode": {
            "type": "string",
            "example": "manual"
          },
          "last_updated": {
            "type": "string",
            "example": "2011-11-11T11:11:11.000"
          }
        }
      },
      "feature_rule_deletion_response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "featureRuleId deleted successfully"
          }
        }
      },
      "feature_rule_creation_response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Feature Rule created successfully"
          }
        }
      },
      "feature_rule_version_tags_update_response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "featureRuleId tag/s saved successfully"
          },
          "uri": {
            "type": "string",
            "example": "http://host/v3/feature-rules/featureRuleId/versions/versionId/tags"
          }
        }
      },
      "forms": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/form"
        }
      },
      "form": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Test"
          },
          "internal-description": {
            "type": "string",
            "example": "This form is for testing"
          },
          "public-description": {
            "type": "string",
            "example": "Please provide some info"
          },
          "registration": {
            "type": "boolean",
            "example": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/field"
            }
          }
        }
      },
      "field": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "example": "first-name"
          },
          "placeholder": {
            "type": "string",
            "example": "first-name"
          },
          "required": {
            "type": "boolean",
            "example": true
          },
          "order": {
            "type": "number",
            "example": 1
          }
        }
      },
      "gifts": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/gift"
        }
      },
      "gift": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "58c3852bb23f3467",
            "description": "Gift Id (passed as ?gift parameter in claim link)"
          },
          "created": {
            "type": "string",
            "example": "2018-04-27T09:15:28Z",
            "description": "UTC timestamp when gift was created"
          },
          "claimed": {
            "type": "string",
            "description": "UTC timestamp when gift was claimed"
          },
          "uri": {
            "type": "string",
            "example": "/news/local/story",
            "description": "1823.html (string) - Path portion of URL gift will allow access to"
          },
          "cross_device_session": {
            "type": "string",
            "description": "ID of cross-device session of claiming user (if claimed)"
          }
        }
      },
      "grants-response": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/grant-response"
            }
          }
        }
      },
      "active-grants-response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/grant-response"
        }
      },
      "grant-response": {
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "example": "e196ad75-a6d0-471b-90b3-de3843dd7860"
          },
          "user_id": {
            "type": "string",
            "example": "e1812285-2f21-441e-8be4-b08835cd4b2c"
          },
          "account_id": {
            "type": "string",
            "example": "14515649-565f-4b1c-8346-eb98301c1d6b"
          },
          "expiry_state": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "expired"
            ]
          },
          "entitlement_type": {
            "type": "string",
            "enum": [
              "bundle",
              "entitlement",
              "meter",
              "credits"
            ],
            "description": "An enum describing the type of the entitlement."
          },
          "entitlement_id": {
            "type": "string",
            "example": "b74df5c4-fded-492c-ad90-07646bded5db"
          },
          "startTime": {
            "type": "string",
            "example": "2022-06-01 00:00:00"
          },
          "endTime": {
            "type": "string",
            "example": "2022-12-31 23:59:59"
          },
          "product_id": {
            "type": "string",
            "example": "86abb44a-e6f2-4f9b-ac26-46ae0a13ed31"
          },
          "createdAt": {
            "type": "string",
            "example": "2022-05-31 23:59:59"
          }
        }
      },
      "grant": {
        "type": "object",
        "required": [
          "entitlement_type",
          "entitlement_id",
          "product_id"
        ],
        "properties": {
          "grantId": {
            "type": "string",
            "example": "e196ad75-a6d0-471b-90b3-de3843dd7860"
          },
          "user_id": {
            "type": "string",
            "example": "e1812285-2f21-441e-8be4-b08835cd4b2c"
          },
          "account_id": {
            "type": "string",
            "example": "14515649-565f-4b1c-8346-eb98301c1d6b"
          },
          "expiry_state": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "expired"
            ]
          },
          "entitlement_type": {
            "type": "string",
            "enum": [
              "bundle",
              "entitlement",
              "meter",
              "credits"
            ],
            "description": "An enum describing the type of the entitlement."
          },
          "entitlement_id": {
            "type": "string",
            "example": "b74df5c4-fded-492c-ad90-07646bded5db"
          },
          "startTime": {
            "type": "string",
            "example": "2022-06-01 00:00:00"
          },
          "endTime": {
            "type": "string",
            "example": "2022-12-31 23:59:59"
          },
          "product_id": {
            "type": "string",
            "example": "86abb44a-e6f2-4f9b-ac26-46ae0a13ed31"
          },
          "createdAt": {
            "type": "string",
            "example": "2022-05-31 23:59:59"
          }
        }
      },
      "grant-creation-request": {
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "example": "5700aae1-461d-47d7-9a4c-d84412da7053"
          },
          "entitlement_type": {
            "type": "string",
            "enum": [
              "bundle",
              "entitlement",
              "meter",
              "credits"
            ],
            "description": "An enum describing the type of the entitlement."
          },
          "entitlement_id": {
            "type": "string",
            "example": "cae85210-c942-490f-a24a-614033c51e49"
          },
          "user_id": {
            "type": "string",
            "example": "16b26d63-4ee9-4955-9d8b-f6625300d040"
          },
          "expiry_state": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "expired"
            ],
            "description": "Possible states of the grant. When the grant is meant to start in the future, it has the state of `pending`."
          },
          "startTime": {
            "type": "string",
            "example": "2024-02-01 00:00:00",
            "description": "Date when grant starts."
          },
          "endTime": {
            "type": "string",
            "example": "2024-03-01 23:59:59",
            "description": "Date when grant expires. When not present in the response, it means the grant is indefinite."
          },
          "product_id": {
            "type": "string",
            "example": "gold"
          },
          "created_at": {
            "type": "string",
            "example": "2024-03-01 00:00:00",
            "description": "Date when the grant was created in Zephr."
          }
        }
      },
      "access_model": {
        "type": "object",
        "properties": {
          "meters": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/access_model_meter"
            }
          },
          "credits": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/access_model_credit"
            }
          },
          "delivered_entitlements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/delivered_entitlement"
            }
          },
          "granted_bundles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "e10a5ff3-fc63-47fb-af04-75c2ec3fdf1c"
            ]
          },
          "jwt_bundles": {
            "type": "array",
            "items": {
              "items": {
                "type": "string"
              }
            },
            "example": []
          },
          "user_state": {
            "type": "string",
            "example": "registered"
          }
        }
      },
      "delivered_entitlement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "0123456789ABCD"
          },
          "direct": {
            "type": "boolean",
            "example": true
          },
          "meteredBy": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          },
          "creditedBy": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": []
          }
        }
      },
      "meters": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/meter"
            }
          }
        }
      },
      "meter": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Test meter"
          },
          "description": {
            "type": "string",
            "example": "This is a meter"
          },
          "unit": {
            "type": "string",
            "example": "views"
          },
          "limit": {
            "type": "number",
            "example": 5
          },
          "cycle": {
            "type": "string",
            "example": "calendar"
          },
          "period": {
            "type": "string",
            "example": "monthly"
          },
          "timezone": {
            "type": "string",
            "example": "+0:00"
          },
          "auto_assign": {
            "type": "string",
            "example": "none"
          }
        }
      },
      "access_model_meter": {
        "type": "object",
        "properties": {
          "refreshTime": {
            "type": "string",
            "example": "2024-06-01 00:00:00"
          },
          "meterSize": {
            "type": "integer",
            "example": 5
          },
          "remainingCredits": {
            "type": "integer",
            "example": 5
          },
          "contentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "123456789ABCD"
            ]
          },
          "contentIdTransform": {
            "type": "string",
            "enum": [
              "NONE",
              "PREPEND_RANDOM",
              "STRIP_PARAMS"
            ]
          }
        }
      },
      "products": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/product"
        }
      },
      "product-request": {
        "type": "object",
        "required": [
          "label",
          "entitlement",
          "mapping"
        ],
        "properties": {
          "label": {
            "type": "string",
            "example": "Gold Subscription",
            "description": "The product label. This is the human-readable name of the product."
          },
          "description": {
            "type": "string",
            "example": "The most premium subscription.",
            "description": "The product description. This is a human-readable description of the product."
          },
          "entitlement": {
            "$ref": "#/components/schemas/product.entitlement"
          },
          "mapping": {
            "$ref": "#/components/schemas/product.mapping"
          },
          "sharingLimit": {
            "type": "number",
            "example": 5,
            "description": "The number of other users that the purchaser of this product can share the product with."
          }
        }
      },
      "product": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "example": "company"
          },
          "subTenantId": {
            "type": "string",
            "example": "company|demo"
          },
          "id": {
            "type": "string",
            "example": "gold",
            "description": "The product ID/slug. This is the unique identifier for the product within the tenant."
          },
          "label": {
            "type": "string",
            "example": "Gold Subscription",
            "description": "The product label. This is the human-readable name of the product."
          },
          "description": {
            "type": "string",
            "example": "The most premium subscription.",
            "description": "The product description. This is a human-readable description of the product."
          },
          "entitlement": {
            "$ref": "#/components/schemas/product.entitlement"
          },
          "mapping": {
            "$ref": "#/components/schemas/product.mapping"
          },
          "sharingLimit": {
            "type": "number",
            "example": 5,
            "description": "The number of other users that the purchaser of this product can share the product with."
          }
        }
      },
      "product.entitlement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "gold-bundle",
            "description": "Entitlement ID/slug."
          },
          "type": {
            "type": "string",
            "example": "bundle",
            "description": "Entitlement type (always \"bundle\")."
          },
          "entitlementTenant": {
            "type": "string",
            "example": "company",
            "description": "Entitlement tenant ID."
          }
        }
      },
      "product.mapping": {
        "type": "object",
        "properties": {
          "braintree_recurring": {
            "type": "object",
            "properties": {
              "plan_id": {
                "type": "string",
                "example": "gold",
                "description": "The Braintree plan ID. This is the unique identifier for the plan within the Braintree account."
              },
              "archived": {
                "type": "boolean",
                "example": true,
                "description": "Whether the product is archived. If true, the product will not be available for purchase."
              }
            }
          },
          "braintree_one_off": {
            "type": "object",
            "properties": {
              "price_points": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/product.mapping.price_point"
                }
              }
            }
          },
          "stripe_recurring": {
            "type": "object",
            "properties": {
              "stripe_plan_id": {
                "type": "string",
                "example": "gold",
                "description": "The Stripe plan ID. This is the unique identifier for the plan within the Stripe account."
              }
            }
          },
          "stripe_one_off": {
            "type": "object",
            "properties": {
              "price_points": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/product.mapping.price_point"
                }
              }
            }
          },
          "rate_plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/product.mapping.rate_plan"
            }
          },
          "jwt": {
            "$ref": "#/components/schemas/product.mapping.jwt"
          }
        },
        "example": {
          "braintree_one_off": {
            "price_points": [
              {
                "id": "ten",
                "label": "Ten Dollars",
                "price": 10
              }
            ]
          }
        }
      },
      "product.mapping.price_point": {
        "type": "object",
        "required": [
          "id",
          "label",
          "price"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "ten",
            "description": "The unique identifier for the price point within the product."
          },
          "label": {
            "type": "string",
            "example": "Ten Dollars",
            "description": "The human-readable name of the price point."
          },
          "price": {
            "type": "number",
            "example": 10,
            "description": "The price of the product in the currency of the payment provider account."
          },
          "archived": {
            "type": "boolean",
            "example": true,
            "description": "Whether the price point is archived. If true, the price point will not be available for purchase."
          }
        }
      },
      "product.mapping.rate_plan": {
        "type": "object",
        "required": [
          "payment_provider",
          "rate_plan_id",
          "environment"
        ],
        "properties": {
          "payment_provider": {
            "type": "string",
            "description": "The payment provider for which the rate plan is configured."
          },
          "rate_plan_id": {
            "type": "string",
            "description": "The unique identifier for the rate plan within the payment provider account."
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the rate plan is archived. If true, the rate plan will not be available for purchase."
          },
          "archive_label": {
            "type": "string",
            "description": "The human-readable name of the rate plan."
          },
          "environment": {
            "type": "string",
            "example": "LIVE",
            "description": "The environment for which the rate plan is configured."
          }
        }
      },
      "product.mapping.jwt": {
        "type": "object",
        "properties": {
          "privateClaimValue": {
            "type": "string"
          }
        }
      },
      "request_rules_container_object": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/request_rules_object"
            }
          }
        }
      },
      "request_rules_object": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Test"
          },
          "description": {
            "type": "string",
            "example": "This rule tests for authenticated users"
          },
          "priority": {
            "type": "integer",
            "example": 1
          },
          "version": {
            "type": "number",
            "example": 1
          },
          "last_updated": {
            "type": "string",
            "example": "2011-11-11T11:11:11.000"
          },
          "conditions": {
            "$ref": "#/components/schemas/request_rules_conditions"
          },
          "lastUpdatedAt": {
            "type": "string",
            "example": "2022-06-01 00:00:00"
          },
          "requirements_script": {
            "type": "string",
            "example": "return []"
          },
          "action_script": {
            "type": "string",
            "example": "return \"this is a test\""
          },
          "script_type": {
            "type": "string",
            "example": "javascript"
          },
          "graph_state": {
            "type": "string",
            "example": "{\"property1\": \"value1\"}"
          },
          "editing_mode": {
            "type": "string",
            "example": "manual"
          }
        }
      },
      "request_rules_conditions": {
        "type": "object",
        "properties": {
          "url_pattern": {
            "type": "string",
            "example": "^/forum"
          },
          "method": {
            "type": "string",
            "example": "GET"
          }
        }
      },
      "session": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "example": "company"
          },
          "subTenantId": {
            "type": "string",
            "example": "company|demo"
          },
          "supplied": {
            "type": "boolean",
            "example": false
          },
          "expiryDate": {
            "type": "string",
            "example": "2025-02-08 14:29 PM UTC"
          },
          "startDate": {
            "type": "string",
            "example": "2024-02-08 14:29 PM UTC"
          },
          "authenticated": {
            "type": "boolean",
            "example": true
          },
          "state": {
            "type": "string",
            "enum": [
              "anonymous",
              "recognised",
              "partially_registered",
              "authenticated"
            ],
            "example": "authenticated"
          },
          "device": {
            "type": "string",
            "example": "pc"
          },
          "browser": {
            "type": "string",
            "example": "Chrome"
          },
          "os": {
            "type": "string",
            "example": "Mac OSX"
          },
          "city": {
            "type": "string",
            "example": "London"
          },
          "geoState": {
            "type": "string",
            "example": "London"
          },
          "deviceName": {
            "type": "string",
            "example": "Apple Macintosh"
          },
          "country": {
            "type": "string",
            "description": "ISO-3166-2 country code",
            "example": "GB"
          },
          "session_id": {
            "type": "string",
            "example": "26a73b7a-f7d0-48d8-85dd-a04b07313895"
          },
          "user_id": {
            "type": "string",
            "example": "UU0123456789ABCD"
          }
        }
      },
      "session-lookup": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "example": "company"
          },
          "subTenantId": {
            "type": "string",
            "example": "company|demo"
          },
          "authenticated": {
            "type": "boolean",
            "example": true
          },
          "v": {
            "type": "integer",
            "description": "version",
            "example": 0
          },
          "session_variables": {
            "$ref": "#/components/schemas/session_variables"
          },
          "user_id": {
            "type": "string",
            "example": "UU0123456789ABCD"
          },
          "sessions": {
            "$ref": "#/components/schemas/sessions"
          },
          "access_model": {
            "$ref": "#/components/schemas/access_model"
          },
          "last_updated": {
            "type": "integer",
            "description": "A timestamp indicating the last update of the session, measured in milliseconds since the epoch.",
            "example": 1707230240685
          },
          "test_groups": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "second_party_data": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "session_variables": {
        "type": "object",
        "properties": {}
      },
      "static_items": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/static_item"
            }
          }
        }
      },
      "static_item": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "123456789ABCD"
          }
        }
      },
      "static_single_item": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "123456789ABCD"
          },
          "item": {
            "type": "string",
            "example": {}
          }
        }
      },
      "oauth2-token-refresh-response": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "example": "user.account:read user.profile:read user.profile:update",
            "description": "The scope of the access request. Supported scopes: user.account:read, user.profile:read and user.profile:update"
          },
          "access_token": {
            "type": "string",
            "example": "oa_nj1dfhecrs1jwxi0wd0xk49n",
            "description": "The access token that can be used to obtain account and profile information"
          },
          "token_type": {
            "type": "string",
            "example": "bearer",
            "description": "Token type to be used in the Authorization header when requesting the resource's owner information"
          },
          "expires_in": {
            "type": "number",
            "example": 3600,
            "description": "The lifetime in seconds of the access token"
          },
          "user_id": {
            "type": "string",
            "example": "1234567890",
            "description": "Zephr user identifier"
          }
        }
      },
      "oauth2-token-exchange-response": {
        "type": "object",
        "properties": {
          "scope": {
            "type": "string",
            "example": "user.account:read user.profile:read user.profile:update",
            "description": "The scope of the access request. Supported scopes: user.account:read, user.profile:read and user.profile:update"
          },
          "access_token": {
            "type": "string",
            "example": "oa_nj1dfhecrs1jwxi0wd0xk49n",
            "description": "The access token that can be used to obtain account and profile information"
          },
          "token_type": {
            "type": "string",
            "example": "bearer",
            "description": "Token type to be used in the Authorization header when requesting the resource's owner information"
          },
          "expires_in": {
            "type": "number",
            "example": 3600,
            "description": "The lifetime in seconds of the access token"
          },
          "refresh_token": {
            "type": "string",
            "example": "6kuabo4gug8t9h13x7gt43cm"
          },
          "user_id": {
            "type": "string",
            "example": "1234567890",
            "description": "Zephr user identifier"
          }
        }
      },
      "pagination-link": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The link's url",
            "example": "https://example.com?rpp=10"
          },
          "page": {
            "type": "number",
            "description": "The page number the link is pointing to",
            "example": 1
          }
        }
      },
      "user-export-paginated-response": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/user-export-response-items"
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "number",
                "example": 100
              },
              "rpp": {
                "type": "number",
                "example": 20
              },
              "paginated": {
                "type": "boolean",
                "example": true
              }
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "first": {
                "$ref": "#/components/schemas/pagination-link"
              },
              "last": {
                "$ref": "#/components/schemas/pagination-link"
              },
              "previous": {
                "$ref": "#/components/schemas/pagination-link"
              },
              "next": {
                "$ref": "#/components/schemas/pagination-link"
              }
            }
          }
        }
      },
      "user-export-response-items": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/user-export-response-item"
        }
      },
      "user-export-response-item": {
        "type": "object",
        "required": [
          "user"
        ],
        "properties": {
          "seq-no": {
            "type": "number",
            "example": 1
          },
          "user": {
            "$ref": "#/components/schemas/user-export-user"
          },
          "grants": {
            "$ref": "#/components/schemas/grants-response"
          }
        }
      },
      "user-export-user": {
        "type": "object",
        "required": [
          "identifiers"
        ],
        "properties": {
          "identifiers": {
            "$ref": "#/components/schemas/identifiers"
          },
          "attributes": {
            "$ref": "#/components/schemas/attributes"
          }
        }
      },
      "user-creation": {
        "type": "object",
        "properties": {
          "validators": {
            "$ref": "#/components/schemas/legacy-validators"
          },
          "identifiers": {
            "$ref": "#/components/schemas/identifiers"
          },
          "attributes": {
            "$ref": "#/components/schemas/attributes"
          },
          "accountMembershipCode": {
            "type": "string"
          },
          "email_verified": {
            "type": "boolean"
          },
          "last_login": {
            "type": "string"
          },
          "tracking_id": {
            "type": "string"
          },
          "registered": {
            "type": "string"
          },
          "registration_state": {
            "type": "object",
            "properties": {
              "partial": {
                "type": "string"
              },
              "complete": {
                "type": "string"
              },
              "contact": {
                "type": "string"
              }
            }
          },
          "registration_tenant": {
            "type": "string"
          },
          "session_limit": {
            "type": "integer"
          },
          "foreign_keys": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "product_sharing_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "identifiers"
        ],
        "example": {
          "user_id": "123456789ABCD",
          "identifiers": {
            "email_address": "joe.blow@company.com"
          },
          "attributes": {
            "first_name": "Joe",
            "surname": "Blow",
            "email_verified": true
          }
        }
      },
      "legacy-validators": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          },
          "legacy_password": {
            "type": "string",
            "description": "Legacy Passowrd is used only if the tenant has Login extension active. More information can be found here https://knowledgecenter.zuora.com/Zephr/Settings/Extensions/Login_Extension"
          }
        },
        "description": "Validators are not required for user creation, users created without validators won't be able to sign into Zephr unless they follow a password reset flow, or being mapped as shadow users identified by a JWT."
      },
      "attribute_search_filter": {
        "type": "object",
        "description": "An array of these filters can be specified to perform a search by various attributes.",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The user attribute slug",
            "example": "subscriber-id"
          },
          "operator": {
            "type": "string",
            "enum": [
              "is",
              "is_not",
              "contains",
              "does_not_contain",
              "starts_with",
              "ends_with",
              "has_any_value",
              "is_unknown",
              "checked",
              "unchecked"
            ],
            "description": "The operation to apply to search filters for fields that are not of type Number, Range, or Date.",
            "example": "is"
          },
          "value": {
            "type": "object",
            "description": "The value assigned to the user attribute. Supported types include string, boolean, integer, and double.",
            "example": "123456"
          },
          "from": {
            "type": "object",
            "description": "Used with Number, Range, or Date fields to specify the starting value of the search range.",
            "example": "2025-01-01"
          },
          "to": {
            "type": "object",
            "description": "Used with Number, Range, or Date fields to specify the ending value of the search range.",
            "example": "2025-06-01"
          }
        }
      },
      "search_by_attributes": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/attribute_search_filter"
        }
      },
      "validators": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          }
        }
      },
      "identifiers": {
        "type": "object",
        "properties": {
          "email_address": {
            "type": "string",
            "example": "joe.blow@company.com"
          }
        }
      },
      "attributes": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string",
            "example": "Joe"
          },
          "surname": {
            "type": "string",
            "example": "Blow"
          }
        }
      },
      "schema-field": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "example": "slug1"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "PUBLIC"
            ],
            "example": "PUBLIC"
          },
          "context": {
            "type": "string",
            "example": "slug1"
          },
          "label": {
            "type": "string",
            "example": "Test"
          },
          "internal-description": {
            "type": "string",
            "example": "This is for testing"
          },
          "public-description": {
            "type": "string",
            "example": "Please provide some info"
          },
          "required": {
            "type": "boolean"
          },
          "validation-expression": {
            "type": "string",
            "example": "test"
          },
          "input-type": {
            "type": "string",
            "example": "text",
            "enum": [
              "text",
              "color",
              "number",
              "range",
              "time",
              "datetime",
              "date",
              "week",
              "month",
              "email",
              "tel",
              "url",
              "password",
              "select",
              "checkbox",
              "radio",
              "textarea",
              "hidden"
            ]
          },
          "select-options": {
            "type": "string",
            "example": "null"
          },
          "range-start": {
            "type": "number"
          },
          "range-end": {
            "type": "number",
            "example": 100
          },
          "range-step": {
            "type": "number",
            "example": 5
          },
          "decision-point": {
            "type": "boolean"
          },
          "publicly-writable": {
            "type": "boolean"
          },
          "form-use": {
            "type": "boolean"
          },
          "unit": {
            "type": "string",
            "example": "unit"
          },
          "unit-position": {
            "type": "string",
            "enum": [
              "leading",
              "trailing"
            ]
          },
          "value-precision": {
            "type": "number"
          },
          "stat-direction": {
            "type": "string",
            "enum": [
              "ascending",
              "descending"
            ]
          }
        }
      },
      "schemas": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/schema-field"
        }
      },
      "schema-field-deletion-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Field removed from schema successfully"
          }
        }
      },
      "schema-field-creation-response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Field added to user schema successfully"
          },
          "uri": {
            "type": "string",
            "example": "http://host/v3/schema/users/slug"
          }
        }
      },
      "user-response": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "example": "123456789ABCD"
          },
          "identifiers": {
            "$ref": "#/components/schemas/identifiers"
          },
          "attributes": {
            "$ref": "#/components/schemas/attributes"
          },
          "email_verified": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "users-response": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/user-response"
            }
          }
        }
      },
      "sessions": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/session"
        }
      },
      "webhook-response": {
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "example": "01234567890ABCD"
          }
        }
      },
      "webhook-request": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "example": "Test webhook"
          },
          "triggers": {
            "type": "array",
            "items": {}
          },
          "method": {
            "type": "string",
            "example": "POST"
          },
          "target": {
            "type": "string",
            "example": "http://localhost:9999"
          }
        }
      },
      "webhooks-responses": {
        "type": "object",
        "properties": {
          "webhook-response": {
            "$ref": "#/components/schemas/webhook-response"
          },
          "webhook-request": {
            "$ref": "#/components/schemas/webhook-request"
          }
        }
      },
      "webhook-responses-container": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/webhooks-responses"
            }
          }
        }
      },
      "Create_AccountBody": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "number_of_seats": {
            "type": "number"
          },
          "allow_oversubscription": {
            "type": "boolean"
          },
          "notify_when_account_oversubscribed": {
            "type": "boolean"
          },
          "notify_on_each_registration_when_account_is_oversubscribed": {
            "type": "boolean"
          },
          "registration_code": {
            "type": "string"
          },
          "on_premises_ips": {
            "type": "string",
            "description": "A list of newline-separated IP addresses or CIDR blocks that identify the premises associated with this account."
          },
          "premises_tags": {
            "type": "string",
            "description": "(string) A JSON array of strings of 'tags'. Tags can be used to identify and group accounts to drive behaviour in the Zephr decision engine."
          },
          "session_limit": {
            "type": "number",
            "description": "The maximum number of concurrent sessions that users of this account can have. If unspecified, the system default value is used. If a user belongs to multiple accounts, the highest limit is used."
          },
          "session_limit_behaviour": {
            "type": "string",
            "description": "One of \"PREVENT_LOGIN\" or \"DELETE_OLDEST_SESSIONS\". Specifies the behaviour when a user of this account exceeds the configured limit of concurrent sessions."
          }
        },
        "example": {
          "company_id": "123456789ABCD",
          "name": "Account name",
          "number_of_seats": 5,
          "allow_oversubscription": true,
          "notify_when_account_oversubscribed": true,
          "notify_on_each_registration_when_account_is_oversubscribed": true,
          "registration_code": "Registration code",
          "on_premises_ips": "125.124.143.24",
          "premises_tags": "[\"gold-tier\", \"university\"]",
          "session_limit": 10,
          "session_limit_behaviour": "PREVENT_LOGIN"
        }
      },
      "response_simple_accountbody": {
        "type": "object",
        "properties": {
          "tenant_id": {
            "type": "string",
            "example": "my-tenant"
          },
          "account_id": {
            "type": "string",
            "example": "10549fef-cddb-4b1f-92e4-27ab7cb2e555"
          },
          "name": {
            "type": "string",
            "example": "My Company"
          },
          "number_of_seats": {
            "type": "number",
            "example": 7
          },
          "email_address": {
            "type": "string",
            "example": "company@email.com"
          }
        }
      },
      "response_accountbody": {
        "type": "object",
        "properties": {
          "company_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "number_of_seats": {
            "type": "number"
          },
          "allow_oversubscription": {
            "type": "boolean"
          },
          "notify_when_account_oversubscribed": {
            "type": "boolean"
          },
          "notify_on_each_registration_when_account_is_oversubscribed": {
            "type": "boolean"
          },
          "registration_code": {
            "type": "string"
          },
          "ip_addresses": {
            "type": "string"
          },
          "registration_domains": {
            "type": "string"
          },
          "email_address": {
            "type": "string"
          },
          "on_premises_ips": {
            "type": "string",
            "description": "A list of newline-separated IP addresses or CIDR blocks that identify the premises associated with this account."
          },
          "premises_tags": {
            "type": "string",
            "description": "(string) A JSON array of strings of 'tags'. Tags can be used to identify and group accounts to drive behaviour in the Zephr decision engine."
          },
          "session_limit": {
            "type": "number",
            "description": "The maximum number of concurrent sessions that users of this account can have. If unspecified, the system default value is used. If a user belongs to multiple accounts, the highest limit is used."
          },
          "session_limit_behaviour": {
            "type": "string",
            "description": "One of \"PREVENT_LOGIN\" or \"DELETE_OLDEST_SESSIONS\". Specifies the behaviour when a user of this account exceeds the configured limit of concurrent sessions."
          },
          "branding": {
            "type": "object",
            "properties": {
              "logoUrl": {
                "type": "string"
              },
              "urlPath": {
                "type": "string"
              },
              "pageIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "openIdConfig": {
                "type": "object"
              }
            }
          }
        }
      },
      "account_bodies": {
        "type": "object",
        "description": "A container object holding an array of full account objects.",
        "properties": {
          "results": {
            "type": "array",
            "description": "A list of account objects.",
            "items": {
              "$ref": "#/components/schemas/response_accountbody"
            }
          }
        }
      },
      "simple_account_bodies": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/response_simple_accountbody"
            }
          },
          "total": {
            "type": "number",
            "example": 30,
            "description": "The total number of items out of which only a subset was returned  in the paginated results."
          }
        }
      },
      "User_Segments_Response": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User_Segment_Response"
            }
          }
        }
      },
      "User_Segment_Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The User Segment id."
          },
          "label": {
            "type": "string",
            "description": "The User Segment label."
          },
          "description": {
            "type": "string",
            "description": "The User Segment description."
          },
          "active": {
            "description": "The User Segment active status.",
            "type": "boolean"
          },
          "archived": {
            "type": "boolean",
            "description": "The User Segment archive status."
          }
        }
      },
      "Bulk_User_Update_Response": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Returned message indicating the status of the operation."
          },
          "job_id": {
            "type": "string",
            "description": "Id of the job."
          }
        }
      },
      "Get_Bulk_User_Update_Job_Response": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "jobDate": {
            "type": "string"
          },
          "succeeded": {
            "type": "number"
          },
          "errors": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "details": {
            "type": "object",
            "description": "Lists details of each update job, including Id or foreign key, job status, and returned message.\n"
          }
        }
      },
      "Get_Bulk_User_Update_Jobs_Item": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "jobDate": {
            "type": "string"
          },
          "succeeded": {
            "type": "number"
          },
          "errors": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        }
      },
      "Get_Bulk_User_Update_Jobs_Response": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Get_Bulk_User_Update_Jobs_Item"
        }
      },
      "bulk_update_object": {
        "type": "object",
        "properties": {
          "identifier": {
            "type": "object",
            "description": "Identifier of the user. User either the User ID or Foreign Key.\n",
            "properties": {
              "user_id": {
                "type": "string",
                "description": "Unique Id of the user.\n"
              },
              "foreign_key": {
                "type": "object",
                "description": "Foreign key object.",
                "properties": {
                  "foreign-system": {
                    "type": "string",
                    "description": "The foreign key of the user.\n"
                  }
                }
              }
            }
          },
          "actions": {
            "type": "array",
            "description": "The actions to be taken for the user. Available actions are attribute update and user deletion.\n",
            "items": {
              "$ref": "#/components/schemas/bulk_update_object_action_object"
            }
          }
        }
      },
      "bulk_update_object_action_object": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The user update action to be taken.\n",
            "enum": [
              "delete-user",
              "set-attribute"
            ]
          },
          "attribute": {
            "type": "object",
            "description": "Details of the attribute update.\n",
            "properties": {
              "field": {
                "type": "string",
                "description": "The slug of the attribute.\n"
              },
              "value": {
                "type": "string",
                "description": "The updated value of the attribute.\n"
              }
            },
            "required": [
              "field",
              "value"
            ]
          }
        }
      },
      "promo-code-redemption-result": {
        "type": "object",
        "properties": {
          "promoCode": {
            "type": "string",
            "description": "The promo code of the redemption result."
          },
          "success": {
            "type": "boolean",
            "description": "Displays whether the promo code was successfully redeemed."
          },
          "errorMessage": {
            "type": "string",
            "nullable": true,
            "description": "The reason for redemption failure, if unsuccessful."
          }
        }
      },
      "add-bulk-account-users-by-domains": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "example": "test_account_users"
          },
          "subTenantId": {
            "type": "string",
            "example": "test_account_users"
          },
          "user_id": {
            "type": "string",
            "example": "0123456789ABCD"
          },
          "account_id": {
            "type": "string",
            "example": "0123456789ABCD"
          },
          "user_type": {
            "type": "string",
            "example": "user"
          },
          "user_email": {
            "type": "string",
            "example": "joe$RAND+2@yahoo.com"
          }
        }
      }
    },
    "requestBodies": {
      "Create_Admin_RoleBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              },
              "required": [
                "email",
                "role"
              ],
              "example": {
                "email": "admin@company.com",
                "role": "role..."
              }
            }
          }
        }
      },
      "Create_BundleBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "includes": {
                  "type": "object",
                  "properties": {
                    "entitlements": {},
                    "meters": {},
                    "credits": {},
                    "bundles": {}
                  }
                },
                "auto_assign": {
                  "type": "string"
                }
              },
              "example": {
                "label": "Test bundle",
                "description": "This is a bundle",
                "includes": {
                  "entitlements": [],
                  "meters": [],
                  "credits": [],
                  "bundles": []
                },
                "auto_assign": "none"
              }
            }
          }
        }
      },
      "Create_Cache_ConfigurationBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "conditions": {
                  "type": "object",
                  "properties": {
                    "url_pattern": {
                      "type": "string"
                    },
                    "header_patterns": {
                      "type": "object",
                      "properties": {
                        "Content-Type": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "cache": {
                  "type": "object",
                  "properties": {
                    "origin": {
                      "type": "boolean"
                    },
                    "decision_points": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "example": {
                "label": "Test",
                "conditions": {
                  "url_pattern": "^/forum",
                  "header_patterns": {
                    "Content-Type": "^text/html"
                  }
                },
                "cache": {
                  "origin": false,
                  "decision_points": false
                }
              }
            }
          }
        }
      },
      "Create_CompanyBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "website": {
                  "type": "string"
                },
                "contact": {
                  "type": "string"
                },
                "account_manager": {
                  "type": "string"
                }
              },
              "example": {
                "name": "Company name",
                "description": "Company description",
                "website": "company.com",
                "contact": "Company contact",
                "account_manager": "Company account manager"
              }
            }
          }
        }
      },
      "Create_CompanyBody_v4": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the company"
                },
                "description": {
                  "type": "string",
                  "description": "The description of the company"
                },
                "website": {
                  "type": "string",
                  "description": "The website of the company"
                },
                "contact": {
                  "type": "string",
                  "description": "Contact information of the company"
                },
                "account_manager": {
                  "type": "string",
                  "description": "The name of the company account manager"
                }
              },
              "required": [
                "name"
              ],
              "example": {
                "name": "Company name",
                "description": "Company description",
                "website": "https://company.com",
                "contact": "company@email.com",
                "account_manager": "Joe Blow"
              }
            }
          }
        }
      },
      "Create_CreditBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "delivers": {
                  "type": "array",
                  "items": {}
                },
                "unit": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number"
                },
                "auto_assign": {
                  "type": "string"
                }
              },
              "example": {
                "label": "Test credit",
                "description": "This is an credit",
                "delivers": [
                  "ENTITLEMENT_ID"
                ],
                "unit": "views",
                "quantity": 5,
                "auto_assign": "none"
              }
            }
          }
        }
      },
      "Create_EntitlementBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "auto_assign": {
                  "type": "string"
                }
              },
              "example": {
                "label": "Test entitlement",
                "description": "This is an entitlement",
                "auto_assign": "none"
              }
            }
          }
        }
      },
      "Create_GrantBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "entitlement_type": {
                  "type": "string",
                  "enum": [
                    "bundle",
                    "entitlement",
                    "meter",
                    "credits"
                  ],
                  "description": "An enum describing the type of the entitlement."
                },
                "entitlement_id": {
                  "type": "string",
                  "example": "b3d8007e-6729-4faf-b7a9-46b6900eabd4"
                },
                "startTime": {
                  "type": "string",
                  "example": "2022-06-01 00:00:00"
                },
                "endTime": {
                  "type": "string",
                  "example": "2022-12-31 23:59:59"
                },
                "product_id": {
                  "type": "string",
                  "example": "fffd4076-d0cd-45a4-89f3-56ae8aea31f0"
                }
              },
              "required": [
                "entitlement_type",
                "entitlement_id",
                "product_id"
              ],
              "example": {
                "entitlement_type": "bundle",
                "entitlement_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
                "startTime": "2022-06-01 00:00:00",
                "endTime": "2022-12-31 23:59:59",
                "product_id": "XXXXXXXXXXXXXX"
              }
            }
          }
        }
      },
      "Create_MeterBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "limit": {
                  "type": "number"
                },
                "cycle": {
                  "type": "string"
                },
                "period": {
                  "type": "string"
                },
                "timezone": {
                  "type": "string"
                },
                "auto_assign": {
                  "type": "string"
                }
              },
              "example": {
                "label": "Test meter",
                "description": "This is a meter",
                "unit": "views",
                "limit": 5,
                "cycle": "calendar",
                "period": "monthly",
                "timezone": "+0:00",
                "auto_assign": "none"
              }
            }
          }
        }
      },
      "Update_User_attributesBody": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "first_name": {
                  "type": "string"
                },
                "surname": {
                  "type": "string"
                }
              },
              "example": {
                "first_name": "Joe",
                "surname": "Blow"
              }
            }
          }
        }
      },
      "Create_User_Segment_Body": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "The User Segment name."
                },
                "description": {
                  "type": "string",
                  "description": "The User Segment description."
                }
              },
              "required": [
                "label"
              ]
            }
          }
        }
      },
      "Bulk_User_Update_Request": {
        "content": {
          "application/json": {
            "example": {
              "updates": [
                {
                  "identifier": {
                    "user_id": "string"
                  },
                  "actions": [
                    {
                      "type": "set-attribute",
                      "attribute": {
                        "field": "string",
                        "value": "string"
                      }
                    }
                  ]
                },
                {
                  "identifier": {
                    "foreign_key": {
                      "foreign-system": "string"
                    }
                  },
                  "actions": [
                    {
                      "type": "delete-user"
                    }
                  ]
                }
              ]
            },
            "schema": {
              "type": "object",
              "properties": {
                "updates": {
                  "type": "array",
                  "description": "Array of combination of identifier and actions.\n",
                  "items": {
                    "$ref": "#/components/schemas/bulk_update_object"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}