# Alerts endpoints

Source: https://help.ruuster.com/idx/reference-alerts

The Listing Alerts endpoints, generated from the API's own table. Every one takes your secret key as `Authorization: Bearer` from your server, except the one-click unsubscribe, whose token is the credential. Bodies are JSON (`Content-Type: application/json`). Answers use the same envelope as every other endpoint: `{ ok: true, data }` (lists add `nextCursor`) or `{ ok: false, error: { code, message, retryable } }`. Start with the [Listing Alerts quickstart](https://help.ruuster.com/idx/alerts-quickstart).

## Errors

| Code | Status | When |
|---|---|---|
| `invalid_parameter` | 400 | A field is missing or malformed; the message names it. |
| `unauthorized` | 401 | No secret key. |
| `not_enabled` | 403 | Listing Alerts is not switched on for the account. |
| `not_found` | 404 | No such buyer, search, agent or delivery on your account. |
| `conflict` | 409 | The change clashes with what is stored (an email or externalId in use, a result already reported). |
| `gone` | 410 | A link that is no longer valid, or a delivery that expired. |
| `limit_reached` | 422 | A cap, such as 25 saved searches per buyer. |

## GET /v1/agents

**List agents.** Your agents, oldest first, with `isDefault` on the default one.

Secret key only.

Query parameters:

| Name | Type | Required | What it is |
|---|---|---|---|
| `includeArchived` | boolean | no | `true` to include archived agents. |

## POST /v1/agents

**Add an agent.** Adds an agent buyers can get alerts from. Answers 201, or 200 when `externalId` matched an agent you already have.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `name` | string | yes | The name buyers see on the alert. |
| `email` | string | yes | The reply address: alerts carry it as Reply-To. |
| `phone` | string | no | Shown with the agent's name. |
| `photoUrl` | string | no | An https photo URL. |
| `title` | string | no | For example Realtor or Team lead. |
| `mlsAgentId` | string | no | The agent's MLS member id. |
| `externalId` | string | no | Your own id for the agent. Creating an agent with an externalId you already used updates that agent. |
| `default` | boolean | no | Make this the account's default agent. The first agent you add is the default. |

```json
{
  "name": "Dana Reyes",
  "email": "dana@example-homes.com",
  "phone": "512-555-0101",
  "externalId": "crm-7"
}
```

## GET /v1/agents/{alertAgentId}

**Get an agent.** One agent.

Secret key only.

## PATCH /v1/agents/{alertAgentId}

**Change an agent.** Changes the fields you send.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `name` | string | no | The name buyers see on the alert. |
| `email` | string | no | The reply address: alerts carry it as Reply-To. |
| `phone` | string | no | Shown with the agent's name. |
| `photoUrl` | string | no | An https photo URL. |
| `title` | string | no | For example Realtor or Team lead. |
| `mlsAgentId` | string | no | The agent's MLS member id. |
| `externalId` | string | no | Your own id for the agent. Creating an agent with an externalId you already used updates that agent. |
| `default` | boolean | no | Make this the account's default agent. The first agent you add is the default. |

## DELETE /v1/agents/{alertAgentId}

**Archive an agent.** Archives an agent: no new alert is sent as them. If it was the default, your oldest active agent becomes the default.

Secret key only.

## POST /v1/agents/{alertAgentId}/default

**Make an agent the default.** Alerts for buyers and searches with no agent of their own are sent as the default agent.

Secret key only.

## GET /v1/buyers

**List buyers.** Your buyers, oldest first.

Secret key only.

Query parameters:

| Name | Type | Required | What it is |
|---|---|---|---|
| `limit` | integer | no | 1 to 100, default 50. |
| `cursor` | string | no | The `nextCursor` of the previous page. |
| `email` | string | no | One buyer by email. |

## POST /v1/buyers

