> ## 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.

# Archive an event type

> Archives an event type so it no longer appears in the default list. Archived event types can still be retrieved by ID and listed with archived=true. Archiving an archived event type succeeds and moves `archived_at` to the current time. Requires the `read:project` and `write:event_type` token scopes.



## OpenAPI

````yaml POST /projects/{project_id}/event_types/{event_type_id}/archive
openapi: 3.1.0
info:
  title: Mangrove - API
  version: 1.1.0
  description: >
    ## Filtering and sorting


    List endpoints that accept `filter` take one query parameter per condition,
    written `filter[field][comparator]=value`, for example
    `filter[name][contains]=North`. The comparators are `eq`, `neq`, `gt`,
    `geq`, `lt`, `leq` and `contains`, and `filter[field]=value` is short for
    `eq`. Conditions combine with AND. `contains` matches part of the value, is
    case-sensitive, and applies only to text fields. An unknown field or
    comparator, a value that doesn't fit the field's type, or a list or object
    as the value returns 400 with a message naming the problem. Each list
    operation names its filterable fields; some take only `eq`, and say so.


    `sort` takes a comma-separated list of fields, for example
    `sort=-created_at,name`. Each field sorts ascending, or descending with a
    `-` prefix. Unknown sort fields are ignored. Sorting by `id` orders by the
    record's internal ID, not its friendly ID. Each list operation names its
    sortable fields.
servers:
  - url: https://app.gomangrove.com/api/v1
security:
  - sec0: []
