# Reject approval image upload

Content Enrichment API / Approval Links

`POST https://api.ygo.ai/v2/project/content/rejectApprovalImageUpload`

Reject one pending photo upload: the upload's feedback item is rejected and the photo is never served. The page's photo list is not touched and the stored file is kept. The upload is checked when it is locked: one whose stored photo record is incomplete and cannot be read answers 400 `INVALID_STATUS_TRANSITION` (contact YGO support), and then an upload that was already decided answers 400 `INVALID_STATUS_TRANSITION`. Works after the hotel approved. The reviewer is recorded as the user's ID, or `project:<project id>` for a project API key.

Exact spec (OpenAPI 3.0, JSON): https://docs.ygo.ai/reference/rejectApprovalImageUpload.json

## Example request

```bash
curl -X POST 'https://api.ygo.ai/v2/project/content/rejectApprovalImageUpload' \
  -H "Authorization: Bearer $YGO_API_KEY" \
  -H "X-Project-ID: $YGO_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "HotelID": "019d9c2e-0ef8-7458-b0fa-8bed7182eb30",
  "FeedbackID": "01a0f1c9-3e8a-7c12-b4d5-8e9f0a1b2c3d"
}'
```

## Authorization

`Authorization: Bearer <key>`

Project-scoped API key

## Headers

- `X-Project-ID` (string (uuid), **required**)

  Project UUID. Required for all project-scoped endpoints.

  Example: `$YGO_PROJECT_ID`

## Request body

Required.

### application/json

Schema: object, `RejectApprovalImageUploadRequest`

The upload to reject and its hotel.

- `HotelID` (string (uuid), **required**)

  UUID of the hotel. Required, a valid non-nil UUID, and a live member of the calling project.

  Example: `019d9c2e-0ef8-7458-b0fa-8bed7182eb30`
- `FeedbackID` (string (uuid), **required**)

  UUID of the upload: its `ID` from listApprovalImageUploads, the id of its feedback item. Required, a valid non-nil UUID.

  Example: `01a0f1c9-3e8a-7c12-b4d5-8e9f0a1b2c3d`

#### Example request: reject. Reject one pending upload

```json
{
  "HotelID": "019d9c2e-0ef8-7458-b0fa-8bed7182eb30",
  "FeedbackID": "01a0f1c9-3e8a-7c12-b4d5-8e9f0a1b2c3d"
}
```

## Responses

### 200 OK

The rejected upload, `Status` `rejected` with its `ReviewedAt`.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `RejectApprovalImageUploadResponse`

Single-object response envelope wrapping the decided upload.

- `Data` (object, `ApprovalImageUpload`, **required**)

  One photo a hotel contact uploaded on the approval page.

  - `ID` (string (uuid), **required**)

    UUID of the upload: the id of its feedback item. Pass it as `FeedbackID` to acceptApprovalImageUpload or rejectApprovalImageUpload.

    Example: `01a0f1c9-3e8a-7c12-b4d5-8e9f0a1b2c3d`
  - `HotelID` (string (uuid), **required**)

    UUID of the hotel the photo was uploaded for.

    Example: `019d9c2e-0ef8-7458-b0fa-8bed7182eb30`
  - `URL` (string (uri), **required**)

    Where the photo is served from.

    Example: `https://ucarecdn.com/8f14e45f-ceea-467a-9575-7d3b1c2a9e10/`
  - `Width` (integer, **required**)

    Width of the photo in pixels: for a photo recorded as uploaded (uploadImage names its Uploadcare URL), the width the hotel's browser reported (YGO-4317), unverified; 0 when none was sent. Uploads recorded before YGO-4286 (multipart) carry the stored photo's width.

    Example: `1600`
  - `Height` (integer, **required**)

    Height of the photo in pixels: for a photo recorded as uploaded (uploadImage names its Uploadcare URL), the height the hotel's browser reported (YGO-4317), unverified; 0 when none was sent. Uploads recorded before YGO-4286 (multipart) carry the stored photo's height.

    Example: `1200`
  - `FileSize` (integer, **required**)

    Size of the photo's file in bytes: 0 for a photo recorded as uploaded (uploadImage names its Uploadcare URL), whose size is not read. Uploads recorded before YGO-4286 (multipart) carry the stored photo's file size.

    Example: `0`
  - `Format` (string, **required**)

    File type of the photo: empty for a photo recorded as uploaded (uploadImage names its Uploadcare URL), whose type is not read. Uploads recorded before YGO-4286 (multipart) carry `jpeg` or `png`.

    Values: `jpeg`, `png`, ``

    Example: ``
  - `Status` (string, **required**)

    State of the upload: `pending` until a reviewer decides, `accepted` once it is on the page's photo list, `rejected` when it was refused and is never served.

    Values: `pending`, `accepted`, `rejected`

    Example: `pending`
  - `CreatedAt` (string (date-time), **required**)

    When the photo was uploaded (RFC3339).

    Example: `2026-10-12T09:14:03.512874Z`
  - `ReviewedAt` (string (date-time))

    When a reviewer accepted or rejected the upload (RFC3339). Omitted while it is pending.

    Example: `2026-10-12T11:02:39.660142Z`

