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

# Restore a trashed item

> Restores a `trashed` item to `active`. Sugar for the common case; the universal entry point is `POST /items/{id}/transition` with `state: active`. Trashed items are auto-purged after `TRASH_RETENTION_DAYS` (default 60) — restore before that window to keep the row. See [Lifecycle](/concepts/lifecycle).



## OpenAPI

````yaml /openapi.json post /items/{id}/restore
openapi: 3.1.0
info:
  title: Marfa API
  version: 4.2.0
  description: Typed data layer for structured personal data
servers: []
security: []
paths:
  /items/{id}/restore:
    post:
      tags:
        - Items
      summary: Restore a trashed item
      description: >-
        Restores a `trashed` item to `active`. Sugar for the common case; the
        universal entry point is `POST /items/{id}/transition` with `state:
        active`. Trashed items are auto-purged after `TRASH_RETENTION_DAYS`
        (default 60) — restore before that window to keep the row. See
        [Lifecycle](/concepts/lifecycle).
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: Item restored
          content:
            application/json:
              schema:
                type: object
                properties:
                  item:
                    type: object
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                      properties:
                        type: object
                        additionalProperties:
                          nullable: true
                      state:
                        type: string
                        enum:
                          - active
                          - archived
                          - trashed
                          - revoked
                      tier:
                        type: string
                        enum:
                          - library
                          - feed
                      tenant_id:
                        type: string
                        nullable: true
                      version:
                        type: number
                      schema_version:
                        type: integer
                      source:
                        type: string
                      source_id:
                        type: string
                      device:
                        type: string
                      capture_latitude:
                        type: number
                      capture_longitude:
                        type: number
                      timestamp:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      edges:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            edges:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  tenant_id:
                                    type: string
                                    nullable: true
                                  source_id:
                                    type: string
                                  target_id:
                                    type: string
                                  edge_type:
                                    type: string
                                  properties:
                                    type: object
                                    additionalProperties:
                                      nullable: true
                                  created_at:
                                    type: string
                                  updated_at:
                                    type: string
                                required:
                                  - id
                                  - source_id
                                  - target_id
                                  - edge_type
                                  - properties
                                  - created_at
                                  - updated_at
                            has_more:
                              type: boolean
                            next_cursor:
                              type: string
                          required:
                            - edges
                            - has_more
                      extensions:
                        type: object
                        additionalProperties:
                          type: object
                          additionalProperties:
                            nullable: true
                    required:
                      - id
                      - type
                      - properties
                      - state
                      - version
                      - schema_version
                      - source
                      - timestamp
                      - created_at
                      - updated_at
                  metadata:
                    type: object
                    properties:
                      item_id:
                        type: string
                      tags:
                        type: array
                        items:
                          type: string
                      extensions:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - item_id
                      - tags
                      - extensions
                required:
                  - item
                  - metadata
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - unauthorized
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: Item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - item_not_found
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or OAuth Token
      description: Pass an API key (marfa_k1_...) or OAuth access token (marfa_at_...)

````