# Create a monitor

A standing keyword monitor. Creating it is free. Each later run charges per new mention it delivers. `schedule` `hourly` is `400`. A keyword is a string, or an object with `keyword` plus `context`, `tag` (`own_brand`, `competitor`, `industry_term`), `also_include_any`, `also_include_all`, `exclude_words`, `exclude_wildcards`, `exclude_authors` and `exact_match`.

A standing keyword monitor. Creating it is free. Each later run charges per new mention it delivers. `schedule` `hourly` is `400`. A keyword is a string, or an object with `keyword` plus `context`, `tag` (`own_brand`, `competitor`, `industry_term`), `also_include_any`, `also_include_all`, `exclude_words`, `exclude_wildcards`, `exclude_authors` and `exact_match`.

## Authentication

Send `Authorization: Bearer gtk_…`. Create the key under **API Access → API Keys**. A missing, invalid or revoked key is **401**, including while this API is closed. A valid key while the API is closed for your organization answers **404**, the same body as an unknown path. Every response includes `FounderMCP-Api-Version` and `FounderMCP-Request-Id`.

### Headers

- **`Idempotency-Key`** `string` — Optional. The same key and the same body replay the monitor that was created. The same key with a different body is `409` `idempotency_conflict`.

### Body parameters

- **`name`** `string` · **required** — 1 to 120 characters.
- **`keywords`** `array` · **required** — 1 to 10 keywords.
- **`schedule`** `string` — Defaults to `daily`. `hourly` is rejected. One of: `daily`, `hourly`.
- **`min_relevance`** `string` — Defaults to `medium`. One of: `high`, `medium`, `low`.
- **`tags`** `string[]` — Tags to keep, such as `own_brand_mention`, `competitor_mention`, `buy_intent`.
- **`webhook_endpoint_id`** `string | null` — Optional webhook endpoint.
- **`max_credits_per_day`** `integer | null` — Daily credit cap for the runs.

## Response

- **`id`** `string` · **required** — Monitor id, `mon_…`.
- **`object`** `string` · **required** — Always `monitor`. One of: `monitor`.
- **`name`** `string` · **required** — The name you gave it.
- **`status`** `string` · **required** — `active` or `paused`. One of: `active`, `paused`.
- **`schedule`** `string` · **required** — `daily`. `hourly` is not available yet. One of: `daily`, `hourly`.
- **`keywords`** `object[]` · **required** — Each keyword with its context, tag, include and exclude lists, and `paused`.
- **`min_relevance`** `string` · **required** — `high`, `medium` or `low`. One of: `high`, `medium`, `low`.
- **`max_credits_per_day`** `integer | null` — Daily cap, or null for none.
- **`credits_charged`** `integer` · **required** — Credits charged so far.
- **`next_run_at`** `string` · **required** — When the next run starts.

## Credits

Creating a monitor is free. A run charges 5 credits per new mention delivered. A run that finds nothing is free.

## Errors

- **400** `invalid_request` — A keyword is too short, or `schedule` is `hourly`.
- **401** `authentication_error` — The Authorization header is missing, or the key is unknown or revoked.
- **403** `permission_error` — API access is not part of your plan, or your account is suspended.
- **404** `not_found` — The endpoint does not exist.
- **429** `rate_limit_error` — More than 60 requests per minute, or more than 3 at the same time, on one key. Wait for the Retry-After header.
- **500** `internal_error` — Something went wrong on our side.

## Example

### cURL

```bash
curl -X POST "https://foundermcp.dev/api/v1/monitors" \
  -H "Authorization: Bearer $FOUNDERMCP_API_KEY" \
  -H "Idempotency-Key: idem-1" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme mentions",
    "keywords": [
      {
        "keyword": "Acme Analytics",
        "tag": "own_brand",
        "exact_match": true
      }
    ],
    "max_credits_per_day": 50
  }'
```

### JavaScript

```javascript
const response = await fetch('https://foundermcp.dev/api/v1/monitors', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.FOUNDERMCP_API_KEY}`,
    'Idempotency-Key': 'idem-1',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "name": "Acme mentions",
    "keywords": [
      {
        "keyword": "Acme Analytics",
        "tag": "own_brand",
        "exact_match": true
      }
    ],
    "max_credits_per_day": 50
  })
});
const body = await response.json();
```

### Python

```python
import json
import os
import urllib.request

payload = {
  "name": "Acme mentions",
  "keywords": [
    {
      "keyword": "Acme Analytics",
      "tag": "own_brand",
      "exact_match": true
    }
  ],
  "max_credits_per_day": 50
}

request = urllib.request.Request(
    "https://foundermcp.dev/api/v1/monitors",
    headers={
    "Authorization": f"Bearer {os.environ['FOUNDERMCP_API_KEY']}",
    "Idempotency-Key": "idem-1",
    "Content-Type": "application/json"
    },
    data=json.dumps(payload).encode(),
    method="POST",
)
with urllib.request.urlopen(request) as response:
    body = json.load(response)
```

### Example response

```json
{
  "id": "mon_01J9Z6P8C8V0K3W6T2N8R5M1XF",
  "object": "monitor",
  "name": "Acme mentions",
  "status": "active",
  "schedule": "daily",
  "credits_charged": 0
}
```
