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

# Change BGP announces

> Enable or disable BGP announces for a client.



## OpenAPI

````yaml /api-reference/services_documented/ddos_protection_api.yaml post /security/sifter/v2/protected_addresses/announces
openapi: 3.1.0
info:
  title: Gcore OpenAPI – DDoS Protection API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-07T20:33:46.548242+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Event Logs
    x-displayName: Event Logs
  - name: BGP announces
    x-displayName: BGP announces
  - name: Protected Networks
    x-displayName: Protected Networks
  - name: Protection Profiles
    x-displayName: Protection Profiles
  - name: Protection Templates
    x-displayName: Protection Templates
  - name: Security Templates
    x-displayName: Security Templates
  - name: Profiles
    x-displayName: Profiles
paths:
  /security/sifter/v2/protected_addresses/announces:
    post:
      tags:
        - BGP announces
      summary: Change BGP announces
      description: Enable or disable BGP announces for a client.
      operationId: change_announces_api_v2_protected_addresses_announces_post
      parameters:
        - name: client_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 1000000000
                minimum: 1
              - type: 'null'
            description: A positive integer ID
            title: Client Id
          description: A positive integer ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnounceIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                title: >-
                  Response Change Announces Api V2 Protected Addresses Announces
                  Post
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Request'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Request'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.security.bgp_announces.toggle(
                announce="192.9.9.1/32",
                enabled=True,
            )
            print(response)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/option\"\n\t\"github.com/G-Core/gcore-go/security\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Security.BgpAnnounces.Toggle(context.TODO(), security.BgpAnnounceToggleParams{\n\t\tAnnounce: \"192.9.9.1/32\",\n\t\tEnabled:  true,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n"
components:
  schemas:
    AnnounceIn:
      properties:
        announce:
          type: string
          format: ipvanynetwork
          title: Announce
          description: IP network to announce
          example: 192.9.9.1/32
          examples:
            - 192.9.9.1/32
        enabled:
          type: boolean
          title: Enabled
          description: Whether the announcement is enabled
          example: true
          examples:
            - true
      type: object
      required:
        - announce
        - enabled
      title: AnnounceIn
      example:
        announce: 192.9.9.1/32
        enabled: true
    Request:
      properties: {}
      type: object
      title: Request
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/security_iaas_ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    security_iaas_ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````