# Changes

What changed since your last run. The incremental endpoint automations poll instead of refetching a window.

Source: https://sourceloop.ai/help/api/changes/

---

| Endpoint | Method | Path | Permission |
| --- | --- | --- | --- |
| List changes | GET | `/v1/changes` | `conversions:read` |

Base URL: `https://app.sourceloop.ai/api/v1`

## List changes

`GET /v1/changes`

What changed since your last run

Requires scope: `conversions:read`

The endpoint automations are built on. Poll it with the cursor from your last
run instead of refetching a window and diffing client-side.

Every change carries a `source`, so your job can skip its own writes rather
than reacting to them and looping.

Ordered newest first. Keeps 90 days.

### Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `since` | string (date-time) | no | Defaults to the last 24 hours. |
| `cursor` | string | no |  |
| `types` | string | no | Comma-separated: conversion.created, conversion.value_changed, stage.changed, deal.stage_changed |
| `limit` | integer | no |  |

### Responses

- `200` Changes
- `400` Something was wrong with the request or the credential.
- `429` Too many requests for this workspace in the current minute. Wait Retry-After seconds and repeat the request unchanged.

### Example (cURL)

```bash
curl -s -X GET "https://app.sourceloop.ai/api/v1/changes" \
  -H "Authorization: Bearer $SOURCELOOP_API_KEY"
```

### Example (Node)

```javascript
const res = await fetch(
  "https://app.sourceloop.ai/api/v1/changes",
  {
    method: "GET",
    headers: {
      Authorization: `Bearer ${process.env.SOURCELOOP_API_KEY}`,
    },
  },
);

const data = await res.json();
```

### Example (Python)

```python
import os, requests

res = requests.get(
    "https://app.sourceloop.ai/api/v1/changes",
    headers={"Authorization": f"Bearer {os.environ['SOURCELOOP_API_KEY']}"},
)
data = res.json()
```