##### Example: reject. The photo is refused and never served

```json
{
  "Data": {
    "ID": "01a0f1c9-3e8a-7c12-b4d5-8e9f0a1b2c3d",
    "HotelID": "019d9c2e-0ef8-7458-b0fa-8bed7182eb30",
    "URL": "https://ucarecdn.com/8f14e45f-ceea-467a-9575-7d3b1c2a9e10/",
    "Width": 1600,
    "Height": 1200,
    "FileSize": 0,
    "Format": "",
    "Status": "rejected",
    "CreatedAt": "2026-10-12T09:14:03.512874Z",
    "ReviewedAt": "2026-10-12T11:02:39.660142Z"
  }
}
```

### 400 Bad Request

Bad Request - the request body or the X-Project-ID header failed validation, or the upload cannot be decided (`INVALID_STATUS_TRANSITION`: its stored photo record is incomplete, or it was already decided).

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: missingProjectHeader. X-Project-ID header missing

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "X-Project-ID header is required"
  }
}
```

##### Example: invalidBody. Malformed request body

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "Invalid request body"
  }
}
```

##### Example: invalidHotelID. HotelID missing or not a valid UUID

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "Validation failed",
    "Fields": [
      {
        "Field": "HotelID",
        "Message": "HotelID must be a valid UUID"
      }
    ]
  }
}
```

##### Example: invalidFeedbackID. FeedbackID missing or not a valid UUID

```json
{
  "Error": {
    "Code": "VALIDATION_ERROR",
    "Message": "Validation failed",
    "Fields": [
      {
        "Field": "FeedbackID",
        "Message": "FeedbackID must be a valid UUID"
      }
    ]
  }
}
```

##### Example: uploadUnreadable. The upload's stored photo record is incomplete and cannot be read

```json
{
  "Error": {
    "Code": "INVALID_STATUS_TRANSITION",
    "Message": "This upload cannot be reviewed: its photo record is incomplete. Please contact YGO support."
  }
}
```

##### Example: alreadyReviewed. The upload was already accepted or rejected

```json
{
  "Error": {
    "Code": "INVALID_STATUS_TRANSITION",
    "Message": "This photo was already reviewed."
  }
}
```

### 401 Unauthorized

Unauthorized - Invalid or missing bearer token.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: missingToken. No Authorization header

```json
{
  "Error": {
    "Code": "UNAUTHORIZED",
    "Message": "Missing bearer token"
  }
}
```

##### Example: invalidToken. The bearer token is not valid

```json
{
  "Error": {
    "Code": "UNAUTHORIZED",
    "Message": "Invalid bearer token"
  }
}
```

### 403 Forbidden

Forbidden - the caller is authenticated but may not act on this project. Also returned with code INSUFFICIENT_SCOPE when the API key does not carry the content.authoring:write permission this endpoint requires.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: insufficientScope. Missing required scope

```json
{
  "Error": {
    "Code": "INSUFFICIENT_SCOPE",
    "Message": "token lacks scope content.authoring:write"
  }
}
```

##### Example: accessDenied. The user token has no editor access to the project

```json
{
  "Error": {
    "Code": "FORBIDDEN",
    "Message": "Access denied to project"
  }
}
```

##### Example: noProjectScope. The request carries no project scope

```json
{
  "Error": {
    "Code": "FORBIDDEN",
    "Message": "Project access required"
  }
}
```

### 404 Not Found

Not Found - the project, the hotel or the upload is not reachable for this caller.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: projectNotFound. The project does not exist or was deleted (user tokens)

```json
{
  "Error": {
    "Code": "NOT_FOUND",
    "Message": "Project not found"
  }
}
```

##### Example: hotelNotFound. The hotel is not a live member of the project

```json
{
  "Error": {
    "Code": "NOT_FOUND",
    "Message": "Hotel not found"
  }
}
```

##### Example: uploadNotFound. No upload of this hotel in this project has this id

```json
{
  "Error": {
    "Code": "NOT_FOUND",
    "Message": "Upload not found"
  }
}
```

### 429 Too Many Requests

Too Many Requests. The response includes a `Retry-After` header with the number of seconds to wait before retrying.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`
- `Retry-After` (integer)

  Number of seconds to wait before retrying the request. Present on 429 responses.

  Example: `39`

  Limits: min 1

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: rateLimited. Limit exceeded

