---
title: "Flag a message"
method: POST
path: "/mailboxes/{address}/messages/{uid}/flag"
tags: ["Mail"]
---

# Flag a message

`POST /mailboxes/{address}/messages/{uid}/flag`

## Request

- Base URL: `https://faivelo.com/api/v1`
- URL: `https://faivelo.com/api/v1/mailboxes/{address}/messages/{uid}/flag`
- Auth: HTTP bearer

Set or clear the `seen` or `flagged` flag on a message. Requires scope `mail:write`.

## Path parameters

- `address` string, required
- `uid` union, required
  - integer
  - string

## Query parameters

- `folder` string

## Request body

- FlagRequest: Request body for setting or clearing a message flag
  - `flag` 'seen' | 'flagged', required: Which flag to set
  - `value` boolean, required: `true` to set, `false` to clear

## Response `200`

Flag updated

- object
  - `success` boolean
  - `data` UpdatedResponse: Confirmation that a resource was updated
    - `updated` boolean

## Other responses

- `401`: Missing or invalid API key
- `402`: The account's plan does not include the API (`plan_required`)
- `403`: The key lacks the required scope
- `404`: Resource not found
- `429`: Rate limit exceeded

---

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