openapi: 3.0.0
info:
  description: >-
    This is the OAS 3.0 specification for the DNS Protection API in Sophos
    Central.
  version: 2.22.0
  contact:
    name: Sophos Central APIs
    email: apis@sophos.com
    url: 'https://developer.sophos.com'
  title: DNS Protection API
tags:
  - name: Custom Domains List
    description: DNS Protection Custom Domains List API.
  - name: Locations
    description: DNS Protection Locations API.
  - name: Policies
    description: DNS Protection Policies API.
servers:
  - url: 'https://api-{dataRegion}.central.sophos.com/dns-protection/v2'
    description: Regional service in the production environment.
    variables:
      dataRegion:
        description: Data region where tenant data is stored.
        default: eu01
        enum:
          - eu01
          - eu02
          - us01
          - us03
          - ca01
          - au01
          - jp01
          - in01
          - br01
security:
  - bearerAuth: []
paths:
  /locations:
    get:
      x-soph-permissions: 'swgaas.config:read OR swgaas.config.dataplane:read'
      tags:
        - Locations
      summary: List Locations
      description: Returns all Locations.
      operationId: getAllLocations
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: name
          required: false
          description: Filter request by name.
          schema:
            type: string
            minLength: 1
            maxLength: 100
            pattern: '^[a-zA-Z0-9\-_ ]+$'
        - in: query
          name: nameContains
          required: false
          description: Filter request where name contains the given value.
          schema:
            type: string
            minLength: 1
            maxLength: 100
            pattern: '^[a-zA-Z0-9\-_ ]+$'
        - in: query
          name: type
          required: false
          description: >-
            Filter locations by type. Accepted values are "standard", "sfos",
            and "protectedBrowser" (case-insensitive).
          schema:
            type: string
            minLength: 1
            maxLength: 16
            pattern: >-
              ^([sS][tT][aA][nN][dD][aA][rR][dD]|[sS][fF][oO][sS]|[pP][rR][oO][tT][eE][cC][tT][eE][dD][bB][rR][oO][wW][sS][eE][rR])$
        - in: query
          name: isDefault
          required: false
          description: Filter locations by default status (true or false).
          schema:
            type: string
            minLength: 1
            maxLength: 5
            pattern: '^([tT][rR][uU][eE]|[fF][aA][lL][sS][eE])$'
        - in: query
          name: ipAddressesContains
          required: false
          description: >-
            Filter locations by IPv4 and/or IPv6 addresses where the address
            contains the given value.
          style: form
          explode: false
          schema:
            type: array
            maxItems: 100
            items:
              type: string
            uniqueItems: true
        - in: query
          name: domainNames
          required: false
          description: >-
            Filter request by domain names where the domain name matches the
            given value.
          style: form
          explode: false
          schema:
            type: array
            maxItems: 100
            items:
              type: string
              pattern: >-
                ^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.?)$
        - in: query
          name: includeDeleted
          required: false
          description: >-
            Filter locations by whether to include soft deleted locations or
            not.
          schema:
            type: boolean
        - in: query
          name: sort
          required: false
          style: form
          explode: false
          schema:
            type: array
            minItems: 1
            maxItems: 3
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          description: >-
            List of one or more fields to sort by. Available fields to sort by
            are 'name', 'description', and 'dohEnabled'. Note that sorting is in
            alphabetical order. Examples: 'sort=name', 'sort=description:asc',
            'sort=name,description:desc'.
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Contains the pagination data and the list of locations for the
                  actual page.
                properties:
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
                  items:
                    type: array
                    description: List of locations.
                    items:
                      type: object
                      description: Represents a location.
                      properties:
                        name:
                          type: string
                          description: Location name.
                          minLength: 1
                          maxLength: 100
                          pattern: '^[a-zA-Z0-9\-_ ]+$'
                        id:
                          description: The unique ID of this location.
                          type: string
                          format: uuid
                          readOnly: true
                        isDefault:
                          description: Indicates if this is the default location.
                          type: boolean
                        description:
                          description: The description of this location.
                          type: string
                          maxLength: 250
                        createdAt:
                          description: The date/time when this location was created.
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          description: The date/time when this location was updated.
                          type: string
                          format: date-time
                          readOnly: true
                        ipAddresses:
                          description: >-
                            The IPv4 and/or IPv6 list of addresses for this
                            location. The combined number of items in
                            `ipAddresses` and `domainNames` must not exceed 100.
                          allOf:
                            - type: array
                              items:
                                type: string
                              maxItems: 100
                              uniqueItems: true
                        domainNames:
                          description: >-
                            The list of domain names for this location. The
                            combined number of items in `ipAddresses` and
                            `domainNames` must not exceed 100.
                          allOf:
                            - type: array
                              items:
                                type: string
                              maxItems: 100
                              uniqueItems: true
                        dohSecureLocationId:
                          description: >-
                            The DNS Over HTTPS secure location ID, which is is a
                            globally unique random ID generated for this
                            location.
                          type: string
                        dohEnabled:
                          description: >-
                            Indicates if the DNS Over HTTPS is enabled for this
                            location.
                          type: boolean
                        policyId:
                          description: The policy ID associated with this location.
                          type: string
                          format: uuid
                        dohUrl:
                          type: string
                        type:
                          allOf:
                            - type: string
                              description: Represents the type of a location.
                              enum:
                                - standard
                                - sfos
                                - protectedBrowser
                              x-enum-varnames:
                                - STANDARD
                                - SFOS
                                - PROTECTED_BROWSER
                          default: standard
                        label:
                          description: An optional label for this location.
                          type: string
                          maxLength: 256
                        deletedAt:
                          description: The date/time when this location was soft deleted.
                          type: string
                          format: date-time
                          readOnly: true
                          default: null
                          nullable: true
                        policyWebcatVersion:
                          description: >-
                            Webcat version of the policy associated with this
                            location.
                          type: integer
                          readOnly: true
                      example:
                        name: Headquarters
                        id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                        isDefault: false
                        description: Main office location with secure DNS configuration.
                        type: standard
                        label: Main HQ
                        createdAt: '2025-01-01T12:00:00.686+00:00'
                        updatedAt: '2025-08-01T08:30:00.200+00:00'
                        deletedAt: '2025-10-01T08:30:00.200+00:00'
                        ipAddresses:
                          - 192.168.1.1
                          - 192.168.1.2
                        domainNames:
                          - hq.company.com
                          - internal.company.com
                        dohSecureLocationId: 392oj0e54880r
                        dohEnabled: true
                        policyId: e4f558e2-9f3a-44e0-a7a3-6b2f7b8b3d5d
                        dohUrl: >-
                          https://392oj0e54880r.secure.dev.dnsprotection.sophos.com/dns-query
                        policyWebcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    post:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Locations
      summary: Create Location
      description: >-
        Creates a new Location and returns the newly created Location. There is
        a limit of 50 locations per account.
      operationId: createLocation
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Represents a location.
              properties:
                name:
                  type: string
                  description: Location name.
                  minLength: 1
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9\-_ ]+$'
                id:
                  description: The unique ID of this location.
                  type: string
                  format: uuid
                  readOnly: true
                isDefault:
                  description: Indicates if this is the default location.
                  type: boolean
                description:
                  description: The description of this location.
                  type: string
                  maxLength: 250
                createdAt:
                  description: The date/time when this location was created.
                  type: string
                  format: date-time
                  readOnly: true
                updatedAt:
                  description: The date/time when this location was updated.
                  type: string
                  format: date-time
                  readOnly: true
                ipAddresses:
                  description: >-
                    The IPv4 and/or IPv6 list of addresses for this location.
                    The combined number of items in `ipAddresses` and
                    `domainNames` must not exceed 100.
                  allOf:
                    - type: array
                      items:
                        type: string
                      maxItems: 100
                      uniqueItems: true
                domainNames:
                  description: >-
                    The list of domain names for this location. The combined
                    number of items in `ipAddresses` and `domainNames` must not
                    exceed 100.
                  allOf:
                    - type: array
                      items:
                        type: string
                      maxItems: 100
                      uniqueItems: true
                dohSecureLocationId:
                  description: >-
                    The DNS Over HTTPS secure location ID, which is is a
                    globally unique random ID generated for this location.
                  type: string
                dohEnabled:
                  description: >-
                    Indicates if the DNS Over HTTPS is enabled for this
                    location.
                  type: boolean
                policyId:
                  description: The policy ID associated with this location.
                  type: string
                  format: uuid
                dohUrl:
                  type: string
                type:
                  allOf:
                    - type: string
                      description: Represents the type of a location.
                      enum:
                        - standard
                        - sfos
                        - protectedBrowser
                      x-enum-varnames:
                        - STANDARD
                        - SFOS
                        - PROTECTED_BROWSER
                  default: standard
                label:
                  description: An optional label for this location.
                  type: string
                  maxLength: 256
                deletedAt:
                  description: The date/time when this location was soft deleted.
                  type: string
                  format: date-time
                  readOnly: true
                  default: null
                  nullable: true
                policyWebcatVersion:
                  description: Webcat version of the policy associated with this location.
                  type: integer
                  readOnly: true
              example:
                name: Headquarters
                id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                isDefault: false
                description: Main office location with secure DNS configuration.
                type: standard
                label: Main HQ
                createdAt: '2025-01-01T12:00:00.686+00:00'
                updatedAt: '2025-08-01T08:30:00.200+00:00'
                deletedAt: '2025-10-01T08:30:00.200+00:00'
                ipAddresses:
                  - 192.168.1.1
                  - 192.168.1.2
                domainNames:
                  - hq.company.com
                  - internal.company.com
                dohSecureLocationId: 392oj0e54880r
                dohEnabled: true
                policyId: e4f558e2-9f3a-44e0-a7a3-6b2f7b8b3d5d
                dohUrl: >-
                  https://392oj0e54880r.secure.dev.dnsprotection.sophos.com/dns-query
                policyWebcatVersion: 1
        required: true
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                type: object
                description: Represents a location.
                properties:
                  name:
                    type: string
                    description: Location name.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  id:
                    description: The unique ID of this location.
                    type: string
                    format: uuid
                    readOnly: true
                  isDefault:
                    description: Indicates if this is the default location.
                    type: boolean
                  description:
                    description: The description of this location.
                    type: string
                    maxLength: 250
                  createdAt:
                    description: The date/time when this location was created.
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    description: The date/time when this location was updated.
                    type: string
                    format: date-time
                    readOnly: true
                  ipAddresses:
                    description: >-
                      The IPv4 and/or IPv6 list of addresses for this location.
                      The combined number of items in `ipAddresses` and
                      `domainNames` must not exceed 100.
                    allOf:
                      - type: array
                        items:
                          type: string
                        maxItems: 100
                        uniqueItems: true
                  domainNames:
                    description: >-
                      The list of domain names for this location. The combined
                      number of items in `ipAddresses` and `domainNames` must
                      not exceed 100.
                    allOf:
                      - type: array
                        items:
                          type: string
                        maxItems: 100
                        uniqueItems: true
                  dohSecureLocationId:
                    description: >-
                      The DNS Over HTTPS secure location ID, which is is a
                      globally unique random ID generated for this location.
                    type: string
                  dohEnabled:
                    description: >-
                      Indicates if the DNS Over HTTPS is enabled for this
                      location.
                    type: boolean
                  policyId:
                    description: The policy ID associated with this location.
                    type: string
                    format: uuid
                  dohUrl:
                    type: string
                  type:
                    allOf:
                      - type: string
                        description: Represents the type of a location.
                        enum:
                          - standard
                          - sfos
                          - protectedBrowser
                        x-enum-varnames:
                          - STANDARD
                          - SFOS
                          - PROTECTED_BROWSER
                    default: standard
                  label:
                    description: An optional label for this location.
                    type: string
                    maxLength: 256
                  deletedAt:
                    description: The date/time when this location was soft deleted.
                    type: string
                    format: date-time
                    readOnly: true
                    default: null
                    nullable: true
                  policyWebcatVersion:
                    description: >-
                      Webcat version of the policy associated with this
                      location.
                    type: integer
                    readOnly: true
                example:
                  name: Headquarters
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  isDefault: false
                  description: Main office location with secure DNS configuration.
                  type: standard
                  label: Main HQ
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
                  deletedAt: '2025-10-01T08:30:00.200+00:00'
                  ipAddresses:
                    - 192.168.1.1
                    - 192.168.1.2
                  domainNames:
                    - hq.company.com
                    - internal.company.com
                  dohSecureLocationId: 392oj0e54880r
                  dohEnabled: true
                  policyId: e4f558e2-9f3a-44e0-a7a3-6b2f7b8b3d5d
                  dohUrl: >-
                    https://392oj0e54880r.secure.dev.dnsprotection.sophos.com/dns-query
                  policyWebcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
  '/locations/{id}':
    get:
      x-soph-permissions: 'swgaas.config:read OR swgaas.config.dataplane:read'
      tags:
        - Locations
      summary: Get Location
      description: Returns Location of a given ID.
      operationId: getLocationById
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: id
          description: A unique identifier of the Location.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Represents a location.
                properties:
                  name:
                    type: string
                    description: Location name.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  id:
                    description: The unique ID of this location.
                    type: string
                    format: uuid
                    readOnly: true
                  isDefault:
                    description: Indicates if this is the default location.
                    type: boolean
                  description:
                    description: The description of this location.
                    type: string
                    maxLength: 250
                  createdAt:
                    description: The date/time when this location was created.
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    description: The date/time when this location was updated.
                    type: string
                    format: date-time
                    readOnly: true
                  ipAddresses:
                    description: >-
                      The IPv4 and/or IPv6 list of addresses for this location.
                      The combined number of items in `ipAddresses` and
                      `domainNames` must not exceed 100.
                    allOf:
                      - type: array
                        items:
                          type: string
                        maxItems: 100
                        uniqueItems: true
                  domainNames:
                    description: >-
                      The list of domain names for this location. The combined
                      number of items in `ipAddresses` and `domainNames` must
                      not exceed 100.
                    allOf:
                      - type: array
                        items:
                          type: string
                        maxItems: 100
                        uniqueItems: true
                  dohSecureLocationId:
                    description: >-
                      The DNS Over HTTPS secure location ID, which is is a
                      globally unique random ID generated for this location.
                    type: string
                  dohEnabled:
                    description: >-
                      Indicates if the DNS Over HTTPS is enabled for this
                      location.
                    type: boolean
                  policyId:
                    description: The policy ID associated with this location.
                    type: string
                    format: uuid
                  dohUrl:
                    type: string
                  type:
                    allOf:
                      - type: string
                        description: Represents the type of a location.
                        enum:
                          - standard
                          - sfos
                          - protectedBrowser
                        x-enum-varnames:
                          - STANDARD
                          - SFOS
                          - PROTECTED_BROWSER
                    default: standard
                  label:
                    description: An optional label for this location.
                    type: string
                    maxLength: 256
                  deletedAt:
                    description: The date/time when this location was soft deleted.
                    type: string
                    format: date-time
                    readOnly: true
                    default: null
                    nullable: true
                  policyWebcatVersion:
                    description: >-
                      Webcat version of the policy associated with this
                      location.
                    type: integer
                    readOnly: true
                example:
                  name: Headquarters
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  isDefault: false
                  description: Main office location with secure DNS configuration.
                  type: standard
                  label: Main HQ
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
                  deletedAt: '2025-10-01T08:30:00.200+00:00'
                  ipAddresses:
                    - 192.168.1.1
                    - 192.168.1.2
                  domainNames:
                    - hq.company.com
                    - internal.company.com
                  dohSecureLocationId: 392oj0e54880r
                  dohEnabled: true
                  policyId: e4f558e2-9f3a-44e0-a7a3-6b2f7b8b3d5d
                  dohUrl: >-
                    https://392oj0e54880r.secure.dev.dnsprotection.sophos.com/dns-query
                  policyWebcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    patch:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Locations
      summary: Update Location
      description: Updates given Location.
      operationId: patchLocation
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: id
          description: A unique identifier of the Location.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Partial update payload for a Location. Only include the fields
                you wish to update. Fields not present will remain unchanged.
                Use null (where allowed) to clear a value.
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: Location name.
                  minLength: 1
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9\-_ ]+$'
                  nullable: true
                isDefault:
                  type: boolean
                  description: Indicates if this is the default location.
                  nullable: true
                description:
                  type: string
                  description: The description of this location.
                  maxLength: 250
                  nullable: true
                ipAddresses:
                  description: >-
                    The IPv4 and/or IPv6 list of addresses for this location.
                    The combined number of items in `ipAddresses` and
                    `domainNames` must not exceed 100.
                  nullable: true
                  oneOf:
                    - type: array
                      items:
                        type: string
                      maxItems: 100
                      uniqueItems: true
                    - type: object
                      additionalProperties: false
                      description: >-
                        Extension of JSON patch for sets of strings.   - `add`:
                        items to be added. Ignore duplicate items in the target
                        set. - `remove`: items to be removed. Ignore missing
                        items in the target set.
                      properties:
                        add:
                          type: array
                          items:
                            type: string
                          maxItems: 100
                          uniqueItems: true
                        remove:
                          type: array
                          items:
                            type: string
                          maxItems: 100
                          uniqueItems: true
                      example:
                        add:
                          - item3
                        remove:
                          - item1
                domainNames:
                  description: >-
                    The list of domain names for this location. The combined
                    number of items in `ipAddresses` and `domainNames` must not
                    exceed 100. Send an empty array to remove all domain names.
                  nullable: true
                  oneOf:
                    - type: array
                      items:
                        type: string
                      maxItems: 100
                      uniqueItems: true
                    - type: object
                      additionalProperties: false
                      description: >-
                        Extension of JSON patch for sets of strings.   - `add`:
                        items to be added. Ignore duplicate items in the target
                        set. - `remove`: items to be removed. Ignore missing
                        items in the target set.
                      properties:
                        add:
                          type: array
                          items:
                            type: string
                          maxItems: 100
                          uniqueItems: true
                        remove:
                          type: array
                          items:
                            type: string
                          maxItems: 100
                          uniqueItems: true
                      example:
                        add:
                          - item3
                        remove:
                          - item1
                dohEnabled:
                  type: boolean
                  description: >-
                    Indicates if the DNS Over HTTPS is enabled for this
                    location.
                  nullable: true
                type:
                  description: Indicates the type of this location.
                  allOf:
                    - type: string
                      description: Represents the type of a location.
                      enum:
                        - standard
                        - sfos
                        - protectedBrowser
                      x-enum-varnames:
                        - STANDARD
                        - SFOS
                        - PROTECTED_BROWSER
                  nullable: true
                label:
                  description: An optional label for this location.
                  type: string
                  maxLength: 256
                  nullable: true
                deletedAt:
                  description: The date/time when this location was soft deleted.
                  type: string
                  format: date-time
                  nullable: true
              example:
                name: HQ - Dublin
                label: Main HQ
                ipAddresses:
                  add:
                    - '2001:0db8:85a3:0000:0000:8a2e:0370:7334'
                domainNames:
                  add:
                    - hq.company.com
                    - office.example.org
                  remove:
                    - home.lab.org
                dohEnabled: false
                deletedAt: null
        required: true
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Represents a location.
                properties:
                  name:
                    type: string
                    description: Location name.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  id:
                    description: The unique ID of this location.
                    type: string
                    format: uuid
                    readOnly: true
                  isDefault:
                    description: Indicates if this is the default location.
                    type: boolean
                  description:
                    description: The description of this location.
                    type: string
                    maxLength: 250
                  createdAt:
                    description: The date/time when this location was created.
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    description: The date/time when this location was updated.
                    type: string
                    format: date-time
                    readOnly: true
                  ipAddresses:
                    description: >-
                      The IPv4 and/or IPv6 list of addresses for this location.
                      The combined number of items in `ipAddresses` and
                      `domainNames` must not exceed 100.
                    allOf:
                      - type: array
                        items:
                          type: string
                        maxItems: 100
                        uniqueItems: true
                  domainNames:
                    description: >-
                      The list of domain names for this location. The combined
                      number of items in `ipAddresses` and `domainNames` must
                      not exceed 100.
                    allOf:
                      - type: array
                        items:
                          type: string
                        maxItems: 100
                        uniqueItems: true
                  dohSecureLocationId:
                    description: >-
                      The DNS Over HTTPS secure location ID, which is is a
                      globally unique random ID generated for this location.
                    type: string
                  dohEnabled:
                    description: >-
                      Indicates if the DNS Over HTTPS is enabled for this
                      location.
                    type: boolean
                  policyId:
                    description: The policy ID associated with this location.
                    type: string
                    format: uuid
                  dohUrl:
                    type: string
                  type:
                    allOf:
                      - type: string
                        description: Represents the type of a location.
                        enum:
                          - standard
                          - sfos
                          - protectedBrowser
                        x-enum-varnames:
                          - STANDARD
                          - SFOS
                          - PROTECTED_BROWSER
                    default: standard
                  label:
                    description: An optional label for this location.
                    type: string
                    maxLength: 256
                  deletedAt:
                    description: The date/time when this location was soft deleted.
                    type: string
                    format: date-time
                    readOnly: true
                    default: null
                    nullable: true
                  policyWebcatVersion:
                    description: >-
                      Webcat version of the policy associated with this
                      location.
                    type: integer
                    readOnly: true
                example:
                  name: Headquarters
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  isDefault: false
                  description: Main office location with secure DNS configuration.
                  type: standard
                  label: Main HQ
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
                  deletedAt: '2025-10-01T08:30:00.200+00:00'
                  ipAddresses:
                    - 192.168.1.1
                    - 192.168.1.2
                  domainNames:
                    - hq.company.com
                    - internal.company.com
                  dohSecureLocationId: 392oj0e54880r
                  dohEnabled: true
                  policyId: e4f558e2-9f3a-44e0-a7a3-6b2f7b8b3d5d
                  dohUrl: >-
                    https://392oj0e54880r.secure.dev.dnsprotection.sophos.com/dns-query
                  policyWebcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    delete:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Locations
      summary: Delete Location
      description: Deletes Location by given ID.
      operationId: deleteLocation
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: id
          description: A unique identifier of the Location.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
  /policies:
    get:
      x-soph-permissions: 'swgaas.config:read OR swgaas.config.dataplane:read'
      tags:
        - Policies
      summary: List Policies
      description: Returns all Policies.
      operationId: getAllPolicies
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: name
          required: false
          description: Filter request by name.
          schema:
            type: string
            minLength: 1
            maxLength: 100
            pattern: '^[a-zA-Z0-9\-_ ]+$'
        - in: query
          name: nameContains
          required: false
          description: Filter request where name contains the given value.
          schema:
            type: string
            minLength: 1
            maxLength: 100
            pattern: '^[a-zA-Z0-9\-_ ]+$'
        - in: query
          name: categoryPolicy
          required: false
          description: >-
            Filter policies by category policy, valid values are clean, optimal,
            bandwidth, business, blockAi, and custom (case insensitive).
          schema:
            type: string
            minLength: 1
            pattern: >-
              ^([cC][lL][eE][aA][nN]|[Oo][Pp][Tt][Ii][Mm][Aa][Ll]|[Bb][Aa][Nn][Dd][Ww][Ii][Dd][Tt][Hh]|[Bb][Uu][Ss][Ii][Nn][Ee][Ss][Ss]|[Cc][Uu][Ss][Tt][Oo][Mm]|[Bb][Ll][Oo][Cc][Kk][Aa][Ii])$
        - in: query
          name: safeSearchYouTubeRestrictionLevel
          required: false
          description: >-
            Filter policies by YouTube restriction level. Valid values are
            moderate and strict (case insensitive).
          schema:
            type: string
            minLength: 1
            pattern: '^([Mm][Oo][Dd][Ee][Rr][Aa][Tt][Ee]|[Ss][Tt][Rr][Ii][Cc][Tt])$'
        - in: query
          name: safeSearchForSearchEnginesEnabled
          required: false
          description: Filter policies by safe search for search engines enabled status.
          schema:
            type: boolean
        - in: query
          name: safeSearchForYouTubeEnabled
          required: false
          description: Filter policies by safe search for YouTube enabled status.
          schema:
            type: boolean
        - in: query
          name: sort
          required: false
          style: form
          explode: false
          schema:
            type: array
            minItems: 1
            maxItems: 5
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          description: >-
            List of one or more fields to sort by. Available fields to sort by
            are 'name', 'description', 'categoryPolicy', 'createdAt', and
            'updatedAt'. Note that sorting is in alphabetical order. Examples:
            'sort=name', 'sort=description:asc', 'sort=name,createdAt:desc'.
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Contains the pagination data and the list of policies for the
                  actual page.
                properties:
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
                  items:
                    type: array
                    description: List of policies.
                    items:
                      type: object
                      description: Represents a Policy.
                      required:
                        - id
                        - name
                        - createdAt
                        - updatedAt
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: The unique ID of this Policy.
                          readOnly: true
                        name:
                          type: string
                          description: Name of the Policy.
                          minLength: 1
                          maxLength: 100
                          pattern: '^[a-zA-Z0-9\-_ ]+$'
                        description:
                          type: string
                          description: Description about the Policy.
                          maxLength: 250
                        categoryPolicy:
                          description: Category of the Policy.
                          allOf:
                            - type: string
                              description: Category Policy type.
                              enum:
                                - clean
                                - optimal
                                - bandwidth
                                - business
                                - custom
                                - blockAi
                              default: clean
                              x-enum-varnames:
                                - CLEAN
                                - OPTIMAL
                                - BANDWIDTH
                                - BUSINESS
                                - CUSTOM
                                - BLOCKAI
                        categoryGroupActionSettings:
                          type: object
                          maxProperties: 50
                          additionalProperties:
                            type: string
                            description: >-
                              Action for a category in category group action
                              settings.
                            enum:
                              - allow
                              - block
                              - alert
                              - custom
                            x-enum-varnames:
                              - ALLOW
                              - BLOCK
                              - ALERT
                              - CUSTOM
                          description: >-
                            Map of category group identifier to action (allow,
                            block, alert, or custom). For example,
                            productivity/allow, social/block, dataloss/allow.
                        rejectedWebCategories:
                          type: array
                          items:
                            type: integer
                            minimum: 1
                            maximum: 2147483647
                          description: Rejected Web Categories of the Policy.
                          uniqueItems: true
                          maxItems: 500
                        locationIds:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: The location ids assigned to this policy.
                          uniqueItems: true
                        customDomainsEnabled:
                          type: boolean
                          description: Is allowed and blocked custom domains enabled.
                        allowedCustomDomainIds:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: The custom domain ids allowed by this policy.
                          uniqueItems: true
                          maxItems: 100
                        blockedCustomDomainIds:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: The custom domain ids blocked by this policy.
                          uniqueItems: true
                          maxItems: 100
                        safeSearchForSearchEnginesEnabled:
                          type: boolean
                          description: Is safesearch for search engine enabled.
                        safeSearchForYouTubeEnabled:
                          type: boolean
                          description: Is safesearch for youtube enabled.
                        safeSearchYouTubeRestrictionLevel:
                          description: YouTube restriction level.
                          allOf:
                            - type: string
                              description: YouTube restriction level.
                              enum:
                                - moderate
                                - strict
                              x-enum-varnames:
                                - MODERATE
                                - STRICT
                        createdAt:
                          type: string
                          format: date-time
                          description: The date/time when this Policy was created.
                          readOnly: true
                        updatedAt:
                          type: string
                          format: date-time
                          description: The date/time when this Policy was updated.
                          readOnly: true
                        webcatVersion:
                          description: Webcat version of the policy.
                          type: integer
                          readOnly: true
                      example:
                        name: My Policy
                        id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                        description: Example Policy with comprehensive settings
                        categoryPolicy: optimal
                        categoryGroupActionSettings:
                          productivity: allow
                          social: block
                          dataloss: block
                          business: allow
                          bandwidth: block
                          infrastructure: allow
                          threats: block
                          uncategorized: allow
                          adult: block
                        rejectedWebCategories:
                          - 1001
                          - 1002
                          - 1005
                        locationIds:
                          - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                          - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                        customDomainsEnabled: true
                        allowedCustomDomainIds:
                          - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        blockedCustomDomainIds:
                          - b2c3d4e5-f6a7-8901-bcde-f12345678901
                        safeSearchForSearchEnginesEnabled: true
                        safeSearchForYouTubeEnabled: true
                        safeSearchYouTubeRestrictionLevel: strict
                        createdAt: '2025-01-01T12:00:00.686+00:00'
                        updatedAt: '2025-08-01T08:30:00.200+00:00'
                        webcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    post:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Policies
      summary: Create Policy
      description: >-
        Creates a new Policy and returns the newly created Policy. There is a
        limit of 50 Policies per account.
      operationId: createPolicy
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Request body for creating a Policy. Only writable fields; server
                sets id, createdAt, updatedAt.
              required:
                - name
              properties:
                name:
                  type: string
                  description: Name of the Policy.
                  minLength: 1
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9\-_ ]+$'
                description:
                  type: string
                  description: Description about the Policy.
                  maxLength: 250
                categoryPolicy:
                  description: Category of the Policy.
                  allOf:
                    - type: string
                      description: Category Policy type.
                      enum:
                        - clean
                        - optimal
                        - bandwidth
                        - business
                        - custom
                        - blockAi
                      default: clean
                      x-enum-varnames:
                        - CLEAN
                        - OPTIMAL
                        - BANDWIDTH
                        - BUSINESS
                        - CUSTOM
                        - BLOCKAI
                categoryGroupActionSettings:
                  type: object
                  maxProperties: 50
                  additionalProperties:
                    type: string
                    description: Action for a category in category group action settings.
                    enum:
                      - allow
                      - block
                      - alert
                      - custom
                    x-enum-varnames:
                      - ALLOW
                      - BLOCK
                      - ALERT
                      - CUSTOM
                  description: >-
                    Map of category group identifier to action (allow, block,
                    alert, or custom). For example, productivity/allow,
                    social/block, dataloss/allow.
                rejectedWebCategories:
                  type: array
                  items:
                    type: integer
                    minimum: 1
                    maximum: 2147483647
                  description: Rejected Web Categories of the Policy.
                  uniqueItems: true
                  maxItems: 500
                locationIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: The location ids assigned to this policy.
                  uniqueItems: true
                customDomainsEnabled:
                  type: boolean
                  description: Is allowed and blocked custom domains enabled.
                allowedCustomDomainIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: The custom domain ids allowed by this policy.
                  uniqueItems: true
                  maxItems: 100
                blockedCustomDomainIds:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: The custom domain ids blocked by this policy.
                  uniqueItems: true
                  maxItems: 100
                safeSearchForSearchEnginesEnabled:
                  type: boolean
                  description: Is safesearch for search engine enabled.
                safeSearchForYouTubeEnabled:
                  type: boolean
                  description: Is safesearch for youtube enabled.
                safeSearchYouTubeRestrictionLevel:
                  description: YouTube restriction level.
                  allOf:
                    - type: string
                      description: YouTube restriction level.
                      enum:
                        - moderate
                        - strict
                      x-enum-varnames:
                        - MODERATE
                        - STRICT
              example:
                name: My Policy
                description: Example Policy with comprehensive settings
                categoryPolicy: optimal
                categoryGroupActionSettings:
                  productivity: allow
                  social: block
                  dataloss: block
                  business: allow
                  bandwidth: block
                  infrastructure: allow
                  threats: block
                  uncategorized: allow
                  adult: block
                rejectedWebCategories:
                  - 1001
                  - 1002
                  - 1005
                locationIds:
                  - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                customDomainsEnabled: true
                allowedCustomDomainIds:
                  - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                blockedCustomDomainIds:
                  - b2c3d4e5-f6a7-8901-bcde-f12345678901
                safeSearchForSearchEnginesEnabled: true
                safeSearchForYouTubeEnabled: true
                safeSearchYouTubeRestrictionLevel: strict
        required: true
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                type: object
                description: Represents a Policy.
                required:
                  - id
                  - name
                  - createdAt
                  - updatedAt
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The unique ID of this Policy.
                    readOnly: true
                  name:
                    type: string
                    description: Name of the Policy.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  description:
                    type: string
                    description: Description about the Policy.
                    maxLength: 250
                  categoryPolicy:
                    description: Category of the Policy.
                    allOf:
                      - type: string
                        description: Category Policy type.
                        enum:
                          - clean
                          - optimal
                          - bandwidth
                          - business
                          - custom
                          - blockAi
                        default: clean
                        x-enum-varnames:
                          - CLEAN
                          - OPTIMAL
                          - BANDWIDTH
                          - BUSINESS
                          - CUSTOM
                          - BLOCKAI
                  categoryGroupActionSettings:
                    type: object
                    maxProperties: 50
                    additionalProperties:
                      type: string
                      description: Action for a category in category group action settings.
                      enum:
                        - allow
                        - block
                        - alert
                        - custom
                      x-enum-varnames:
                        - ALLOW
                        - BLOCK
                        - ALERT
                        - CUSTOM
                    description: >-
                      Map of category group identifier to action (allow, block,
                      alert, or custom). For example, productivity/allow,
                      social/block, dataloss/allow.
                  rejectedWebCategories:
                    type: array
                    items:
                      type: integer
                      minimum: 1
                      maximum: 2147483647
                    description: Rejected Web Categories of the Policy.
                    uniqueItems: true
                    maxItems: 500
                  locationIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The location ids assigned to this policy.
                    uniqueItems: true
                  customDomainsEnabled:
                    type: boolean
                    description: Is allowed and blocked custom domains enabled.
                  allowedCustomDomainIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The custom domain ids allowed by this policy.
                    uniqueItems: true
                    maxItems: 100
                  blockedCustomDomainIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The custom domain ids blocked by this policy.
                    uniqueItems: true
                    maxItems: 100
                  safeSearchForSearchEnginesEnabled:
                    type: boolean
                    description: Is safesearch for search engine enabled.
                  safeSearchForYouTubeEnabled:
                    type: boolean
                    description: Is safesearch for youtube enabled.
                  safeSearchYouTubeRestrictionLevel:
                    description: YouTube restriction level.
                    allOf:
                      - type: string
                        description: YouTube restriction level.
                        enum:
                          - moderate
                          - strict
                        x-enum-varnames:
                          - MODERATE
                          - STRICT
                  createdAt:
                    type: string
                    format: date-time
                    description: The date/time when this Policy was created.
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    description: The date/time when this Policy was updated.
                    readOnly: true
                  webcatVersion:
                    description: Webcat version of the policy.
                    type: integer
                    readOnly: true
                example:
                  name: My Policy
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  description: Example Policy with comprehensive settings
                  categoryPolicy: optimal
                  categoryGroupActionSettings:
                    productivity: allow
                    social: block
                    dataloss: block
                    business: allow
                    bandwidth: block
                    infrastructure: allow
                    threats: block
                    uncategorized: allow
                    adult: block
                  rejectedWebCategories:
                    - 1001
                    - 1002
                    - 1005
                  locationIds:
                    - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                    - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                  customDomainsEnabled: true
                  allowedCustomDomainIds:
                    - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                  blockedCustomDomainIds:
                    - b2c3d4e5-f6a7-8901-bcde-f12345678901
                  safeSearchForSearchEnginesEnabled: true
                  safeSearchForYouTubeEnabled: true
                  safeSearchYouTubeRestrictionLevel: strict
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
                  webcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
  '/policies/{id}':
    get:
      x-soph-permissions: 'swgaas.config:read OR swgaas.config.dataplane:read'
      tags:
        - Policies
      summary: Get Policy
      description: Returns Policy of a given ID.
      operationId: getPolicyById
      parameters:
        - in: path
          name: id
          description: A unique identifier of the Policy.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Represents a Policy.
                required:
                  - id
                  - name
                  - createdAt
                  - updatedAt
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The unique ID of this Policy.
                    readOnly: true
                  name:
                    type: string
                    description: Name of the Policy.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  description:
                    type: string
                    description: Description about the Policy.
                    maxLength: 250
                  categoryPolicy:
                    description: Category of the Policy.
                    allOf:
                      - type: string
                        description: Category Policy type.
                        enum:
                          - clean
                          - optimal
                          - bandwidth
                          - business
                          - custom
                          - blockAi
                        default: clean
                        x-enum-varnames:
                          - CLEAN
                          - OPTIMAL
                          - BANDWIDTH
                          - BUSINESS
                          - CUSTOM
                          - BLOCKAI
                  categoryGroupActionSettings:
                    type: object
                    maxProperties: 50
                    additionalProperties:
                      type: string
                      description: Action for a category in category group action settings.
                      enum:
                        - allow
                        - block
                        - alert
                        - custom
                      x-enum-varnames:
                        - ALLOW
                        - BLOCK
                        - ALERT
                        - CUSTOM
                    description: >-
                      Map of category group identifier to action (allow, block,
                      alert, or custom). For example, productivity/allow,
                      social/block, dataloss/allow.
                  rejectedWebCategories:
                    type: array
                    items:
                      type: integer
                      minimum: 1
                      maximum: 2147483647
                    description: Rejected Web Categories of the Policy.
                    uniqueItems: true
                    maxItems: 500
                  locationIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The location ids assigned to this policy.
                    uniqueItems: true
                  customDomainsEnabled:
                    type: boolean
                    description: Is allowed and blocked custom domains enabled.
                  allowedCustomDomainIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The custom domain ids allowed by this policy.
                    uniqueItems: true
                    maxItems: 100
                  blockedCustomDomainIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The custom domain ids blocked by this policy.
                    uniqueItems: true
                    maxItems: 100
                  safeSearchForSearchEnginesEnabled:
                    type: boolean
                    description: Is safesearch for search engine enabled.
                  safeSearchForYouTubeEnabled:
                    type: boolean
                    description: Is safesearch for youtube enabled.
                  safeSearchYouTubeRestrictionLevel:
                    description: YouTube restriction level.
                    allOf:
                      - type: string
                        description: YouTube restriction level.
                        enum:
                          - moderate
                          - strict
                        x-enum-varnames:
                          - MODERATE
                          - STRICT
                  createdAt:
                    type: string
                    format: date-time
                    description: The date/time when this Policy was created.
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    description: The date/time when this Policy was updated.
                    readOnly: true
                  webcatVersion:
                    description: Webcat version of the policy.
                    type: integer
                    readOnly: true
                example:
                  name: My Policy
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  description: Example Policy with comprehensive settings
                  categoryPolicy: optimal
                  categoryGroupActionSettings:
                    productivity: allow
                    social: block
                    dataloss: block
                    business: allow
                    bandwidth: block
                    infrastructure: allow
                    threats: block
                    uncategorized: allow
                    adult: block
                  rejectedWebCategories:
                    - 1001
                    - 1002
                    - 1005
                  locationIds:
                    - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                    - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                  customDomainsEnabled: true
                  allowedCustomDomainIds:
                    - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                  blockedCustomDomainIds:
                    - b2c3d4e5-f6a7-8901-bcde-f12345678901
                  safeSearchForSearchEnginesEnabled: true
                  safeSearchForYouTubeEnabled: true
                  safeSearchYouTubeRestrictionLevel: strict
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
                  webcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    patch:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Policies
      summary: Update Policy
      description: Updates given Policy.
      operationId: patchPolicyById
      parameters:
        - in: path
          name: id
          description: A unique identifier of the Policy.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Partial update payload for a Policy. Only include the fields you
                wish to update. Fields not present will remain unchanged. Use
                null (where allowed) to clear a value. For list fields
                (rejectedWebCategories, locationIds, allowedCustomDomainIds,
                blockedCustomDomainIds) you can send a full array (replace),
                null (clear), or an object with add and remove arrays (partial
                update).
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: Name of the Policy.
                  minLength: 1
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9\-_ ]+$'
                description:
                  type: string
                  description: Description about the Policy.
                  maxLength: 250
                  nullable: true
                categoryPolicy:
                  description: Category of the Policy.
                  anyOf:
                    - type: string
                      description: Category Policy type.
                      enum:
                        - clean
                        - optimal
                        - bandwidth
                        - business
                        - custom
                        - blockAi
                      default: clean
                      x-enum-varnames:
                        - CLEAN
                        - OPTIMAL
                        - BANDWIDTH
                        - BUSINESS
                        - CUSTOM
                        - BLOCKAI
                    - type: object
                      nullable: true
                categoryGroupActionSettings:
                  description: >-
                    Map of category group identifier to action (allow, block,
                    alert, or custom). For example, productivity/allow,
                    social/block, dataloss/allow.
                  anyOf:
                    - type: object
                      maxProperties: 50
                      additionalProperties:
                        type: string
                        description: >-
                          Action for a category in category group action
                          settings.
                        enum:
                          - allow
                          - block
                          - alert
                          - custom
                        x-enum-varnames:
                          - ALLOW
                          - BLOCK
                          - ALERT
                          - CUSTOM
                      description: >-
                        Map of category group identifier to action (allow,
                        block, alert, or custom). For example,
                        productivity/allow, social/block, dataloss/allow.
                    - type: object
                      nullable: true
                rejectedWebCategories:
                  description: >-
                    Rejected Web Categories of the Policy. Send full array
                    (replace), null (clear), or add/remove object (partial
                    update).
                  oneOf:
                    - type: array
                      items:
                        type: integer
                        minimum: 1
                        maximum: 2147483647
                      uniqueItems: true
                      maxItems: 500
                      nullable: true
                    - type: object
                      additionalProperties: false
                      description: >-
                        Partial update for a set of integers (e.g. rejected web
                        category IDs). Use to add or remove items without
                        sending the full list. - `add`: items to be added.
                        Duplicates in the target set are ignored. - `remove`:
                        items to be removed. Missing items in the target set are
                        ignored.
                      properties:
                        add:
                          type: array
                          items:
                            type: integer
                            minimum: 1
                            maximum: 2147483647
                          description: Integers to add to the set.
                          uniqueItems: true
                          maxItems: 500
                        remove:
                          type: array
                          items:
                            type: integer
                            minimum: 1
                            maximum: 2147483647
                          description: Integers to remove from the set.
                          uniqueItems: true
                          maxItems: 500
                      example:
                        add:
                          - 1001
                          - 1002
                        remove:
                          - 1005
                locationIds:
                  description: >-
                    The location ids assigned to this policy. Send full array
                    (replace), null (clear), or add/remove object (partial
                    update).
                  oneOf:
                    - type: array
                      items:
                        type: string
                        format: uuid
                      uniqueItems: true
                      nullable: true
                    - type: object
                      additionalProperties: false
                      description: >-
                        Partial update for a set of UUIDs. Use to add or remove
                        items without sending the full list. - `add`: items to
                        be added. Duplicates in the target set are ignored. -
                        `remove`: items to be removed. Missing items in the
                        target set are ignored.
                      properties:
                        add:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: UUIDs to add to the set.
                          uniqueItems: true
                          maxItems: 100
                        remove:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: UUIDs to remove from the set.
                          uniqueItems: true
                          maxItems: 100
                      example:
                        add:
                          - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                          - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                        remove:
                          - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                customDomainsEnabled:
                  type: boolean
                  description: Is allowed and blocked custom domains enabled.
                  nullable: true
                allowedCustomDomainIds:
                  description: >-
                    The custom domain ids allowed by this policy. Send full
                    array (replace), null (clear), or add/remove object (partial
                    update).
                  oneOf:
                    - type: array
                      items:
                        type: string
                        format: uuid
                      uniqueItems: true
                      maxItems: 100
                      nullable: true
                    - type: object
                      additionalProperties: false
                      description: >-
                        Partial update for a set of UUIDs. Use to add or remove
                        items without sending the full list. - `add`: items to
                        be added. Duplicates in the target set are ignored. -
                        `remove`: items to be removed. Missing items in the
                        target set are ignored.
                      properties:
                        add:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: UUIDs to add to the set.
                          uniqueItems: true
                          maxItems: 100
                        remove:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: UUIDs to remove from the set.
                          uniqueItems: true
                          maxItems: 100
                      example:
                        add:
                          - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                          - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                        remove:
                          - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                blockedCustomDomainIds:
                  description: >-
                    The custom domain ids blocked by this policy. Send full
                    array (replace), null (clear), or add/remove object (partial
                    update).
                  oneOf:
                    - type: array
                      items:
                        type: string
                        format: uuid
                      uniqueItems: true
                      maxItems: 100
                      nullable: true
                    - type: object
                      additionalProperties: false
                      description: >-
                        Partial update for a set of UUIDs. Use to add or remove
                        items without sending the full list. - `add`: items to
                        be added. Duplicates in the target set are ignored. -
                        `remove`: items to be removed. Missing items in the
                        target set are ignored.
                      properties:
                        add:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: UUIDs to add to the set.
                          uniqueItems: true
                          maxItems: 100
                        remove:
                          type: array
                          items:
                            type: string
                            format: uuid
                          description: UUIDs to remove from the set.
                          uniqueItems: true
                          maxItems: 100
                      example:
                        add:
                          - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                          - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                        remove:
                          - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                safeSearchForSearchEnginesEnabled:
                  type: boolean
                  description: Is safesearch for search engine enabled.
                  nullable: true
                safeSearchForYouTubeEnabled:
                  type: boolean
                  description: Is safesearch for youtube enabled.
                  nullable: true
                safeSearchYouTubeRestrictionLevel:
                  description: YouTube restriction level.
                  anyOf:
                    - type: string
                      description: YouTube restriction level.
                      enum:
                        - moderate
                        - strict
                      x-enum-varnames:
                        - MODERATE
                        - STRICT
                    - type: object
                      nullable: true
              example:
                name: My Policy
                description: Example Policy
                locationIds:
                  add:
                    - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                    - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                  remove:
                    - a1b2c3d4-e5f6-7890-abcd-ef1234567890
        required: true
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Represents a Policy.
                required:
                  - id
                  - name
                  - createdAt
                  - updatedAt
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The unique ID of this Policy.
                    readOnly: true
                  name:
                    type: string
                    description: Name of the Policy.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  description:
                    type: string
                    description: Description about the Policy.
                    maxLength: 250
                  categoryPolicy:
                    description: Category of the Policy.
                    allOf:
                      - type: string
                        description: Category Policy type.
                        enum:
                          - clean
                          - optimal
                          - bandwidth
                          - business
                          - custom
                          - blockAi
                        default: clean
                        x-enum-varnames:
                          - CLEAN
                          - OPTIMAL
                          - BANDWIDTH
                          - BUSINESS
                          - CUSTOM
                          - BLOCKAI
                  categoryGroupActionSettings:
                    type: object
                    maxProperties: 50
                    additionalProperties:
                      type: string
                      description: Action for a category in category group action settings.
                      enum:
                        - allow
                        - block
                        - alert
                        - custom
                      x-enum-varnames:
                        - ALLOW
                        - BLOCK
                        - ALERT
                        - CUSTOM
                    description: >-
                      Map of category group identifier to action (allow, block,
                      alert, or custom). For example, productivity/allow,
                      social/block, dataloss/allow.
                  rejectedWebCategories:
                    type: array
                    items:
                      type: integer
                      minimum: 1
                      maximum: 2147483647
                    description: Rejected Web Categories of the Policy.
                    uniqueItems: true
                    maxItems: 500
                  locationIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The location ids assigned to this policy.
                    uniqueItems: true
                  customDomainsEnabled:
                    type: boolean
                    description: Is allowed and blocked custom domains enabled.
                  allowedCustomDomainIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The custom domain ids allowed by this policy.
                    uniqueItems: true
                    maxItems: 100
                  blockedCustomDomainIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: The custom domain ids blocked by this policy.
                    uniqueItems: true
                    maxItems: 100
                  safeSearchForSearchEnginesEnabled:
                    type: boolean
                    description: Is safesearch for search engine enabled.
                  safeSearchForYouTubeEnabled:
                    type: boolean
                    description: Is safesearch for youtube enabled.
                  safeSearchYouTubeRestrictionLevel:
                    description: YouTube restriction level.
                    allOf:
                      - type: string
                        description: YouTube restriction level.
                        enum:
                          - moderate
                          - strict
                        x-enum-varnames:
                          - MODERATE
                          - STRICT
                  createdAt:
                    type: string
                    format: date-time
                    description: The date/time when this Policy was created.
                    readOnly: true
                  updatedAt:
                    type: string
                    format: date-time
                    description: The date/time when this Policy was updated.
                    readOnly: true
                  webcatVersion:
                    description: Webcat version of the policy.
                    type: integer
                    readOnly: true
                example:
                  name: My Policy
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  description: Example Policy with comprehensive settings
                  categoryPolicy: optimal
                  categoryGroupActionSettings:
                    productivity: allow
                    social: block
                    dataloss: block
                    business: allow
                    bandwidth: block
                    infrastructure: allow
                    threats: block
                    uncategorized: allow
                    adult: block
                  rejectedWebCategories:
                    - 1001
                    - 1002
                    - 1005
                  locationIds:
                    - d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                    - e5f2aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3f
                  customDomainsEnabled: true
                  allowedCustomDomainIds:
                    - a1b2c3d4-e5f6-7890-abcd-ef1234567890
                  blockedCustomDomainIds:
                    - b2c3d4e5-f6a7-8901-bcde-f12345678901
                  safeSearchForSearchEnginesEnabled: true
                  safeSearchForYouTubeEnabled: true
                  safeSearchYouTubeRestrictionLevel: strict
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
                  webcatVersion: 1
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    delete:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Policies
      summary: Delete Policy
      description: Deletes Policy by given ID.
      operationId: deletePolicyById
      parameters:
        - in: path
          name: id
          description: A unique identifier of the Policy.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
  /custom-domains:
    get:
      x-soph-permissions: 'swgaas.config:read OR swgaas.config.dataplane:read'
      tags:
        - Custom Domains List
      summary: List Custom Domains
      description: Returns all Custom Domains.
      operationId: getAllCustomDomainsLists
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: page
          required: false
          schema:
            type: integer
            default: 1
          description: 'The page number to fetch, starting with 1.'
        - in: query
          name: pageSize
          required: false
          schema:
            type: integer
            default: 50
          description: The size of the page requested.
        - in: query
          name: pageTotal
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether the number of pages should be calculated and returned in the
            response.
        - in: query
          name: name
          required: false
          description: Filter request by name.
          schema:
            type: string
            minLength: 1
            maxLength: 100
            pattern: '^[a-zA-Z0-9\-_ ]+$'
        - in: query
          name: nameContains
          required: false
          description: Filter request where name contains the given value.
          schema:
            type: string
            minLength: 1
            maxLength: 100
            pattern: '^[a-zA-Z0-9\-_ ]+$'
        - in: query
          name: domainNames
          required: false
          description: >-
            Filter request by domain names where the domain name matches the
            given value.
          style: form
          explode: false
          schema:
            type: array
            maxItems: 100
            items:
              type: string
              pattern: >-
                ^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.?)$
        - in: query
          name: sort
          required: false
          style: form
          explode: false
          schema:
            type: array
            minItems: 1
            maxItems: 4
            items:
              type: string
              pattern: '(^[^:]+$)|(^[^:]+:(asc|desc)$)'
          description: >-
            List of one or more fields to sort by. Available fields to sort by
            are 'name', 'description', 'createdAt', and 'updatedAt'. Note that
            sorting is in alphabetical order. Examples: 'sort=name',
            'sort=description:asc', 'sort=name,createdAt:desc'.
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Contains the pagination data and the list of custom domain
                  lists for the actual page.
                properties:
                  pages:
                    type: object
                    required:
                      - current
                      - size
                      - maxSize
                    properties:
                      current:
                        type: integer
                        description: The 1-based page number being returned.
                      size:
                        type: integer
                        description: The size of the page being returned.
                      total:
                        type: integer
                        description: >-
                          (Optional) The total number of pages that exist, if
                          pageTotal=true in the request.
                      items:
                        type: integer
                        description: (Optional) The total number of items across all pages.
                      maxSize:
                        type: integer
                        description: The maximum page size that can be requested.
                  items:
                    type: array
                    description: List of custom domain lists.
                    items:
                      type: object
                      description: Represents a Custom Domain List.
                      required:
                        - name
                      properties:
                        name:
                          type: string
                          description: The name of this Custom Domains List.
                          minLength: 1
                          maxLength: 100
                          pattern: '^[a-zA-Z0-9\-_ ]+$'
                        id:
                          description: The unique ID of this Custom Domains List.
                          type: string
                          format: uuid
                          readOnly: true
                        description:
                          description: The description of this Custom Domains List.
                          type: string
                          maxLength: 250
                        domains:
                          allOf:
                            - type: array
                              description: A set of string values.
                              items:
                                type: string
                                minLength: 1
                                maxLength: 255
                              maxItems: 1000
                              uniqueItems: true
                          description: The Domains (or Websites) associated with this List.
                        createdAt:
                          description: >-
                            The date/time when this custom domains list was
                            created.
                          type: string
                          format: date-time
                          readOnly: true
                        updatedAt:
                          description: >-
                            The date/time when this custom domains list was
                            updated.
                          type: string
                          format: date-time
                          readOnly: true
                      example:
                        name: My websites
                        id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                        description: Example Custom Domain List for a series of owned FQDN
                        domains:
                          - example.com
                          - example.org
                          - example.net
                        createdAt: '2025-01-01T12:00:00.686+00:00'
                        updatedAt: '2025-08-01T08:30:00.200+00:00'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    post:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Custom Domains List
      summary: Create Custom Domain
      description: >-
        Creates a new Custom Domain and returns the newly created Custom Domain.
        There is a limit of 50 Custom Domains per account.
      operationId: createCustomDomainsList
      parameters:
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: Represents a Custom Domain List.
              required:
                - name
              properties:
                name:
                  type: string
                  description: The name of this Custom Domains List.
                  minLength: 1
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9\-_ ]+$'
                id:
                  description: The unique ID of this Custom Domains List.
                  type: string
                  format: uuid
                  readOnly: true
                description:
                  description: The description of this Custom Domains List.
                  type: string
                  maxLength: 250
                domains:
                  allOf:
                    - type: array
                      description: A set of string values.
                      items:
                        type: string
                        minLength: 1
                        maxLength: 255
                      maxItems: 1000
                      uniqueItems: true
                  description: The Domains (or Websites) associated with this List.
                createdAt:
                  description: The date/time when this custom domains list was created.
                  type: string
                  format: date-time
                  readOnly: true
                updatedAt:
                  description: The date/time when this custom domains list was updated.
                  type: string
                  format: date-time
                  readOnly: true
              example:
                name: My websites
                id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                description: Example Custom Domain List for a series of owned FQDN
                domains:
                  - example.com
                  - example.org
                  - example.net
                createdAt: '2025-01-01T12:00:00.686+00:00'
                updatedAt: '2025-08-01T08:30:00.200+00:00'
        required: true
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                type: object
                description: Represents a Custom Domain List.
                required:
                  - name
                properties:
                  name:
                    type: string
                    description: The name of this Custom Domains List.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  id:
                    description: The unique ID of this Custom Domains List.
                    type: string
                    format: uuid
                    readOnly: true
                  description:
                    description: The description of this Custom Domains List.
                    type: string
                    maxLength: 250
                  domains:
                    allOf:
                      - type: array
                        description: A set of string values.
                        items:
                          type: string
                          minLength: 1
                          maxLength: 255
                        maxItems: 1000
                        uniqueItems: true
                    description: The Domains (or Websites) associated with this List.
                  createdAt:
                    description: The date/time when this custom domains list was created.
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    description: The date/time when this custom domains list was updated.
                    type: string
                    format: date-time
                    readOnly: true
                example:
                  name: My websites
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  description: Example Custom Domain List for a series of owned FQDN
                  domains:
                    - example.com
                    - example.org
                    - example.net
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
  '/custom-domains/{id}':
    get:
      x-soph-permissions: 'swgaas.config:read OR swgaas.config.dataplane:read'
      tags:
        - Custom Domains List
      summary: Get Custom Domain
      description: Returns CDL of a given ID.
      operationId: getCustomDomainsListById
      parameters:
        - in: path
          name: id
          description: A unique identifier of the Custom Domain.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Represents a Custom Domain List.
                required:
                  - name
                properties:
                  name:
                    type: string
                    description: The name of this Custom Domains List.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  id:
                    description: The unique ID of this Custom Domains List.
                    type: string
                    format: uuid
                    readOnly: true
                  description:
                    description: The description of this Custom Domains List.
                    type: string
                    maxLength: 250
                  domains:
                    allOf:
                      - type: array
                        description: A set of string values.
                        items:
                          type: string
                          minLength: 1
                          maxLength: 255
                        maxItems: 1000
                        uniqueItems: true
                    description: The Domains (or Websites) associated with this List.
                  createdAt:
                    description: The date/time when this custom domains list was created.
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    description: The date/time when this custom domains list was updated.
                    type: string
                    format: date-time
                    readOnly: true
                example:
                  name: My websites
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  description: Example Custom Domain List for a series of owned FQDN
                  domains:
                    - example.com
                    - example.org
                    - example.net
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    patch:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Custom Domains List
      summary: Update CDL by ID
      description: Updates given Custom Domains List.
      operationId: patchCustomDomainsListById
      parameters:
        - in: path
          name: id
          description: A unique identifier of the Custom Domain.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                Partial update payload for a Custom Domain List. Only include
                the fields you wish to update. Fields not present will remain
                unchanged. Use null (where allowed) to clear a value.
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: The name of this Custom Domain List.
                  minLength: 1
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9\-_ ]+$'
                  nullable: false
                description:
                  description: The description of this Custom Domain List.
                  type: string
                  maxLength: 250
                  nullable: true
                domains:
                  oneOf:
                    - type: array
                      description: A set of string values.
                      items:
                        type: string
                        minLength: 1
                        maxLength: 255
                      maxItems: 1000
                      uniqueItems: true
                    - type: object
                      additionalProperties: false
                      description: >-
                        Extension of JSON patch for sets of strings. - `add`:
                        items to be added. Ignore duplicate items in the target
                        set. - `remove`: items to be removed. Ignore missing
                        items in the target set.
                      properties:
                        add:
                          type: array
                          description: A set of string values.
                          items:
                            type: string
                            minLength: 1
                            maxLength: 255
                          maxItems: 1000
                          uniqueItems: true
                        remove:
                          type: array
                          description: A set of string values.
                          items:
                            type: string
                            minLength: 1
                            maxLength: 255
                          maxItems: 1000
                          uniqueItems: true
                      example:
                        add:
                          - example.com
                          - example.org
                        remove:
                          - old.example.com
                  description: The Domains (or Websites) associated with this List.
                  nullable: true
              example:
                name: My websites
                domains:
                  - example.com
                  - example.org
                  - example.net
        required: true
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Represents a Custom Domain List.
                required:
                  - name
                properties:
                  name:
                    type: string
                    description: The name of this Custom Domains List.
                    minLength: 1
                    maxLength: 100
                    pattern: '^[a-zA-Z0-9\-_ ]+$'
                  id:
                    description: The unique ID of this Custom Domains List.
                    type: string
                    format: uuid
                    readOnly: true
                  description:
                    description: The description of this Custom Domains List.
                    type: string
                    maxLength: 250
                  domains:
                    allOf:
                      - type: array
                        description: A set of string values.
                        items:
                          type: string
                          minLength: 1
                          maxLength: 255
                        maxItems: 1000
                        uniqueItems: true
                    description: The Domains (or Websites) associated with this List.
                  createdAt:
                    description: The date/time when this custom domains list was created.
                    type: string
                    format: date-time
                    readOnly: true
                  updatedAt:
                    description: The date/time when this custom domains list was updated.
                    type: string
                    format: date-time
                    readOnly: true
                example:
                  name: My websites
                  id: d4e1aee7-6c4e-4c9e-a8e2-1b1f4f7c4e3e
                  description: Example Custom Domain List for a series of owned FQDN
                  domains:
                    - example.com
                    - example.org
                    - example.net
                  createdAt: '2025-01-01T12:00:00.686+00:00'
                  updatedAt: '2025-08-01T08:30:00.200+00:00'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
    delete:
      x-soph-permissions: 'swgaas.config:write'
      tags:
        - Custom Domains List
      summary: Delete CDL by ID
      description: Deletes Custom Domains List by given ID.
      operationId: deleteCustomDomainsListById
      parameters:
        - in: path
          name: id
          description: A unique identifier of the Custom Domain.
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Tenant-ID
          in: header
          description: Tenant ID.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                description: Response to a previous request to delete an item.
                required:
                  - deleted
                properties:
                  deleted:
                    type: boolean
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  correlationId:
                    type: string
                    format: uuid
                  code:
                    type: string
                  createdAt:
                    type: string
                    format: datetime
                  requestId:
                    type: string
                    format: uuid
                  docUrl:
                    type: string
                    format: uri
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
