definitions:
  errs.Error:
    properties:
      message:
        type: string
      messageKey:
        type: string
      statusCode:
        type: integer
    type: object
  github_com_baseguard_control_internal_request.CreateDNSNameserver:
    properties:
      addresses:
        items:
          type: string
        type: array
      matchDomain:
        type: string
      name:
        type: string
      tagIds:
        items:
          type: string
        type: array
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_dns.NameserverType'
    type: object
  github_com_baseguard_control_internal_request.CreateDNSRecord:
    properties:
      domain:
        type: string
      tagIds:
        items:
          type: string
        type: array
      ttl:
        type: integer
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_dns.RecordType'
      value:
        type: string
    type: object
  github_com_baseguard_control_internal_request.CreateDNSSearchDomain:
    properties:
      domain:
        type: string
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_request.CreateNetworkACL:
    properties:
      dstRouteId:
        type: string
      dstTagIds:
        items:
          type: string
        type: array
      dstType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.DstType'
      name:
        type: string
      ports:
        items:
          $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.PortRange'
        type: array
      protocol:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.NetworkProtocol'
      srcTagIds:
        items:
          type: string
        type: array
      srcType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.SrcType'
    type: object
  github_com_baseguard_control_internal_request.CreateNodeAuthKey:
    properties:
      expiresInDays:
        description: 0 disables expiration
        type: integer
      name:
        type: string
      nodeAutoApprove:
        type: boolean
      nodeIsEphemeral:
        type: boolean
      nodeTagIds:
        items:
          type: string
        type: array
      reusable:
        type: boolean
    type: object
  github_com_baseguard_control_internal_request.CreateOrganizationUserInvite:
    properties:
      authority:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_authority.Organization'
      email:
        type: string
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_request.CreateRoute:
    properties:
      domains:
        items:
          type: string
        type: array
      name:
        type: string
      network:
        type: string
      routers:
        items:
          $ref: '#/definitions/github_com_baseguard_control_internal_types_route.Router'
        type: array
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_route.Type'
    type: object
  github_com_baseguard_control_internal_request.CreateTag:
    properties:
      name:
        type: string
    type: object
  github_com_baseguard_control_internal_request.UpdateDNSNameserver:
    properties:
      addresses:
        items:
          type: string
        type: array
      matchDomain:
        type: string
      name:
        type: string
      tagIds:
        items:
          type: string
        type: array
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_dns.NameserverType'
    type: object
  github_com_baseguard_control_internal_request.UpdateDNSRecord:
    properties:
      domain:
        type: string
      tagIds:
        items:
          type: string
        type: array
      ttl:
        type: integer
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_dns.RecordType'
      value:
        type: string
    type: object
  github_com_baseguard_control_internal_request.UpdateDNSSearchDomain:
    properties:
      domain:
        type: string
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_request.UpdateNetworkACL:
    properties:
      dstRouteId:
        type: string
      dstTagIds:
        items:
          type: string
        type: array
      dstType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.DstType'
      name:
        type: string
      ports:
        items:
          $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.PortRange'
        type: array
      protocol:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.NetworkProtocol'
      srcTagIds:
        items:
          type: string
        type: array
      srcType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.SrcType'
    type: object
  github_com_baseguard_control_internal_request.UpdateNode:
    properties:
      name:
        type: string
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_request.UpdateOrganizationUser:
    properties:
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_request.UpdateOrganizationUserAuthority:
    properties:
      authority:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_authority.Organization'
    type: object
  github_com_baseguard_control_internal_request.UpdateRoute:
    properties:
      domains:
        items:
          type: string
        type: array
      name:
        type: string
      network:
        type: string
      routers:
        items:
          $ref: '#/definitions/github_com_baseguard_control_internal_types_route.Router'
        type: array
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_route.Type'
    type: object
  github_com_baseguard_control_internal_response.AuditLog:
    properties:
      action:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_audit.Action'
      actorType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_audit.ActorType'
      apiKeyId:
        type: string
      createdAt:
        type: string
      id:
        type: string
      ipAddress:
        type: string
      nodeAuthKeyId:
        type: string
      requestBody:
        items:
          type: integer
        type: array
      resourceId:
        type: string
      resourceType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_audit.ResourceType'
      user:
        $ref: '#/definitions/github_com_baseguard_control_internal_response.User'
    type: object
  github_com_baseguard_control_internal_response.BasicOrganization:
    properties:
      id:
        type: string
      name:
        type: string
    type: object
  github_com_baseguard_control_internal_response.CreateNodeAuthKey:
    properties:
      id:
        type: string
      key:
        type: string
    type: object
  github_com_baseguard_control_internal_response.DNSNameserver:
    properties:
      addresses:
        items:
          type: string
        type: array
      id:
        type: string
      matchDomain:
        type: string
      name:
        type: string
      tagIds:
        items:
          type: string
        type: array
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_dns.NameserverType'
    type: object
  github_com_baseguard_control_internal_response.DNSRecord:
    properties:
      domain:
        type: string
      id:
        type: string
      tagIds:
        items:
          type: string
        type: array
      ttl:
        type: integer
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_dns.RecordType'
      value:
        type: string
    type: object
  github_com_baseguard_control_internal_response.DNSSearchDomain:
    properties:
      domain:
        type: string
      id:
        type: string
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_response.NetworkACL:
    properties:
      dstRouteId:
        type: string
      dstTagIds:
        items:
          type: string
        type: array
      dstType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.DstType'
      id:
        type: string
      name:
        type: string
      ports:
        items:
          $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.PortRange'
        type: array
      protocol:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.NetworkProtocol'
      srcTagIds:
        items:
          type: string
        type: array
      srcType:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_acl.SrcType'
    type: object
  github_com_baseguard_control_internal_response.Node:
    properties:
      approvedAt:
        type: string
      attributes:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_node.Attributes'
      authExpiresAt:
        type: string
      createdAt:
        type: string
      createdByUser:
        allOf:
        - $ref: '#/definitions/github_com_baseguard_control_internal_response.User'
        description: null when the node joined with an auth key
      id:
        type: string
      isConnected:
        type: boolean
      isEphemeral:
        type: boolean
      lastSeen:
        type: string
      name:
        type: string
      overlayIPv4:
        type: string
      overlayIPv6:
        type: string
      publicIP:
        type: string
      selectedRelayId:
        type: string
      tagIds:
        items:
          type: string
        type: array
      updatedAt:
        type: string
    type: object
  github_com_baseguard_control_internal_response.NodeAuthKey:
    properties:
      createdAt:
        type: string
      expiresAt:
        type: string
      id:
        type: string
      name:
        type: string
      nodeAutoApprove:
        type: boolean
      nodeIsEphemeral:
        type: boolean
      nodeTagIds:
        items:
          type: string
        type: array
      reusable:
        type: boolean
      revokedAt:
        type: string
    type: object
  github_com_baseguard_control_internal_response.OrganizationUser:
    properties:
      authority:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_authority.Organization'
      createdAt:
        type: string
      tagIds:
        items:
          type: string
        type: array
      user:
        $ref: '#/definitions/github_com_baseguard_control_internal_response.User'
    type: object
  github_com_baseguard_control_internal_response.OrganizationUserInvite:
    properties:
      authority:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_authority.Organization'
      createdAt:
        type: string
      email:
        type: string
      expiresAt:
        type: string
      id:
        type: string
      invitedByUser:
        allOf:
        - $ref: '#/definitions/github_com_baseguard_control_internal_response.User'
        description: the user who sent the invite
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_response.OrganizationUserInviteDetail:
    properties:
      authority:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_authority.Organization'
      createdAt:
        type: string
      email:
        type: string
      expiresAt:
        type: string
      id:
        type: string
      invitedByUser:
        allOf:
        - $ref: '#/definitions/github_com_baseguard_control_internal_response.User'
        description: the user who sent the invite
      organization:
        $ref: '#/definitions/github_com_baseguard_control_internal_response.BasicOrganization'
      tagIds:
        items:
          type: string
        type: array
    type: object
  github_com_baseguard_control_internal_response.Release:
    properties:
      channel:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_release.Channel'
      createdAt:
        type: string
      severity:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_release.Severity'
      version:
        type: string
    type: object
  github_com_baseguard_control_internal_response.Route:
    properties:
      domains:
        items:
          type: string
        type: array
      id:
        type: string
      name:
        type: string
      network:
        type: string
      routers:
        items:
          $ref: '#/definitions/github_com_baseguard_control_internal_types_route.Router'
        type: array
      type:
        $ref: '#/definitions/github_com_baseguard_control_internal_types_route.Type'
    type: object
  github_com_baseguard_control_internal_response.Tag:
    properties:
      id:
        type: string
      name:
        type: string
    type: object
  github_com_baseguard_control_internal_response.TagUsageDetail:
    properties:
      isDNSNameserverInUse:
        type: boolean
      isDNSRecordInUse:
        type: boolean
      isDNSSearchDomainInUse:
        type: boolean
      isInUse:
        type: boolean
      isNetworkACLInUse:
        type: boolean
      isNodeAuthKeyInUse:
        type: boolean
      isNodeInUse:
        type: boolean
      isOrganizationUserInUse:
        type: boolean
      isOrganizationUserInviteInUse:
        type: boolean
      isRouteInUse:
        type: boolean
    type: object
  github_com_baseguard_control_internal_response.User:
    properties:
      email:
        type: string
      firstName:
        type: string
      id:
        type: string
      lastName:
        type: string
    type: object
  github_com_baseguard_control_internal_types_acl.DstType:
    enum:
    - TAG
    - ROUTE
    type: string
    x-enum-varnames:
    - DstTypeTag
    - DstTypeRoute
  github_com_baseguard_control_internal_types_acl.NetworkProtocol:
    enum:
    - TCP
    - UDP
    - ICMP
    - ALL
    type: string
    x-enum-varnames:
    - TCPProtocol
    - UDPProtocol
    - ICMPProtocol
    - ALLProtocol
  github_com_baseguard_control_internal_types_acl.PortRange:
    properties:
      end:
        type: integer
      start:
        type: integer
    type: object
  github_com_baseguard_control_internal_types_acl.SrcType:
    enum:
    - TAG
    type: string
    x-enum-varnames:
    - SrcTypeTag
  github_com_baseguard_control_internal_types_audit.Action:
    enum:
    - ACL.NETWORK.CREATE
    - ACL.NETWORK.UPDATE
    - ACL.NETWORK.DELETE
    - DNS.NAMESERVER.CREATE
    - DNS.NAMESERVER.UPDATE
    - DNS.NAMESERVER.DELETE
    - DNS.RECORD.CREATE
    - DNS.RECORD.UPDATE
    - DNS.RECORD.DELETE
    - DNS.SEARCH_DOMAIN.CREATE
    - DNS.SEARCH_DOMAIN.UPDATE
    - DNS.SEARCH_DOMAIN.DELETE
    - API_KEY.CREATE
    - API_KEY.REVOKE
    - NODE.UPDATE
    - NODE.DELETE
    - NODE.APPROVE
    - NODE.DISABLE_KEY_EXPIRY
    - NODE.VERSION_UPDATE
    - NODE.AUTH_VERIFY
    - NODE.AUTH_VERIFY_BY_KEY
    - NODE_AUTH_KEY.CREATE
    - NODE_AUTH_KEY.REVOKE
    - ORGANIZATION.CREATE
    - ORGANIZATION.UPDATE_SETTINGS
    - ORGANIZATION_USER.UPDATE
    - ORGANIZATION_USER.UPDATE_AUTHORITY
    - ORGANIZATION_USER.DELETE
    - ORGANIZATION_USER_INVITE.CREATE
    - ORGANIZATION_USER_INVITE.RESEND
    - ORGANIZATION_USER_INVITE.ACCEPT
    - ORGANIZATION_USER_INVITE.DELETE
    - ROUTE.CREATE
    - ROUTE.UPDATE
    - ROUTE.DELETE
    - TAG.CREATE
    - TAG.DELETE
    type: string
    x-enum-varnames:
    - ActionCreateNetworkACL
    - ActionUpdateNetworkACL
    - ActionDeleteNetworkACL
    - ActionCreateDNSNameserver
    - ActionUpdateDNSNameserver
    - ActionDeleteDNSNameserver
    - ActionCreateDNSRecord
    - ActionUpdateDNSRecord
    - ActionDeleteDNSRecord
    - ActionCreateDNSSearchDomain
    - ActionUpdateDNSSearchDomain
    - ActionDeleteDNSSearchDomain
    - ActionCreateServiceAccountAPIKey
    - ActionRevokeServiceAccountAPIKey
    - ActionUpdateNode
    - ActionDeleteNode
    - ActionApproveNode
    - ActionDisableKeyExpiry
    - ActionNodeVersionUpdate
    - ActionVerifyNodeAuth
    - ActionVerifyNodeAuthByAuthKey
    - ActionCreateNodeAuthKey
    - ActionRevokeNodeAuthKey
    - ActionCreateOrganization
    - ActionUpdateOrganizationSettings
    - ActionUpdateOrganizationUser
    - ActionUpdateOrganizationUserAuthority
    - ActionDeleteOrganizationUser
    - ActionCreateOrganizationUserInvite
    - ActionResendOrganizationUserInvite
    - ActionAcceptOrganizationUserInvite
    - ActionDeleteOrganizationUserInvite
    - ActionCreateRoute
    - ActionUpdateRoute
    - ActionDeleteRoute
    - ActionCreateTag
    - ActionDeleteTag
  github_com_baseguard_control_internal_types_audit.ActorType:
    enum:
    - USER
    - API_KEY
    - NODE_AUTH_KEY
    type: string
    x-enum-varnames:
    - ActorTypeUser
    - ActorTypeAPIKey
    - ActorTypeNodeAuthKey
  github_com_baseguard_control_internal_types_audit.ResourceType:
    enum:
    - ACL
    - DNS
    - API_KEY
    - NODE
    - NODE_AUTH_KEY
    - ORGANIZATION
    - ORGANIZATION_USER
    - ORGANIZATION_INVITE
    - ROUTE
    - TAG
    - USER
    type: string
    x-enum-varnames:
    - ResourceTypeACL
    - ResourceTypeDNS
    - ResourceTypeAPIKey
    - ResourceTypeNode
    - ResourceTypeNodeAuthKey
    - ResourceTypeOrganization
    - ResourceTypeOrganizationUser
    - ResourceTypeOrganizationInvite
    - ResourceTypeRoute
    - ResourceTypeTag
    - ResourceTypeUser
  github_com_baseguard_control_internal_types_authority.Organization:
    enum:
    - OWNER
    - ADMIN
    - AUDITOR
    - MEMBER
    type: string
    x-enum-varnames:
    - OrganizationOwner
    - OrganizationAdmin
    - OrganizationAuditor
    - OrganizationMember
  github_com_baseguard_control_internal_types_dns.NameserverType:
    enum:
    - Do53
    type: string
    x-enum-varnames:
    - NameserverTypeDo53
  github_com_baseguard_control_internal_types_dns.RecordType:
    enum:
    - A
    - AAAA
    type: string
    x-enum-varnames:
    - RecordTypeA
    - RecordTypeAAAA
  github_com_baseguard_control_internal_types_node.Attributes:
    properties:
      acceptRoutes:
        type: boolean
      advertiseRoutes:
        type: boolean
      clientVersion:
        type: string
      dnsEnabled:
        type: boolean
      exitRouteId:
        type: string
      hostname:
        type: string
      os:
        type: string
      osArch:
        type: string
      osKernelVersion:
        type: string
      osPlatform:
        type: string
      osPlatformVersion:
        type: string
    type: object
  github_com_baseguard_control_internal_types_release.Channel:
    enum:
    - STABLE
    - INTERNAL
    - BETA
    type: string
    x-enum-varnames:
    - StableChannel
    - InternalChannel
    - BetaChannel
  github_com_baseguard_control_internal_types_release.Severity:
    enum:
    - NORMAL
    - SECURITY
    - CRITICAL
    type: string
    x-enum-varnames:
    - NormalSeverity
    - SecuritySeverity
    - CriticalSeverity
  github_com_baseguard_control_internal_types_route.Router:
    properties:
      masquerade:
        type: boolean
      priority:
        type: integer
      tagId:
        type: string
    type: object
  github_com_baseguard_control_internal_types_route.Type:
    enum:
    - SUBNET
    - DOMAIN
    - EXIT
    type: string
    x-enum-varnames:
    - TypeSubnet
    - TypeDomain
    - TypeExit
