---
title: "Crop And Save Logo"
method: POST
path: "/api/preferences/logo/crop"
tags: ["Preferences"]
---

# Crop And Save Logo

`POST /api/preferences/logo/crop`

## Request

- Base URL: `https://api.flagpost.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flagpost.ai/api/preferences/logo/crop`
- Auth: HTTP bearer

Crop and optionally remove background from a logo, then save to GCS.

Accepts the base64 data URL returned by /logo/analyze along with
user-adjusted crop coordinates.

## Request body

- LogoCropRequest: Request to crop and save a logo.
  - `image_data_url` string, required
  - `crop_x` integer, required
  - `crop_y` integer, required
  - `crop_width` integer, required
  - `crop_height` integer, required
  - `remove_background` boolean

## Response `200`

Successful Response

- LogoResponse: Response model for advisory logo.
  - `logo_url` string, nullable
  - `advisory_name` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/flagpost/apis/flagpost-api.md) - [All operations](https://skmtc.dev/flagpost/apis/flagpost-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flagpost/apis/flagpost-api/revisions/0308cef485ca?raw)
