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

# Changes the status of several alerts at once.

> Sets `StatusId` - 1 New, 2 Dismissed or 3 Ticketed - on every alert in `AlertIds`, up to
100. Ticketed links every alert to the one ticket in `TicketId`, as the app does when a ticket is
created from several alerts. Each alert's whole stack changes with it, and the same changes are
refused with 409 as for a single alert.
Every id must be an alert of this account: if any is not, the request is a 400 naming them and
nothing is changed; nor is anything changed when any alert is refused. An alert that already has
the status is left alone and is not listed in `UpdatedIds`, so a retried request is safe.
`UpdatedIds` lists the alerts named first, in the order given, then the rest of their stacks.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/alerts
openapi: 3.0.4
info:
  title: Public API
  description: Gorelo Public API documentation.
  version: 1.0.0
servers:
  - url: https://api.usw.gorelo.io
    description: US
  - url: https://api.aue.gorelo.io
    description: Australia
security:
  - ApiKeyAuth: []
tags:
  - name: Attachments
    description: "Uploading a file, for anything that can carry one. One endpoint rather than one per record\r\ntype, because the upload itself is identical - only the record it is checked against differs."
  - name: Alerts
    description: Alerts management operations
  - name: Assets
    description: Assets management operations
  - name: Billing
    description: Billing management operations
  - name: Tickets
    description: Tickets management operations
  - name: Clients
    description: Clients management operations
  - name: Contacts
    description: Contacts management operations
  - name: Deletions
    description: Deletions management operations
  - name: Documents
    description: Documents management operations
  - name: Forms
    description: Forms management operations
  - name: Organization
    description: Organization management operations
  - name: Projects
    description: Projects management operations
paths:
  /v1/alerts:
    patch:
      tags:
        - Alerts
      summary: Changes the status of several alerts at once.
      description: "Sets `StatusId` - 1 New, 2 Dismissed or 3 Ticketed - on every alert in `AlertIds`, up to\r\n100. Ticketed links every alert to the one ticket in `TicketId`, as the app does when a ticket is\r\ncreated from several alerts. Each alert's whole stack changes with it, and the same changes are\r\nrefused with 409 as for a single alert.\r\nEvery id must be an alert of this account: if any is not, the request is a 400 naming them and\r\nnothing is changed; nor is anything changed when any alert is refused. An alert that already has\r\nthe status is left alone and is not listed in `UpdatedIds`, so a retried request is safe.\r\n`UpdatedIds` lists the alerts named first, in the order given, then the rest of their stacks."
      operationId: patch_v1_alerts
      requestBody:
        description: The alerts and the status to set.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/UpdateAlertStatusesCommand'
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlertStatusesCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateAlertStatusesCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateAlertStatusesCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/UpdateAlertStatusesResultBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateAlertStatusesResultBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/UpdateAlertStatusesResultBaseResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '409':
          description: Conflict
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
components:
  schemas:
    UpdateAlertStatusesCommand:
      type: object
      properties:
        AlertIds:
          type: array
          items:
            type: string
            format: uuid
          description: "The alerts to change, ids from `GET /v1/alerts`. At least one, at most 100; a repeated id\r\ncounts once. Every id must be an alert of this account, or nothing is changed."
          nullable: true
        StatusId:
          type: integer
          description: "The status to set on every alert: 1 New, 2 Dismissed or 3 Ticketed. Required. Ticketed links\r\nevery alert to the ticket in `TicketId`, as the app does when one ticket is created from\r\nseveral alerts. Each alert's whole stack changes with it, and the same moves are refused, as\r\nfor a single alert; one refused alert changes nothing."
          format: int32
          nullable: true
          example: 2
        TicketId:
          type: string
          description: "The ticket to link every alert to, an id from `GET /v1/tickets`. Required with\r\n`StatusId` 3 and accepted with nothing else."
          format: uuid
          nullable: true
      additionalProperties: false
      description: Request body for changing the status of several alerts at once.
    UpdateAlertStatusesResultBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          $ref: '#/components/schemas/UpdateAlertStatusesResult'
        DataContext:
          type: object
          additionalProperties: false
          nullable: true
          example: null
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    ObjectBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          nullable: true
        DataContext:
          $ref: '#/components/schemas/ErrorDataContext'
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    HttpStatusCode:
      enum:
        - 100
        - 101
        - 102
        - 103
        - 200
        - 201
        - 202
        - 203
        - 204
        - 205
        - 206
        - 207
        - 208
        - 226
        - 300
        - 301
        - 302
        - 303
        - 304
        - 305
        - 306
        - 307
        - 308
        - 400
        - 401
        - 402
        - 403
        - 404
        - 405
        - 406
        - 407
        - 408
        - 409
        - 410
        - 411
        - 412
        - 413
        - 414
        - 415
        - 416
        - 417
        - 421
        - 422
        - 423
        - 424
        - 426
        - 428
        - 429
        - 431
        - 451
        - 500
        - 501
        - 502
        - 503
        - 504
        - 505
        - 506
        - 507
        - 508
        - 510
        - 511
      type: integer
      format: int32
    UpdateAlertStatusesResult:
      type: object
      properties:
        UpdatedIds:
          type: array
          items:
            type: string
            format: uuid
          description: "The alerts whose status changed: the ones named, in the order given, then the rest of their\r\nstacks. An alert that already had the status is not listed: nothing was written for it."
      additionalProperties: false
      description: What a bulk status change reached.
    Error:
      type: object
      properties:
        Code:
          pattern: ^[0-9]{6}$
          type: string
          description: 6-digit MMTTNN error code. See the Public API error-code registry.
          example: '070101'
        Message:
          type: string
        PropertyName:
          type: string
          nullable: true
        ActionHint:
          type: string
          nullable: true
        DocUrl:
          type: string
          nullable: true
      additionalProperties: false
    ErrorDataContext:
      type: object
      properties:
        TraceId:
          type: string
          description: Request correlation id. Quote this when reporting a problem.
          nullable: true
      additionalProperties: false
      description: "The `DataContext` of an error response: carries the correlation id for the failed\r\nrequest."
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Your Gorelo API key. See [Generate API key](/generate-api-key). If your
        data is hosted in Australia, click the base URL at the top of this page
        and select `https://api.aue.gorelo.io`.
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.