# Duplicates API

Source: https://frameleaf.app/docs/api/reference/duplicates/

Use your own server and its scoped API keys.

## Delete duplicates

DELETE /api/duplicates

Delete multiple duplicate assets specified by their IDs.

```json
{
  "description": "Delete multiple duplicate assets specified by their IDs.",
  "operationId": "deleteDuplicates",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BulkIdsDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "204": {
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Delete duplicates",
  "tags": [
    "Duplicates"
  ],
  "x-frameleaf-permission": "duplicate.delete"
}
```

## Retrieve duplicates

GET /api/duplicates

Retrieve a list of duplicate assets available to the authenticated user.

```json
{
  "description": "Retrieve a list of duplicate assets available to the authenticated user.",
  "operationId": "getAssetDuplicates",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/DuplicateResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve duplicates",
  "tags": [
    "Duplicates"
  ],
  "x-frameleaf-permission": "duplicate.read"
}
```

## Retrieve recent duplicate decisions

GET /api/duplicates/decisions

Your most recent duplicate decision jobs, which can be undone while nothing has changed since, and the decision jobs still running.

```json
{
  "description": "Your most recent duplicate decision jobs, which can be undone while nothing has changed since, and the decision jobs still running.",
  "operationId": "getDuplicateDecisions",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DuplicateDecisionHistoryDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve recent duplicate decisions",
  "tags": [
    "Duplicates"
  ],
  "x-frameleaf-permission": "duplicate.read"
}
```

## Resolve duplicate groups

POST /api/duplicates/resolve

Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.

```json
{
  "description": "Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.",
  "operationId": "resolveDuplicates",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DuplicateResolveDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/BulkIdResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Resolve duplicate groups",
  "tags": [
    "Duplicates"
  ],
  "x-frameleaf-permission": "duplicate.delete"
}
```

## Retrieve the duplicate review

GET /api/duplicates/review

Your duplicate groups, each read as a whole: whether it holds copies of one photo or frames of a burst, the evidence behind the suggested keeper, and whether this session may decide it. A group with photos this session does not see, or with another account’s photo, is listed but cannot be decided.

```json
{
  "description": "Your duplicate groups, each read as a whole: whether it holds copies of one photo or frames of a burst, the evidence behind the suggested keeper, and whether this session may decide it. A group with photos this session does not see, or with another account’s photo, is listed but cannot be decided.",
  "operationId": "getDuplicateReview",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/DuplicateReviewGroupDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve the duplicate review",
  "tags": [
    "Duplicates"
  ],
  "x-frameleaf-permission": "duplicate.read"
}
```

## Dismiss a duplicate group

DELETE /api/duplicates/{id}

Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.

```json
{
  "description": "Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.",
  "operationId": "deleteDuplicate",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Dismiss a duplicate group",
  "tags": [
    "Duplicates"
  ],
  "x-frameleaf-permission": "duplicate.delete"
}
```
