> ## Documentation Index
> Fetch the complete documentation index at: https://developers.aptranet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a policy override

> Project-scoped operation. Successful JSON and status-only responses vary by operation. The service does not declare a stable response schema for this operation; do not assume a collection envelope or undocumented fields.



## OpenAPI

````yaml /openapi-shield.json post /shield/domains/{domain_id}/default-rule-overrides
openapi: 3.1.0
info:
  title: Aptranet Cloud Shield API
  version: 1.0.0
  description: >-
    Public project-scoped API. Use the access key and secret together.
    Browser-only organization administration is documented separately. Request
    schemas and query parameters follow the service operation allowlist. Plan
    entitlements apply in addition to API permissions. Some analytics and action
    responses have operation-specific JSON shapes; where the implementation
    provides no stable response contract, the reference deliberately does not
    invent one.
servers:
  - url: https://api.aptranet.com
security:
  - bearerAuth: []
    apiSecret: []
paths:
  /shield/domains/{domain_id}/default-rule-overrides:
    post:
      tags:
        - Cloud Shield Policy Overrides
      summary: Create a policy override
      description: >-
        Project-scoped operation. Successful JSON and status-only responses vary
        by operation. The service does not declare a stable response schema for
        this operation; do not assume a collection envelope or undocumented
        fields.
      operationId: POST_shield_domains_domain_id_default_rule_overrides
      parameters:
        - name: domain_id
          in: path
          required: true
          schema:
            type: integer
            title: Domain Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - target_type
                - target_ids
                - enabled
              additionalProperties: false
              title: PolicyOverrideCreate
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  title: Name
                description:
                  title: Description
                  anyOf:
                    - type: string
                      maxLength: 1000
                    - type: 'null'
                target_type:
                  type: string
                  enum:
                    - detector
                    - rule
                  title: PolicyOverrideTargetType
                target_ids:
                  type: array
                  minItems: 1
                  title: Target Ids
                  items:
                    type: integer
                conditions:
                  type: array
                  maxItems: 5
                  title: Conditions
                  items:
                    type: object
                    additionalProperties: false
                    title: PolicyOverrideCondition
                    properties:
                      ip:
                        type: object
                        required:
                          - ip_address
                        title: IpCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          ip_address:
                            type: string
                            format: ipvanyaddress
                            title: Ip Address
                      ip_range:
                        type: object
                        required:
                          - lower_bound
                          - upper_bound
                        title: IpRangeCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          lower_bound:
                            type: string
                            format: ipvanyaddress
                            title: Lower Bound
                          upper_bound:
                            type: string
                            format: ipvanyaddress
                            title: Upper Bound
                      country:
                        type: object
                        required:
                          - country_code
                        title: CountryCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          country_code:
                            type: array
                            minItems: 1
                            maxItems: 100
                            example: CN
                            title: Country Code
                            items:
                              type: string
                      organization:
                        type: object
                        required:
                          - organization
                        title: OrganizationCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          organization:
                            type: string
                            maxLength: 100
                            example: UptimeRobot s.r.o
                            title: Organization
                      header:
                        type: object
                        required:
                          - header
                          - value
                        title: HeaderCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          header:
                            type: string
                            minLength: 1
                            maxLength: 50
                            example: Origin
                            title: Header
                          value:
                            type: string
                            maxLength: 100
                            title: Value
                          match_type:
                            type: string
                            enum:
                              - Exact
                              - Contains
                            default: Contains
                            title: Match Type
                      header_exists:
                        type: object
                        required:
                          - header
                        title: HeaderExistsCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          header:
                            type: string
                            minLength: 1
                            maxLength: 50
                            example: Origin
                            title: Header
                      user_agent:
                        type: object
                        required:
                          - user_agent
                        title: UserAgentCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          user_agent:
                            type: string
                            maxLength: 300
                            example: curl/
                            title: User Agent
                          match_type:
                            type: string
                            enum:
                              - Exact
                              - Contains
                            default: Contains
                            title: Match Type
                      url:
                        type: object
                        required:
                          - url
                        title: UrlCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          match_type:
                            type: string
                            enum:
                              - Exact
                              - Contains
                              - Regex
                            default: Contains
                            title: Match Type
                          url:
                            type: string
                            minLength: 1
                            maxLength: 500
                            example: /wp-admin/
                            title: Url
                      http_method:
                        type: object
                        required:
                          - http_method
                        title: HttpMethodCondition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          http_method:
                            type: string
                            enum:
                              - CONNECT
                              - DELETE
                              - GET
                              - HEAD
                              - OPTIONS
                              - PATCH
                              - POST
                              - PUT
                              - TRACE
                            title: HTTPMethod
                      ja3:
                        type: object
                        required:
                          - ja3_fingerprints
                        title: Ja3Condition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          ja3_fingerprints:
                            type: array
                            minItems: 1
                            maxItems: 10
                            title: Ja3 Fingerprints
                            items:
                              type: string
                              example: e7d705a3286e19ea42f587b344ee6865
                      ja4:
                        type: object
                        required:
                          - ja4_fingerprints
                        title: Ja4Condition
                        properties:
                          negation:
                            type: boolean
                            default: false
                            title: Negation
                          ja4_fingerprints:
                            type: array
                            minItems: 1
                            maxItems: 10
                            title: Ja4 Fingerprints
                            items:
                              type: string
                              example: t13d3113h2_e8f1e7e78f70_ce5650b735ce
                enabled:
                  type: boolean
                  title: Enabled
                request_id:
                  title: Request Id
                  anyOf:
                    - type: string
                    - type: 'null'
      responses:
        2XX:
          description: Successful response.
        default:
          description: >-
            Request rejected or service unavailable. See the error code and
            description; refresh before retrying a mutation whose result is
            uncertain.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        error_description:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Project API access key.
    apiSecret:
      type: apiKey
      in: header
      name: Aptranet-Secret
      description: Current secret for the access key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.