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

# Actualizar alerta (geo constant)

> Actualiza ubicación/estado de una alerta. Requiere Bearer + x-client-id.



## OpenAPI

````yaml openapi/external-v1.yaml put /alert/{id}
openapi: 3.1.0
info:
  title: Goil Public API (External)
  description: >
    API pública para integraciones externas. Permite autenticación, gestión de
    cuentas

    y envío de notificaciones y alertas.


    **Autenticación**: La mayoría de endpoints requieren el header `x-client-id`
    (businessId).

    Tras llamar a `POST /authentication/login` obtendrás un `accessToken` para
    usar en

    endpoints que requieran Bearer token (p. ej. alertas).
  version: 1.0.0
  contact:
    name: Goil API Support
servers:
  - url: https://community.goil.app/api/v1/external
    description: Production
security: []
tags:
  - name: Authentication
    description: Login para integraciones externas
  - name: Account
    description: Crear, consultar, listar, actualizar y eliminar cuentas
  - name: Notification
    description: Envío de notificaciones push/SMS
  - name: Alert
    description: Creación y actualización de alertas geolocalizadas
paths:
  /alert/{id}:
    put:
      tags:
        - Alert
      summary: Actualizar alerta (geo constant)
      description: Actualiza ubicación/estado de una alerta. Requiere Bearer + x-client-id.
      parameters:
        - $ref: '#/components/parameters/AlertIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertGeoConstantUpdateRequest'
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid arguments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
        - ApiKeyClient: []
components:
  parameters:
    AlertIdPath:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: ID de la alerta
  schemas:
    AlertGeoConstantUpdateRequest:
      type: object
      required:
        - accountId
        - accountTypeId
        - location
      properties:
        accountId:
          type: string
        accountTypeId:
          type: string
        location:
          $ref: '#/components/schemas/Location'
        closed:
          type: number
    ErrorResponse:
      type: object
      properties:
        timestamp:
          type: integer
          format: int64
        error:
          type: string
        data:
          type: object
          nullable: true
    Location:
      type: object
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
        longitude:
          type: number
        accuracy:
          type: number
          default: 0
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token obtenido de POST /authentication/login (para alertas)
    ApiKeyClient:
      type: apiKey
      in: header
      name: x-client-id
      description: Business ID del cliente (obligatorio en casi todos los endpoints)

````