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

# Update a BGP Policy

> Updates the properties of an existing BGP policy, including its name, status, selected IP lists, and site attachments.



## OpenAPI

````yaml /api/en/utm-ips.yaml put /content/bgp/policy/{policyId}
openapi: 3.0.3
info:
  title: Altostrat UTM & IPS API
  version: 1.0.0
  description: >-
    Manage DNS filtering, BGP threat mitigation, content categories, and site
    policy attachment through the public `/content` gateway path.
servers:
  - url: https://v1.api.altostrat.io
security:
  - bearerAuth: []
tags:
  - name: DNS Content Filtering
    description: Manage DNS-based content filtering policies and their components.
  - name: BGP Threat Intelligence
    description: Manage BGP-based IP reputation policies and threat feeds.
  - name: Site Security Configuration
    description: View and manage security policy attachments for specific sites.
paths:
  /content/bgp/policy/{policyId}:
    put:
      tags:
        - BGP Threat Intelligence
      summary: Update a BGP Policy
      description: >-
        Updates the properties of an existing BGP policy, including its name,
        status, selected IP lists, and site attachments.
      operationId: updateBgpPolicy
      parameters:
        - name: policyId
          in: path
          required: true
          description: The unique identifier of the BGP policy to update.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BgpPolicyUpdate'
      responses:
        '200':
          description: The BGP policy was updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BgpPolicy'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    BgpPolicyUpdate:
      allOf:
        - $ref: '#/components/schemas/BgpPolicyCreate'
        - type: object
          properties:
            sites:
              type: array
              description: >-
                A list of site IDs to which this policy should be attached. Any
                sites not in this list will be detached.
              items:
                type: string
                format: uuid
              example:
                - 9a9d3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8d
    BgpPolicy:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          example: 9b1d3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8b
        name:
          type: string
          example: Block Known Threats
        enabled:
          type: boolean
          example: true
        default:
          type: boolean
          readOnly: true
          description: True if this is the default policy for the account.
          example: false
        lists:
          type: array
          description: A list of BGP IP reputation list IDs included in this policy.
          items:
            type: string
            format: uuid
          example:
            - 9b1e3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8c
        site_count:
          type: integer
          readOnly: true
          description: The number of sites currently using this policy.
          example: 3
        updated_at:
          type: string
          format: date-time
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
    BgpPolicyCreate:
      type: object
      required:
        - name
        - enabled
        - lists
      properties:
        name:
          type: string
          description: A human-readable name for the policy.
          example: High-Risk Geo-IP Block
        enabled:
          type: boolean
          description: Whether the policy is active.
          example: true
        lists:
          type: array
          description: A list of BGP IP reputation list IDs to include in this policy.
          items:
            type: string
            format: uuid
          example:
            - 9b1e3e6a-5c3a-4f1e-9a0a-2b2a1e1d8e8c
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_invalid
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The 'name' parameter cannot be empty.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_invalid
  responses:
    BadRequest:
      description: Bad Request - The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden - You do not have permission to perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found - The requested resource could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````