**Add a buyer (one call).** Adds a buyer, with an agent and a first saved search when you send them, in one call. Finds an existing buyer by `externalId`, then by email, and updates the fields you send, so repeating the call is safe. Answers `{ buyer, created, agent, search, searchCreated }`: 201 when something was created, else 200.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `email` | string | yes | The buyer's email address. |
| `firstName` | string | no | Used in the greeting. |
| `lastName` | string | no |  |
| `phone` | string | no |  |
| `externalId` | string | no | The buyer's id in your CRM. |
| `timeZone` | string | no | An IANA zone such as America/Denver. Digests go out at the send hour in this zone (default: your account's). |
| `agentId` | string | no | An agent id (`agt_…`). The alert is sent as the search's agent, else the buyer's, else your default agent. |
| `agent` | object | no | In place of `agentId`: an agent's fields (as on Add an agent). An agent with the same `externalId` is reused. |
| `consent` | object | yes | The consent record: `text` (required: the words the buyer agreed to), `at` (ISO time, default now), `source` (the page or form) and `ip`. Required for a new buyer; an existing buyer keeps theirs. |
| `search` | object | no | A first saved search: `criteria` (required), `name`, `frequency`, `kinds`, `agentId`, `externalId`. |

```json
{
  "email": "jamie@example.com",
  "firstName": "Jamie",
  "externalId": "fub-123",
  "consent": {
    "text": "Email me new listings that match my search.",
    "source": "https://example-homes.com/search"
  },
  "agent": {
    "name": "Dana Reyes",
    "email": "dana@example-homes.com",
    "externalId": "crm-7"
  },
  "search": {
    "name": "Austin under 600k",
    "criteria": {
      "city": "Austin",
      "state": "TX",
      "priceMax": "600000",
      "bedsMin": "3"
    },
    "frequency": "daily"
  }
}
```

## GET /v1/buyers/{buyerId}

**Get a buyer.** One buyer with the consent record and every saved search.

Secret key only.

## PATCH /v1/buyers/{buyerId}

**Change a buyer.** Changes the fields you send. The consent record changes only through resubscribe.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `email` | string | no |  |
| `firstName` | string | no |  |
| `lastName` | string | no |  |
| `phone` | string | no |  |
| `externalId` | string | no |  |
| `timeZone` | string | no |  |
| `agentId` | string | no | An agent id (`agt_…`). The alert is sent as the search's agent, else the buyer's, else your default agent. |

## DELETE /v1/buyers/{buyerId}

**Delete a buyer.** Deletes the buyer and their saved searches. No more alerts are made for them.

Secret key only.

## POST /v1/buyers/{buyerId}/unsubscribe

**Unsubscribe a buyer.** Stops every alert for the buyer and adds the email to your suppression list. Use it when the buyer unsubscribes on your own page.

Secret key only.

## POST /v1/buyers/{buyerId}/resubscribe

**Resubscribe a buyer.** Turns a buyer's alerts back on with a fresh consent record. Refused for an email that bounced or reported an alert as spam.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `consent` | object | yes | The consent record: `text` (required: the words the buyer agreed to), `at` (ISO time, default now), `source` (the page or form) and `ip`. Required for a new buyer; an existing buyer keeps theirs. |

## GET /v1/saved-searches

**List saved searches.** Saved searches, oldest first.

Secret key only.

Query parameters:

| Name | Type | Required | What it is |
|---|---|---|---|
| `buyer` | string | no | One buyer's searches (`buy_…`). |
| `limit` | integer | no | 1 to 100, default 50. |
| `cursor` | string | no | The `nextCursor` of the previous page. |

## POST /v1/saved-searches

**Add a saved search.** A saved search for a buyer you already added. The same criteria for the same buyer answers the search you have (200). A buyer has at most 25 searches.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `buyerId` | string | no | The buyer (`buy_…`). Or `buyerExternalId`. |
| `buyerExternalId` | string | no | The buyer by your CRM id. |
| `criteria` | object | yes | The search, as GET /v1/listings parameters in a JSON object: a location plus filters. `where`, `type`, `subtype`, `status` and `keywords` may be lists. Never `sort`, `page`, `limit`, `cursor`, `view`, `format` or `modifiedSince`. Checked against your boards' filters when you save it. |
| `name` | string | no | Shown in the subject and the digest. |
| `frequency` | string | no | `instant` (default), `daily` or `weekly`. |
| `kinds` | string[] | no | Which changes alert the buyer: `new_listing`, `price_drop`, `back_on_market`, `sold`. Default all four. |
| `agentId` | string | no | An agent id (`agt_…`). The alert is sent as the search's agent, else the buyer's, else your default agent. |
| `externalId` | string | no | Your own id for the search. |

```json
{
  "buyerId": "buy_K2v9QmT4xLp8",
  "criteria": {
    "zip": "78704",
    "type": [
      "house",
      "townhouse"
    ],
    "priceMax": "750000"
  },
  "frequency": "instant"
}
```

## GET /v1/saved-searches/{searchId}

**Get a saved search.** One saved search.

Secret key only.

## PATCH /v1/saved-searches/{searchId}

**Change a saved search.** Pause, resume or change a search. A search the buyer unsubscribed from comes back only when the buyer resubscribes.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `criteria` | object | no | The search, as GET /v1/listings parameters in a JSON object: a location plus filters. `where`, `type`, `subtype`, `status` and `keywords` may be lists. Never `sort`, `page`, `limit`, `cursor`, `view`, `format` or `modifiedSince`. Checked against your boards' filters when you save it. |
| `name` | string | no |  |
| `frequency` | string | no | `instant` (default), `daily` or `weekly`. |
| `kinds` | string[] | no | Which changes alert the buyer: `new_listing`, `price_drop`, `back_on_market`, `sold`. Default all four. |
| `agentId` | string | no | An agent id (`agt_…`). The alert is sent as the search's agent, else the buyer's, else your default agent. |
| `externalId` | string | no |  |
| `status` | string | no | `active` or `paused`. |

## DELETE /v1/saved-searches/{searchId}

**Delete a saved search.** Deletes a saved search. Its pending alerts are dropped.

Secret key only.

## GET /v1/deliveries

**List deliveries.** The send queue: alerts ready for you to send, oldest first. With `buyer`, that buyer's deliveries in every status.

Secret key only.

Query parameters:

| Name | Type | Required | What it is |
|---|---|---|---|
| `status` | string | no | `pending` (default), `acked`, `sent`, `failed`, `suppressed`, `expired` or `all`. |
| `buyer` | string | no | One buyer's deliveries (`buy_…`). |
| `limit` | integer | no | 1 to 100, default 50. |
| `cursor` | string | no | The `nextCursor` of the previous page. |

## GET /v1/deliveries/{deliveryId}

**Get a delivery.** One delivery. `delivery` holds the object to send while it can still be sent, then null.

Secret key only.

## POST /v1/deliveries/{deliveryId}/ack

**Take a delivery.** Marks a delivery as taken, so another worker skips it. Safe to repeat. 410 once it expired.

Secret key only.

## POST /v1/deliveries/{deliveryId}/result

**Report the result.** Tells us what your email provider did with the delivery. Safe to repeat with the same status.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `status` | string | yes | `sent`, `failed` or `suppressed`. |
| `providerMessageId` | string | no | Your provider's message id. |
| `reason` | string | no | For failed or suppressed: why. |

```json
{
  "status": "sent",
  "providerMessageId": "0100018c-example"
}
```

## POST /v1/deliveries/{deliveryId}/events

**Report email events.** Optional: your provider's events for this delivery. A bounce, a spam complaint or an unsubscribe stops the buyer's alerts. An event with an `id` you already sent is ignored.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `events` | object[] | yes | 1 to 50 events: `kind` (`delivered`, `opened`, `clicked`, `bounced`, `complained`, `unsubscribed`), `occurredAt`, `url` (clicks), `id` (your provider's event id) and `machine` (true for a mail scanner's open). |

```json
{
  "events": [
    {
      "kind": "delivered",
      "occurredAt": "2026-11-23T14:02:11Z",
      "id": "evt_1"
    },
    {
      "kind": "clicked",
      "occurredAt": "2026-11-23T15:10:40Z",
      "url": "https://example-homes.com/homes/abc",
      "id": "evt_2"
    }
  ]
}
```

## GET /v1/links/{alertToken}

**Read a buyer link.** Which buyer (and search) a link's `token` belongs to, with the buyer's searches. Your manage-alerts page calls it from your server. 410 for a link that is no longer valid.

Secret key only.

## POST /v1/unsubscribe/{alertToken}

**One-click unsubscribe.** The address in every alert's List-Unsubscribe header. Mail apps call it with no key: the token is the credential. A search link's token stops that search; a buyer link's token stops every alert. Always answers 200.

No key: the token in the path is the credential.

## GET /v1/alerts/settings

**Alert settings.** Your account's alert settings.

Secret key only.

## PATCH /v1/alerts/settings

**Change alert settings.** Changes the fields you send. Setting `webhookUrl` the first time, or `rotateWebhookSecret: true`, answers the signing secret once as `webhookSecret`.

Secret key only.

Body:

| Name | Type | Required | What it is |
|---|---|---|---|
| `timeZone` | string | no | Your account's zone (buyers without one use it). Default America/Chicago. |
| `sendHour` | integer | no | The digest hour, 0 to 23. Default 8. |
| `weeklyDay` | integer | no | The weekly digest's day, 0 (Sunday) to 6. Default 1. |
| `maxSearchesPerBuyer` | integer | no | Lower the 25 per buyer cap. |
| `instantPerBuyerPerDay` | integer | no | Instant alerts per buyer per day before the rest wait for the daily digest. Default 3. |
| `deliveriesPerBuyerPerDay` | integer | no | All deliveries per buyer per day. Default 6. |
| `manageUrl` | string | no | Your manage-alerts page. Links add `?token=`. |
| `unsubscribeUrl` | string | no | Your unsubscribe page. Links add `?token=`. |
| `searchUrl` | string | no | Your search page, for the see-all link. Put `{searchId}` where the saved search goes; without it `?search=` is added. Homes link here when you have no listing page. |
| `listingUrl` | string | no | Your listing page, with `{slug}`, `{listingId}` or `{mlsNumber}` where the home goes. A home missing the field links to your search page. With neither page set, alerts wait. |
| `postalAddress` | string | no | Your postal address for the footer (required by email law in most places). |
| `fromNameTemplate` | string | no | The From name, with `{agentName}`. Default `{agentName}`. |
| `webhookUrl` | string | no | Your https endpoint for alerts webhooks; empty to turn them off. |
| `webhookEvents` | string[] | no | Which events it gets. Default `delivery.ready`. |
| `rotateWebhookSecret` | boolean | no | A new signing secret; the old one keeps working for 24 hours. |
| `autoTopUp` | boolean | no | Buy 25,000 more emails when the month's run out (managed sending only). |

## GET /v1/alerts/credits

**Email credits.** This month's email credits: `included`, `purchased`, `used`, `remaining`, `warning` (80 or 100) and `action`. They count emails we send for you; alerts you send yourself use none.

Secret key only.
