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

# Bulk update stopbar-to-lead-on links for an airport

> Apply multiple link and unlink operations in a single request. Supports multiple stopbars per lead-on.



## OpenAPI

````yaml https://raw.githubusercontent.com/stopbars/Core/refs/heads/main/data/openapi.json post /airports/{icao}/links/bulk
openapi: 3.0.4
info:
  title: BARS Core API
  version: 2.0.0
  description: API documentation for BARS Core
  contact:
    name: BARS Support
    email: support@stopbars.com
    url: https://stopbars.com/support
servers:
  - url: https://v2.stopbars.com
    description: Production
  - url: http://localhost:8787
    description: Local development (wrangler dev)
security: []
tags:
  - name: RealTime
    description: WebSocket connection and real-time state interaction endpoints.
  - name: State
    description: Endpoints for retrieving current system or airport lighting/network state.
  - name: Auth
    description: Authentication, account management, and API key lifecycle.
  - name: Airports
    description: Lookup and metadata endpoints for airports.
  - name: Divisions
    description: Division management, membership, and associated airport access.
  - name: Points
    description: Creation and management of lighting/navigation point data.
  - name: Generation
    description: Utilities for generating light support / BARS XML artifacts.
  - name: NOTAM
    description: Global NOTAM retrieval and (staff) updates.
  - name: Contributions
    description: Community lighting package submission, review, and leaderboard.
  - name: Staff
    description: >-
      Restricted staff-only operational and moderation endpoints (hidden from
      public docs).
  - name: CDN
    description: File storage, upload, listing, and deletion via CDN-backed storage.
  - name: FAQ
    description: Frequently Asked Questions (FAQ) management and retrieval.
  - name: EuroScope
    description: EuroScope sector file upload, listing, and permission checks by ICAO.
  - name: Cache
    description: Administrative cache management operations.
  - name: GitHub
    description: Repository contributor information.
  - name: System
    description: System health and OpenAPI specification discovery.
externalDocs:
  description: Find more info here
  url: https://docs.stopbars.com
paths:
  /airports/{icao}/links/bulk:
    post:
      tags:
        - Points
      summary: Bulk update stopbar-to-lead-on links for an airport
      description: >-
        Apply multiple link and unlink operations in a single request. Supports
        multiple stopbars per lead-on.
      parameters:
        - in: path
          name: icao
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                link:
                  type: array
                  description: Lead-on to stopbar links to add
                  items:
                    type: object
                    required:
                      - leadOnId
                      - stopbarId
                    properties:
                      leadOnId:
                        type: string
                        description: ID of the lead-on point
                      stopbarId:
                        type: string
                        description: ID of the stopbar to link to
                unlink:
                  type: array
                  description: Specific lead-on to stopbar links to remove
                  items:
                    type: object
                    required:
                      - leadOnId
                      - stopbarId
                    properties:
                      leadOnId:
                        type: string
                        description: ID of the lead-on point
                      stopbarId:
                        type: string
                        description: ID of the stopbar to unlink from
      responses:
        '200':
          description: Bulk update completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  linked:
                    type: integer
                  unlinked:
                    type: integer
        '400':
          description: Validation error
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Point not found
      security:
        - VatsimToken: []
        - ApiKeyAuth: []
components:
  securitySchemes:
    VatsimToken:
      type: apiKey
      in: header
      name: X-Vatsim-Token
      description: VATSIM authentication token obtained via OAuth callback.
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: User API key passed as Bearer token in Authorization header.

````