```json
{
  "Error": {
    "Code": "RATE_LIMIT_EXCEEDED",
    "Message": "Rate limit exceeded. Retry after the number of seconds in the Retry-After header."
  }
}
```

### 500 Internal Server Error

Internal Server Error - Unexpected server error. Include the X-Trace-ID header value when contacting support.

Headers:

- `X-Trace-ID` (string)

  Request trace ID for debugging (OpenTelemetry). Include this ID when contacting support about specific requests.

  Example: `abc123def456ghi789`

#### application/json

Schema: object, `ErrorResponse`

Standard v2 error response wrapper.

- `Error` (object, `ErrorDetail`, **required**)

  Error detail containing a machine-readable code and human-readable message.

  - `Code` (string, **required**)

    Machine-readable error code for programmatic handling.

    Example: `VALIDATION_ERROR`
  - `Message` (string, **required**)

    Human-readable error message.

    Example: `Validation failed`
  - `Fields` (array of object, `FieldError`)

    Field-level validation errors. Only present for VALIDATION_ERROR responses.

    Each item: A single field-level validation error.

    - `Field` (string, **required**)

      Path of the field that failed validation, as the request sends it: a dotted path for a field inside a nested request object, a bare name for a top-level one.

      Example: `Name`
    - `Message` (string, **required**)

      Human-readable validation error message for this field.

      Example: `Name is required`
    - `Code` (string)

      Machine-readable reason the field failed validation. Optional; clients should fall back to Message when it is absent or unrecognized.

      Values: `REQUIRED`, `TOO_LONG`, `TOO_SHORT`, `OUT_OF_RANGE`, `TOO_MANY`, `INVALID_FORMAT`, `NOT_ALLOWED`, `CONFLICT`, `INVALID_ENCODING`, `INSECURE_SCHEME`, `UNSAFE_CONTENT`, `REQUIRED_WHEN_ENABLED`

      Example: `TOO_LONG`
    - `Params` (map of string to any)

      Machine-readable values the message is built from, such as limits or allowed values. Keys are PascalCase; which keys are present depends on Code. Optional.

      Example:

      ```json
      {
        "Max": 200
      }
      ```

##### Example: reviewFailed. The decision could not be stored

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Failed to review the upload"
  }
}
```

##### Example: membershipFailed. Hotel membership could not be verified

```json
{
  "Error": {
    "Code": "INTERNAL_ERROR",
    "Message": "Failed to verify hotel"
  }
}
```
