---
title: "Delete a gallery photo"
---

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

# Delete a gallery photo

Path: Nicer API › User places

`DELETE /user-places/{id}`

URL: `https://api.nicer.travel/user-places/{id}`

Deletes one of the caller's own gallery photos for good, with its image, and answers the place as it was. Only the photo's owner may call it: the place is looked up under the caller.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `id` (`userPlaces.delete.path.id`; string, required)

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.userPlaces.delete({
  "id": "string"
});
```

### Nicer CLI

```bash
nicer user-places delete --id 'string'
```

### cURL

```bash
curl --request DELETE \
  --url 'https://api.nicer.travel/user-places/<id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/user-places/<id>';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/user-places/<id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "capturedAt": "string",
  "city": "string",
  "country": "string",
  "countryCode": "string",
  "createdBy": "string",
  "description": "string",
  "errorCode": "string",
  "errorMessage": "string",
  "fileName": "string",
  "fullAddress": "string",
  "hasError": true,
  "imageUri": "string",
  "lastModifiedBy": "string",
  "latitude": 0,
  "locationCountry": {
    "address": "string",
    "amenities": [
      "string"
    ],
    "city": "string",
    "country": "string",
    "countryCode": "string",
    "description": "string",
    "fullAddress": "string",
    "latitude": 0,
    "longitude": 0,
    "name": "string",
    "photos": [
      {
        "key": "string",
        "name": "string",
        "source": "string",
        "url": "string"
      }
    ],
    "placeId": "string",
    "placeTypes": [
      "string"
    ],
    "primaryType": "lodging",
    "source": "string",
    "state": "string",
    "zipCode": "string"
  },
  "longitude": 0,
  "state": "string",
  "zipCode": "string",
  "id": "string",
  "userId": "string",
  "createdAt": "string",
  "updatedAt": "string",
  "type": "UserPlace"
}
```

- `createdBy` (`userPlaces.delete.response.200.createdBy`; string, required)
- `hasError` (`userPlaces.delete.response.200.hasError`; boolean, required) — Whether processing the location of the photo failed.
- `imageUri` (`userPlaces.delete.response.200.imageUri`; string, required) — The photo: its storage key, which the gallery listing answers as an absolute URL.
- `lastModifiedBy` (`userPlaces.delete.response.200.lastModifiedBy`; string, required)
- `id` (`userPlaces.delete.response.200.id`; string, required)
- `userId` (`userPlaces.delete.response.200.userId`; string, required) — The person whose gallery holds the photo.
- `createdAt` (`userPlaces.delete.response.200.createdAt`; string, required)
- `updatedAt` (`userPlaces.delete.response.200.updatedAt`; string, required)
- `type` (`userPlaces.delete.response.200.type`; string, required)
- `capturedAt` (`userPlaces.delete.response.200.capturedAt`; any of, optional) — When the photo was taken, from the upload's metadata; null when it carried none.
  - any of the following: `string`, `null`
- `city` (`userPlaces.delete.response.200.city`; any of, optional)
  - any of the following: `string`, `null`
- `country` (`userPlaces.delete.response.200.country`; any of, optional)
  - any of the following: `string`, `null`
- `countryCode` (`userPlaces.delete.response.200.countryCode`; any of, optional)
  - any of the following: `string`, `null`
- `description` (`userPlaces.delete.response.200.description`; any of, optional) — A brief description of the place or of the visit.
  - any of the following: `string`, `null`
- `errorCode` (`userPlaces.delete.response.200.errorCode`; any of, optional) — Set when processing the location failed.
  - any of the following: `string`, `null`
- `errorMessage` (`userPlaces.delete.response.200.errorMessage`; any of, optional)
  - any of the following: `string`, `null`
- `fileName` (`userPlaces.delete.response.200.fileName`; any of, optional) — The name of the uploaded file.
  - any of the following: `string`, `null`
- `fullAddress` (`userPlaces.delete.response.200.fullAddress`; any of, optional)
  - any of the following: `string`, `null`
- `latitude` (`userPlaces.delete.response.200.latitude`; any of, optional)
  - any of the following: `number`, `null`
- `locationCountry` (`userPlaces.delete.response.200.locationCountry`; any of, optional) — The photo's country, as the place lookup found it.
  - any of the following:
    - `object`
      - `address` (`userPlaces.delete.response.200.locationCountry.1.address`; string, required) — The short address; empty when the place has none.
      - `country` (`userPlaces.delete.response.200.locationCountry.1.country`; string, required) — The country's name; empty when the place has none.
      - `fullAddress` (`userPlaces.delete.response.200.locationCountry.1.fullAddress`; string, required) — The full address; empty when the place has none.
      - `amenities` (`userPlaces.delete.response.200.locationCountry.1.amenities`; array of string, optional)
      - `city` (`userPlaces.delete.response.200.locationCountry.1.city`; string, optional)
      - `countryCode` (`userPlaces.delete.response.200.locationCountry.1.countryCode`; string, optional)
      - `description` (`userPlaces.delete.response.200.locationCountry.1.description`; string, optional)
      - `latitude` (`userPlaces.delete.response.200.locationCountry.1.latitude`; number, optional)
      - `longitude` (`userPlaces.delete.response.200.locationCountry.1.longitude`; number, optional)
      - `name` (`userPlaces.delete.response.200.locationCountry.1.name`; string, optional)
      - `photos` (`userPlaces.delete.response.200.locationCountry.1.photos`; array of object, optional) — Up to four photos when they were asked for; empty otherwise.
        - `name` (`userPlaces.delete.response.200.locationCountry.1.photos.name`; string, required)
        - `url` (`userPlaces.delete.response.200.locationCountry.1.photos.url`; string, required)
        - `key` (`userPlaces.delete.response.200.locationCountry.1.photos.key`; string, optional)
        - `source` (`userPlaces.delete.response.200.locationCountry.1.photos.source`; string, optional)
      - `placeId` (`userPlaces.delete.response.200.locationCountry.1.placeId`; string, optional)
      - `placeTypes` (`userPlaces.delete.response.200.locationCountry.1.placeTypes`; array of string, optional) — Every type the directory gives the place, as it spells them.
      - `primaryType` (`userPlaces.delete.response.200.locationCountry.1.primaryType`; string, optional) — The place's most relevant type.
        - one of `"lodging"`, `"restaurant"`, `"tourist_attraction"`, `"shopping_mall"`, `"airport"`, `"hospital"`, `"school"`, `"gas_station"`, `"bank"`, `"atm"`, `"pharmacy"`, `"store"`, `"museum"`, `"park"`, `"gym"`, `"movie_theater"`, `"night_club"`, `"bar"`, `"cafe"`, `"church"`, `"mosque"`, `"synagogue"`, `"hindu_temple"`, `"library"`, `"university"`, `"subway_station"`, `"train_station"`, `"bus_station"`, `"taxi_stand"`, `"car_rental"`, `"beauty_salon"`, `"spa"`, `"doctor"`, `"dentist"`, `"veterinary_care"`, `"zoo"`, `"amusement_park"`, `"casino"`, `"bowling_alley"`, `"stadium"`, `"post_office"`, `"police"`, `"fire_station"`, `"city_hall"`, `"courthouse"`, `"embassy"`, `"locality"`, `"administrative_area_level_1"`, `"administrative_area_level_2"`, `"country"`, `"city"`, `"region"`, `"state"`, `"neighborhood"`, `"sublocality"`, `"establishment"`, `"point_of_interest"`
      - `source` (`userPlaces.delete.response.200.locationCountry.1.source`; string, optional) — The directory the place comes from.
      - `state` (`userPlaces.delete.response.200.locationCountry.1.state`; string, optional)
      - `zipCode` (`userPlaces.delete.response.200.locationCountry.1.zipCode`; string, optional)
    - `null`
- `longitude` (`userPlaces.delete.response.200.longitude`; any of, optional)
  - any of the following: `number`, `null`
- `state` (`userPlaces.delete.response.200.state`; any of, optional)
  - any of the following: `string`, `null`
- `zipCode` (`userPlaces.delete.response.200.zipCode`; any of, optional)
  - any of the following: `string`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`userPlaces.delete.response.400.errorCode`; string, required)
- `errorMessage` (`userPlaces.delete.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`userPlaces.delete.response.401.errorCode`; string, required)
- `errorMessage` (`userPlaces.delete.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`userPlaces.delete.response.403.errorCode`; string, required)
- `errorMessage` (`userPlaces.delete.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/User-places/userPlaces.delete/index.md
