# Flag

Report incorrect data such as hard bounces, invalid emails, wrong organization info, phone numbers, or URLs. Confirmed flags result in automatic credit refunds.

## Usage

```bash
tomba flag list
tomba flag create --flag-type "<type>" --value "<value>" --reason "<reason>"
```

## Examples

### List Flags

```bash
tomba flag list
tomba flag list --json
```

### Create Flag

```bash
# Report a hard bounce
tomba flag create --flag-type "email" --value "bounced@example.com" --reason "hard_bounce"

# Report wrong company
tomba flag create --flag-type "organization" --value "example.com" --reason "wrong_company"

# Report broken URL
tomba flag create --flag-type "website" --value "https://example.com" --reason "broken_url"
```

## Flag Types & Valid Reasons

| Flag Type      | Valid Reasons                                                       |
| -------------- | ------------------------------------------------------------------- |
| `email`        | `hard_bounce`, `invalid_email`, `wrong_person`, `outdated`, `other` |
| `organization` | `wrong_company`, `outdated`, `other`                                |
| `phone`        | `wrong_phone`, `outdated`, `other`                                  |
| `author_url`   | `broken_url`, `wrong_person`, `outdated`, `other`                   |
| `website`      | `broken_url`, `wrong_company`, `outdated`, `other`                  |

## HTTP call

```bash
# List flags
curl --request GET \
  --url 'http://127.0.0.1:3001/flags'

# Create flag
curl --request POST \
  --url 'http://127.0.0.1:3001/flags' \
  --header 'Content-Type: application/json' \
  --data '{"flag_type": "email", "value": "bounced@example.com", "reason": "hard_bounce"}'
```
