---
title: "Delete photos"
method: POST
path: "/projects/{project_id}/photos/delete"
tags: ["Photos"]
---

# Delete photos

`POST /projects/{project_id}/photos/delete`

## Request

- Base URL: `https://api.propertypixel.app/v1`
- URL: `https://api.propertypixel.app/v1/projects/{project_id}/photos/delete`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://llflgtovnkrsjqydycyu.supabase.co/auth/v1/oauth/authorize`, token URL `https://llflgtovnkrsjqydycyu.supabase.co/auth/v1/oauth/token`)

Delete photos from a project, together with every edit and staging made from them and any video that starts with one of them. A Listing Tour that only uses a deleted photo later in its sequence is kept. Only do this when the user explicitly asks to remove those photos; confirm which ones first. All IDs must belong to the project, otherwise nothing is deleted. Returns the deleted IDs; call get_project to see what remains.

Requires a connection with edit access.

## Path parameters

- `project_id` string, uuid, required: The project the photos belong to.

## Headers

- `Idempotency-Key` string: A unique key (for example a UUID) that makes retries safe. A retry with the same key and body returns the stored response; the same key with a different body returns 422. Keys last 24 hours.

## Request body

- object
  - `photo_ids` string[], required: Photo IDs to delete (max 100).

## Response `200`

Delete photos

- PhotoDeletion
  - `object` 'deletion', required
  - `deleted_ids` string[], required
  - `project_id` string, uuid, required

## Other responses

- `400`: The request is invalid. Codes: `validation_failed`.
- `401`: Missing, invalid or revoked credential. Codes: `unauthorized`.
- `403`: The credential can't do this. View-only connections get forbidden_scope on writes. Codes: `forbidden_scope`, `forbidden`.
- `404`: The resource doesn't exist in this workspace. Codes: `not_found`.
- `409`: The request conflicts with the current state. Codes: `conflict`, `idempotency_in_progress`.
- `422`: An Idempotency-Key was reused with a different body, or an upload was rejected. Codes: `idempotency_conflict`, `upload_rejected`.
- `429`: Too many requests for this connection. Codes: `rate_limited`.
- `500`: Something failed on our side. Retry later. Codes: `internal`.

---

[API](https://skmtc.dev/propertypixel/apis/propertypixel-api.md) · [All operations](https://skmtc.dev/propertypixel/apis/propertypixel-api/llms.txt) · [OpenAPI document](https://skmtc.dev/propertypixel/apis/propertypixel-api/revisions/8f7baef701cc?raw)