info:
  contact: {}
  description: Documentation for Baseguard
  title: Baseguard
  version: v1
paths:
  /v1/acl/network:
    get:
      consumes:
      - application/json
      description: Returns a list of all network ACL rules defined in the specified
        organization. ACL rules control traffic between tagged node groups. [OWNER,
        ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.NetworkACL'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get network ACLs
      tags:
      - acl
    post:
      consumes:
      - application/json
      description: Creates a new network ACL rule in the specified organization. ACL
        rules define allowed traffic between source and destination tag groups with
        protocol and port specifications. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create network ACL request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateNetworkACL'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.NetworkACL'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create network ACL
      tags:
      - acl
  /v1/acl/network/{id}:
    delete:
      consumes:
      - application/json
      description: Deletes the specified network ACL rule from the organization. [OWNER,
        ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: ACL Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete network ACL
      tags:
      - acl
    put:
      consumes:
      - application/json
      description: Updates the specified network ACL rule. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: ACL Id
        in: path
        name: id
        required: true
        type: string
      - description: Update network ACL request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateNetworkACL'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.NetworkACL'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update network ACL
      tags:
      - acl
  /v1/audit-log:
    get:
      consumes:
      - application/json
      description: Returns a list of audit log entries for the specified organization
        within the given date range. Default range is the last 24 hours. [OWNER, ADMIN,
        AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Start date (YYYY-MM-DD format)
        in: query
        name: startDate
        type: string
      - description: End date (YYYY-MM-DD format)
        in: query
        name: endDate
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.AuditLog'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get audit logs
      tags:
      - audit-log
  /v1/dns/nameserver:
    get:
      consumes:
      - application/json
      description: Returns the organization's upstream resolvers. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSNameserver'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get DNS nameservers
      tags:
      - dns
    post:
      consumes:
      - application/json
      description: Creates a new upstream resolver. Without a match domain it overrides
        the nodes' system resolvers; with a match domain it only serves that suffix
        (split DNS). [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create nameserver request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateDNSNameserver'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSNameserver'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create DNS nameserver
      tags:
      - dns
  /v1/dns/nameserver/{id}:
    delete:
      consumes:
      - application/json
      description: Removes the specified nameserver. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: DNS Nameserver Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete DNS nameserver
      tags:
      - dns
    put:
      consumes:
      - application/json
      description: Updates the specified nameserver. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: DNS Nameserver Id
        in: path
        name: id
        required: true
        type: string
      - description: Update nameserver request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateDNSNameserver'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSNameserver'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update DNS nameserver
      tags:
      - dns
  /v1/dns/record:
    get:
      consumes:
      - application/json
      description: Returns the organization's custom records answered authoritatively
        by node DNS servers. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSRecord'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get DNS records
      tags:
      - dns
    post:
      consumes:
      - application/json
      description: 'Creates a new custom record answered authoritatively by node DNS
        servers. Supported types: A, AAAA. [OWNER, ADMIN]'
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create record request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateDNSRecord'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSRecord'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create DNS record
      tags:
      - dns
  /v1/dns/record/{id}:
    delete:
      consumes:
      - application/json
      description: Removes the specified custom record. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: DNS Record Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete DNS record
      tags:
      - dns
    put:
      consumes:
      - application/json
      description: 'Updates the specified custom record. Supported types: A, AAAA.
        [OWNER, ADMIN]'
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: DNS Record Id
        in: path
        name: id
        required: true
        type: string
      - description: Update record request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateDNSRecord'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSRecord'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update DNS record
      tags:
      - dns
  /v1/dns/search-domain:
    get:
      consumes:
      - application/json
      description: Returns the organization's search domains. The first entry is the
        organization's own domain (id "organization-domain"); it is implicit and cannot
        be modified. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSSearchDomain'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get DNS search domains
      tags:
      - dns
    post:
      consumes:
      - application/json
      description: Creates a new search domain used by nodes to expand short names.
        [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create search domain request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateDNSSearchDomain'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSSearchDomain'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create DNS search domain
      tags:
      - dns
  /v1/dns/search-domain/{id}:
    delete:
      consumes:
      - application/json
      description: Removes the specified search domain. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: DNS Search Domain Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete DNS search domain
      tags:
      - dns
    put:
      consumes:
      - application/json
      description: Updates the specified search domain. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: DNS Search Domain Id
        in: path
        name: id
        required: true
        type: string
      - description: Update search domain request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateDNSSearchDomain'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.DNSSearchDomain'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update DNS search domain
      tags:
      - dns
  /v1/node:
    get:
      consumes:
      - application/json
      description: Returns a list of all nodes (VPN clients/devices) registered in
        the specified organization. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.Node'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get nodes
      tags:
      - node
  /v1/node-auth-key:
    get:
      consumes:
      - application/json
      description: Returns a list of all node authentication keys in the specified
        organization. Auth keys are used for automated node enrollment without user
        interaction. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.NodeAuthKey'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get node auth keys
      tags:
      - node-auth-key
    post:
      consumes:
      - application/json
      description: Creates a new node authentication key for the organization. Auth
        keys allow automated node enrollment without user verification. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create node auth key request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateNodeAuthKey'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.CreateNodeAuthKey'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create node auth key
      tags:
      - node-auth-key
  /v1/node-auth-key/{id}:
    delete:
      consumes:
      - application/json
      description: Revokes the specified node authentication key. Nodes will no longer
        be able to authenticate using this key. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Node auth key Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Revoke node auth key
      tags:
      - node-auth-key
  /v1/node/{id}:
    delete:
      consumes:
      - application/json
      description: Removes the specified node from the organization. The node will
        no longer be able to connect to the mesh network. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Node Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete node
      tags:
      - node
    put:
      consumes:
      - application/json
      description: Updates the specified node's information such as name and tags.
        [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Node Id
        in: path
        name: id
        required: true
        type: string
      - description: Update node request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateNode'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update node
      tags:
      - node
  /v1/node/{id}/approve:
    post:
      consumes:
      - application/json
      description: Approves a pending node, allowing it to connect to the mesh network.
        [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Node Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Approve node
      tags:
      - node
  /v1/node/{id}/disable-key-expiry:
    post:
      consumes:
      - application/json
      description: Disables the key expiration for the specified node, allowing it
        to remain connected indefinitely without re-authentication. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Node Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Disable key expiry
      tags:
      - node
  /v1/node/{id}/version-update:
    post:
      description: Pushes an update event to the named node. The node must be currently
        connected. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Node Id
        in: path
        name: id
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Node version update
      tags:
      - node
  /v1/organization-user:
    get:
      consumes:
      - application/json
      description: Returns a list of all users that are members of the specified organization.
        [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.OrganizationUser'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get organization users
      tags:
      - organization-user
  /v1/organization-user-invite:
    get:
      consumes:
      - application/json
      description: Returns a list of all pending user invitations for the specified
        organization. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.OrganizationUserInvite'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get organization user invites
      tags:
      - organization-user-invite
    post:
      consumes:
      - application/json
      description: Creates a new invitation to add a user to the organization. An
        email will be sent to the invited user. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create organization user invite request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateOrganizationUserInvite'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create organization user invite
      tags:
      - organization-user-invite
  /v1/organization-user-invite/{id}:
    delete:
      consumes:
      - application/json
      description: Deletes a pending user invitation. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Invite Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete organization user invite
      tags:
      - organization-user-invite
    get:
      consumes:
      - application/json
      description: Returns the details of a specific user invitation. Used by invited
        users to view invitation details before accepting
      parameters:
      - description: Invite Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.OrganizationUserInviteDetail'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get organization user invite detail
      tags:
      - organization-user-invite
  /v1/organization-user-invite/{id}/accept:
    post:
      consumes:
      - application/json
      description: Accepts a pending invitation and adds the authenticated user to
        the organization
      parameters:
      - description: Invite Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Accept organization user invite
      tags:
      - organization-user-invite
  /v1/organization-user-invite/{id}/resend-email:
    post:
      consumes:
      - application/json
      description: Resends the invitation email to the invited user. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Invite Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Resend organization user invite email
      tags:
      - organization-user-invite
  /v1/organization-user/{id}:
    delete:
      consumes:
      - application/json
      description: Removes the specified user from the organization. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: User Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete organization user
      tags:
      - organization-user
    put:
      consumes:
      - application/json
      description: Updates the specified user's information within the organization.
        [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: User Id
        in: path
        name: id
        required: true
        type: string
      - description: Update organization user request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateOrganizationUser'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update organization user
      tags:
      - organization-user
  /v1/organization-user/{id}/authority:
    put:
      consumes:
      - application/json
      description: Updates the authority (role) of the specified user within the organization.
        [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: User Id
        in: path
        name: id
        required: true
        type: string
      - description: Update organization user authority request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateOrganizationUserAuthority'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update organization user authority
      tags:
      - organization-user
  /v1/release/latest:
    get:
      description: Returns the latest published release for the given channel. [PUBLIC]
      parameters:
      - description: Release channel (STABLE, BETA)
        in: query
        name: channel
        required: true
        type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.Release'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "404":
          description: Not Found
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get latest release
      tags:
      - release
  /v1/route:
    get:
      consumes:
      - application/json
      description: Returns a list of all network routes defined in the specified organization.
        Routes advertise subnets, domains, or the internet (exit routes) through tagged
        router nodes. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.Route'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get network routes
      tags:
      - route
    post:
      consumes:
      - application/json
      description: Creates a new network route in the specified organization. Subnet
        routes carry a CIDR, domain routes carry a domain list, and exit routes send
        all other traffic through their routers. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create network route request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateRoute'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.Route'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create network route
      tags:
      - route
  /v1/route/{id}:
    delete:
      consumes:
      - application/json
      description: Deletes the specified network route from the organization. [OWNER,
        ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Route Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete network route
      tags:
      - route
    put:
      consumes:
      - application/json
      description: Updates the specified network route. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Route Id
        in: path
        name: id
        required: true
        type: string
      - description: Update network route request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.UpdateRoute'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.Route'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Update network route
      tags:
      - route
  /v1/tag:
    get:
      consumes:
      - application/json
      description: Returns a list of all tags defined in the specified organization.
        Tags are used to group nodes for ACL rules. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/github_com_baseguard_control_internal_response.Tag'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get tags
      tags:
      - tag
    post:
      consumes:
      - application/json
      description: Creates a new tag in the specified organization. Tags are used
        to group nodes for network ACL rules. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Create tag request
        in: body
        name: request
        required: true
        schema:
          $ref: '#/definitions/github_com_baseguard_control_internal_request.CreateTag'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.Tag'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "422":
          description: Unprocessable Entity
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Create tag
      tags:
      - tag
  /v1/tag/{id}:
    delete:
      consumes:
      - application/json
      description: Deletes the specified tag from the organization. The tag must not
        be in use by any ACL rules. [OWNER, ADMIN]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Tag Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            type: string
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Delete tag
      tags:
      - tag
  /v1/tag/{id}/usage:
    get:
      consumes:
      - application/json
      description: Returns detailed usage information for a specific tag, including
        which nodes and ACL rules reference it. [OWNER, ADMIN, AUDITOR]
      parameters:
      - description: Organization Id
        in: header
        name: x-bg-organization-id
        required: true
        type: string
      - description: Tag Id
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/github_com_baseguard_control_internal_response.TagUsageDetail'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/errs.Error'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/errs.Error'
        "403":
          description: Forbidden
          schema:
            $ref: '#/definitions/errs.Error'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/errs.Error'
      summary: Get tag usage detail
      tags:
      - tag
swagger: "2.0"