paths:
  /projects/{project_id}/event_types/{event_type_id}/archive:
    post:
      summary: Archive an event type
      description: >-
        Archives an event type so it no longer appears in the default list.
        Archived event types can still be retrieved by ID and listed with
        archived=true. Archiving an archived event type succeeds and moves
        `archived_at` to the current time. Requires the `read:project` and
        `write:event_type` token scopes.
      operationId: archive-event-type
      parameters:
        - $ref: '#/components/parameters/ProjectId'
        - $ref: '#/components/parameters/EventTypeId'
      responses:
        '200':
          description: The archived event type.
          content:
            application/json:
              example:
                id: et_aBcD1234eFgH5678
                slug: feedstock-delivery
                name: Feedstock Delivery
                description: null
                created_at: '2025-02-03T14:19:11.787Z'
                updated_at: '2025-03-01T09:00:00.000Z'
                archived_at: '2025-03-01T09:00:00.000Z'
                data_point_types: []
                requires_locations: true
                requires_tracking_id: false
                requires_feedstock: false
                requires_asset: false
                reusable_in_batches: true
                cadence_amount: null
                cadence_unit: null
                ui_url: >-
                  https://app.gomangrove.com/nexus/prj_aBcD1234eFgH5678/data-inputs/event-types/et_aBcD1234eFgH5678
              schema:
                $ref: '#/components/schemas/EventType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: >-
            The event type fails validation as stored, or the project has no
            nexus config (create one with `POST
            /projects/{project_id}/nexus_config`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errors:
                  - message: Project does not have Nexus configuration
components:
  parameters:
    ProjectId:
      name: project_id
      in: path
      required: true
      description: The project's friendly ID (e.g. `prj_aBcD1234eFgH5678`).
      schema:
        type: string
    EventTypeId:
      name: event_type_id
      in: path
      required: true
      description: The event type's friendly ID (e.g. `et_aBcD1234eFgH5678`).
      schema:
        type: string
  schemas:
    EventType:
      type: object
      properties:
        id:
          type: string
          description: The event type's friendly ID (e.g. `et_aBcD1234eFgH5678`).
          example: et_aBcD1234eFgH5678
        slug:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        archived_at:
          type:
            - string
            - 'null'
          format: date-time
        data_point_types:
          type: array
          items:
            $ref: '#/components/schemas/DataPointType'
        requires_locations:
          type: boolean
          description: True when `expected_locations` is `two`.
        requires_tracking_id:
          type: boolean
        requires_feedstock:
          type: boolean
        requires_asset:
          type: boolean
        reusable_in_batches:
          type: boolean
        cadence_amount:
          $ref: '#/components/schemas/CadenceAmount'
        cadence_unit:
          $ref: '#/components/schemas/CadenceUnit'
        ui_url:
          type: string
          format: uri
          description: Link that opens this event type in the Mangrove app.
          example: >-
            https://app.gomangrove.com/nexus/prj_aBcD1234eFgH5678/data-inputs/event-types/et_aBcD1234eFgH5678
    ErrorResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
              - message
            properties:
              message:
                type: string
                description: Human-readable error message
              field:
                type: string
                description: Attribute the error applies to (validation errors only)
              code:
                type: string
                description: Machine-readable error code (validation errors only)
              blocking:
                type: array
                description: >-
                  Bounded preview of the records blocking a destroy
                  (blocked-destroy errors only)
                items:
                  $ref: '#/components/schemas/DeletionBlockingRecord'
              blocking_count:
                type: integer
                description: >-
                  Total count of records blocking a destroy (blocked-destroy
                  errors only)
              config_key:
                type: string
                description: >-
                  The data feed source config setting to fix, when the error is
                  on `config` (data feed source validation errors only)
              count:
                type: number
                description: >-
                  The limit or comparison value the failed validation checked
                  against, e.g. a maximum length or a numeric bound (validation
                  errors only, when the validation has one)
              value:
                description: >-
                  The rejected value, e.g. on an inclusion or uniqueness failure
                  (validation errors only, when the validation reports one)
    DataPointType:
      type: object
      properties:
        id:
          type: string
          description: The data point type's friendly ID (e.g. `dpt_aBcD1234eFgH5678`).
          example: dpt_aBcD1234eFgH5678
        slug:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        value_type:
          type: string
          enum:
            - number
            - string
            - boolean
            - enumeration
        unit:
          type:
            - string
            - 'null'
        is_static:
          type: boolean
        nexus_event_type_id:
          type:
            - string
            - 'null'
          description: The friendly ID of the event type this data point type belongs to.
          example: et_aBcD1234eFgH5678
        is_required:
          type:
            - boolean
            - 'null'
          description: Null for a data point type with no event type.
        evidence_check_enabled:
          type: boolean
        reusable_in_batches:
          type: boolean
        enumeration_options:
          type:
            - array
            - 'null'
          items:
            type: string
        rules:
          type: array
          description: >-
            Rules whose active version references this data point type's slug,
            ordered by name.
          items:
            type: object
            properties:
              id:
                type: string
                example: rule_aBcD1234eFgH5678
              name:
                type: string
              rule_type:
                type: string
                enum:
                  - alert
                  - substitution
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    CadenceAmount:
      type:
        - integer
        - 'null'
      format: int32
      minimum: 1
      description: >-
        How often an event of this type is expected, as a count of
        `cadence_unit`. An event type carries both cadence fields or neither;
        both null means no cadence is declared, which the app shows as
        Irregular.
      example: 15
    CadenceUnit:
      type:
        - string
        - 'null'
      enum:
        - second
        - minute
        - hour
        - day
        - week
        - month
        - year
        - null
      description: >-
        The unit `cadence_amount` counts. `second`, `minute` and `hour` measure
        elapsed time; `day` and above are calendar periods advanced in the
        account's time zone, so `1 day` and `24 hour` are different declarations
        and a daily stream stays on local midnight across a clock change. From
        `month` up, a reading counts toward the period that contains it rather
        than the nearest period boundary, so a monthly reading taken on the 28th
        still counts for that month.
      example: minute
    DeletionBlockingRecord:
      type: object
      required:
        - type
      properties:
        type:
          type: string
        friendly_id:
          type: string
        name:
          type:
            - string
            - 'null'
          description: >-
            Display label, and the only identifier for records that have no
            friendly_id
  responses:
    Unauthorized:
      description: >-
        The API token is missing, invalid or expired. The body is empty, except
        for an expired token, which returns the error below.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
              - message: API token has expired
    Forbidden:
      description: >-
        The token lacks the scope the operation's description names, or a
        condition the description states applies, such as a feature that isn't
        enabled for your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
              - message: You are not authorized to perform this action
    NotFound:
      description: >-
        A resource named in the path doesn't exist in your account, or the token
        can't see it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errors:
              - message: Record not found
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: ''

````

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