> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenrip.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get, Update & Delete Source

> GET, PATCH and DELETE /v0/sources/:id

# Draft — needs review

**Auth:** `Authorization: Bearer tr_...`

## `GET /v0/sources/{id}`

Returns one source with its adapter, bindings, schedule, config and health.

```bash theme={null}
rip source show <id>
```

## `PATCH /v0/sources/{id}`

| Field             | Type           | Description                                                                      |
| ----------------- | -------------- | -------------------------------------------------------------------------------- |
| `name`            | string         | Rename within the scope                                                          |
| `connection`      | string \| null | Bind a different connection. `null` unbinds                                      |
| `brain`           | string \| null | Link a different brain. `null` unlinks                                           |
| `intervalMinutes` | integer        | 5–1440                                                                           |
| `config`          | object         | Replaces the adapter config, validated strictly                                  |
| `taskKind`        | string \| null | The kind of task to file per landed item. `null` stops filing tasks (facts only) |
| `assigneeRule`    | string         | `creator`, `recorder`, `none`, or a member's account id / alias                  |

```bash theme={null}
rip source update <id> --interval 30 --assignee-rule creator
```

**Shortening an interval takes effect immediately.** The next run is pulled forward to at most one *new* interval away, so you don't wait out the old one first. Lengthening it leaves the scheduled run alone.

**The adapter's requirements are re-checked on the merged state**, not just the fields you sent. So a `cron` source cannot have its `taskKind` cleared, and a binding an adapter doesn't need is refused even when the call was about something else.

## `DELETE /v0/sources/{id}`

<Warning>
  Deleting a source **deletes its item ledger**, which is the dedupe history. The tasks and artifacts it already produced are kept — but a recreated source will land the same items again.
</Warning>

```bash theme={null}
rip source delete <id>
```

## Error codes

| Error                                          | Description                                                                      |
| ---------------------------------------------- | -------------------------------------------------------------------------------- |
| `SOURCE_NOT_FOUND`                             | No such source in this scope                                                     |
| `INVALID_SOURCE_CONFIG`                        | A binding the adapter does not use, or a `cron` source left without a `taskKind` |
| `INVALID_CONFIG`                               | The `config` failed the adapter's schema                                         |
| `INVALID_FIELD`                                | `intervalMinutes` outside 5–1440, or a bad `taskKind`                            |
| `CONNECTION_NOT_FOUND` / `WORKSPACE_NOT_FOUND` | The named connection or brain does not exist in this scope                       |
| `NOT_A_MEMBER` / `TEAM_NOT_FOUND`              | Team scope problems                                                              |

## Operator mirror

`GET`, `PATCH` and `DELETE /v0/operator/sources/{id}`.
