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

# Update an event

> Change information in existing events specified by `event_id` or *flag suspicious events*.

When an event is created, it can be assigned `linked_id` and `tags` submitted through the JS agent parameters. 
This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact.

**Warning** It's not possible to update events older than one month. 

**Warning** Trying to update an event immediately after creation may temporarily result in an 
error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request.




## OpenAPI

````yaml patch /events/{event_id}
openapi: 3.1.1
info:
  title: Server API
  description: >
    Fingerprint Server API allows you to get, search, and update Events in a
    server environment. It can be used for data exports, decision-making, and
    data analysis scenarios.

    Server API is intended for server-side usage, it's not intended to be used
    from the client side, whether it's a browser or a mobile device.

    The API also supports collection of Automation Intelligence for requests to
    your server in edge, pre-origin, or middleware contexts.
  version: '4'
  contact:
    name: Fingerprint Support
    email: support@fingerprint.com
  license:
    name: MIT
    url: >-
      https://github.com/fingerprintjs/fingerprint-pro-server-api-openapi/blob/main/LICENSE
servers:
  - url: https://api.fpjs.io/v4
    description: Global
  - url: https://eu.api.fpjs.io/v4
    description: EU
  - url: https://ap.api.fpjs.io/v4
    description: Asia (Mumbai)
security:
  - bearerAuth: []
tags:
  - name: Event
    description: |
      Get, update, or search for information about events.
paths:
  /events/{event_id}:
    patch:
      tags:
        - Events
      summary: Update an event
      description: >
        Change information in existing events specified by `event_id` or *flag
        suspicious events*.


        When an event is created, it can be assigned `linked_id` and `tags`
        submitted through the JS agent parameters. 

        This information might not have been available on the client initially,
        so the Server API permits updating these attributes after the fact.


        **Warning** It's not possible to update events older than one month. 


        **Warning** Trying to update an event immediately after creation may
        temporarily result in an 

        error (HTTP 409 Conflict. The event is not mutable yet.) as the event is
        fully propagated across our systems. In such a case, simply retry the
        request.
      operationId: updateEvent
      parameters:
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            examples:
              - 1708102555327.NLOjmg
          description: >-
            The unique event
            [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventUpdate'
      responses:
        '200':
          description: OK.
        '400':
          description: Bad request. The request payload is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  summary: >-
                    Error response when the specified request payload is not
                    valid and cannot be parsed.
                  value:
                    error:
                      code: request_cannot_be_parsed
                      message: request body is not valid
        '403':
          description: Forbidden. Access to this API is denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                403-secret-api-key-required:
                  summary: Error response when the secret API key was not provided.
                  value:
                    error:
                      code: secret_api_key_required
                      message: secret API key in header is missing or empty
                403-secret-api-key-not-found:
                  summary: >-
                    Error response when the provided secret API key does not
                    exist.
                  value:
                    error:
                      code: secret_api_key_not_found
                      message: >-
                        no fingerprint workspace found for specified secret API
                        key
                403-wrong-region:
                  summary: >-
                    Error response when the API region is different from the
                    region, the calling workspace is configured with.
                  value:
                    error:
                      code: wrong_region
                      message: wrong region
        '404':
          description: Not found. The event Id cannot be found in this workspace's data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                404-request-not-found:
                  summary: Error response when the provided event Id does not exist.
                  value:
                    error:
                      code: event_not_found
                      message: event id not found
        '409':
          description: Conflict. The event is not mutable yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  summary: Error response when the event is not mutable yet.
                  value:
                    error:
                      code: state_not_ready
                      message: resource is not mutable yet, try again
components:
  schemas:
    EventUpdate:
      type: object
      required: []
      properties:
        linked_id:
          type: string
          examples:
            - somelinkedId
          description: Linked ID value to assign to the existing event
        tags:
          type: object
          description: >-
            A customer-provided value or an object that was sent with the
            identification request or updated later.
          additionalProperties: true
          required: []
        suspect:
          type: boolean
          description: Suspect flag indicating observed suspicious or fraudulent event
          x-go-force-pointer: true
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          examples:
            - Forbidden
    ErrorCode:
      type: string
      enum:
        - request_cannot_be_parsed
        - request_read_timeout
        - secret_api_key_required
        - secret_api_key_not_found
        - public_api_key_required
        - public_api_key_not_found
        - subscription_not_active
        - wrong_region
        - feature_not_enabled
        - visitor_not_found
        - too_many_requests
        - state_not_ready
        - failed
        - event_not_found
        - missing_module
        - payload_too_large
        - service_unavailable
        - ruleset_not_found
      description: >
        Error code:

        * `request_cannot_be_parsed` - The query parameters or JSON payload
        contains some errors
          that prevented us from parsing it (wrong type/surpassed limits).
        * `request_read_timeout` - The request body could not be read before the
        connection timed out.

        * `secret_api_key_required` - secret API key in header is missing or
        empty.

        * `secret_api_key_not_found` - No Fingerprint workspace found for
        specified secret API key.

        * `public_api_key_required` - public API key in header is missing or
        empty.

        * `public_api_key_not_found` - No Fingerprint workspace found for
        specified public API key.

        * `subscription_not_active` - Fingerprint workspace is not active.

        * `wrong_region` - Server and workspace region differ.

        * `feature_not_enabled` - This feature (for example, Delete API) is not
        enabled for your workspace.

        * `visitor_not_found` - The specified visitor ID was not found. It never
        existed or it may have already been deleted.

        * `too_many_requests` - The limit on secret API key requests per second
        has been exceeded.

        * `state_not_ready` - The event specified with event ID is
          not ready for updates yet. Try again.
          This error happens in rare cases when update API is called immediately
          after receiving the event ID on the client. In case you need to send
          information right away, we recommend using the JS agent API instead.
        * `failed` - Internal server error.

        * `event_not_found` - The specified event ID was not found. It never
        existed, expired, or it has been deleted.

        * `missing_module` - The request is invalid because it is missing a
        required module.

        * `payload_too_large` - The request payload is too large and cannot be
        processed.

        * `service_unavailable` - The service was unable to process the request.

        * `ruleset_not_found` - The specified ruleset was not found. It never
        existed or it has been deleted.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: string
      description: >-
        Add your Secret API Key to the Authorization header using the standard
        Bearer format: `Authorization: Bearer <secret_api_key>`

````