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

# Update an event

> Updates a specific event by ID.



## OpenAPI

````yaml PATCH /projects/{project_id}/events/{event_id}
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /projects/{project_id}/events/{event_id}:
    patch:
      summary: Update an event
      description: Updates a specific event by ID.
      operationId: update-an-event
      parameters:
        - name: project_id
          in: path
          schema:
            type: string
          required: true
        - name: event_id
          in: path
          schema:
            type: string
          required: true
          description: >-
            Unique event ID in the `evt_XXXX` syntax. For example:
            `evt_DLnYvzbjSujNAvXE`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: object
                  properties:
                    start_time:
                      type: string
                      format: date-time
                      description: The start time of the event.
                    end_time:
                      type: string
                      format: date-time
                      description: The end time of the event.
                    tracking_id:
                      type: string
                      description: Tracking identifier for the event.
                    notes:
                      type: string
                      description: Notes or comments about the event.
                    locations:
                      type: array
                      description: >-
                        Providing a set of locations in this field will remove
                        any existing locations from the event. It will not
                        delete the locations from the project.
                      items:
                        properties:
                          id:
                            type: string
                            description: >-
                              Unique identifier for the location, generated by
                              Mangrove.
                        type: object
                    data_points:
                      type: array
                      description: >-
                        Any datapoints provided in this field will either update
                        the value of an existing datapoint on the event, or
                        create a new DataPoint if one with this slug does not
                        exist.
                      items:
                        properties:
                          slug:
                            type: string
                            description: Slug identifier for the data point type.
                          value:
                            type: string
                            description: >-
                              Value for the data point; must match the datatype
                              of this DataPointType.
                        type: object
            examples:
              Request Example:
                value:
                  event:
                    start_time: '2024-06-05T00:00:00.000Z'
                    end_time: '2024-06-05T23:59:59.000Z'
                    locations:
                      - id: loc_8XF1QtGs79oX9A6k
                      - id: loc_8XF1QtGs79oX9A6k
                    data_points:
                      - slug: total-ash-delivered-wet-us-ton
                        value: 290.7
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: evt_DLnYvzbjSujNAvXE
                    slug: biochar-delivery
                    event_type: Biochar Delivery
                    tracking_id: MG1003
                    start_time: '2024-06-05T00:00:00.000Z'
                    end_time: '2024-06-05T23:59:59.000Z'
                    data_points:
                      - id: in_JuGzRS08MbVSEkCj
                        slug: total-ash-delivered-wet-us-ton
                        data_point_type: Total Ash Delivered (wet mass) U.S. ton
                        value: 290.7
                        unit: U.S. ton
                        status: complete
                      - id: in_c3krFTxCxJSQR5Rc
                        slug: distance-biochar-transported
                        data_point_type: Biochar distance transported
                        value: 15.3
                        unit: mile
                        status: complete
                      - id: in_AIKqFEtr5OpAqram
                        slug: biochar-end-use
                        data_point_type: Biochar end use
                        value: soil amendment
                        unit: null
                        status: complete
                    locations:
                      - id: loc_8XF1QtGs79oX9A6k
                        lat: '40.4773493'
                        long: '-124.1226179'
                        name: Production Facility
                        address:
                          name: Production Facility
                          street_address_1: null
                          street_address_2: null
                          city: null
                          state: null
                          postal_code: null
                          country: CA
                      - id: loc_8XF1QtGs79oX9A6k
                        lat: '41.2733453'
                        long: '-122.2246676'
                        name: Customer Location 2
                        address:
                          name: Customer Location 2
                          street_address_1: null
                          street_address_2: null
                          city: null
                          state: null
                          postal_code: null
                          country: CA
                    evidences: []
        '404':
          description: '404'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: error
                    statusCode: 404
                    errors:
                      - message: record not found
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  statusCode:
                    type: integer
                    example: 404
                    default: 0
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: record not found
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````