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

# Quickstart

> Use a source API key to call Synthbrew runtime CRUD endpoints.

This quickstart shows the public runtime API flow:

1. Get a `sourceId`
2. Create a source API key
3. Call runtime endpoints with `x-api-key`

## 1. Get your `sourceId`

In the Synthbrew app, open your source and copy its ID.

Your runtime endpoint base is:

```text theme={null}
/api/runtime/{sourceId}/{table}
```

## 2. Create a source API key

Create a key from the source API keys UI or via the app API. Keep the returned key safe. It is shown only once.

## 3. Call runtime endpoints

Use `x-api-key` on every request.

```bash theme={null}
curl -X GET "http://localhost:3311/api/runtime/<sourceId>/accounts?limit=10&offset=0" \
  -H "x-api-key: sb_src_your_key_here"
```

```bash theme={null}
curl -X POST "http://localhost:3311/api/runtime/<sourceId>/accounts" \
  -H "x-api-key: sb_src_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"id":2,"name":"Beta","active":true}'
```

```bash theme={null}
curl -X PATCH "http://localhost:3311/api/runtime/<sourceId>/accounts/2" \
  -H "x-api-key: sb_src_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name":"Beta Updated"}'
```

## Querying list endpoints

`GET /runtime/{sourceId}/{table}` supports:

* `limit`, `offset`
* `fields=id,name,status`
* `sort=created_at:desc`
* `filters.status.$eq=paid`
* `filters.total.$gte=50`
* `populate=customer_id`
* `populate.customer_id.fields=id,name`

Example:

```bash theme={null}
curl "http://localhost:3311/api/runtime/<sourceId>/orders?limit=10&offset=0&sort=id:asc&fields=id,customer_id,status&populate=customer_id&populate.customer_id.fields=id,name" \
  -H "x-api-key: sb_src_your_key_here"
```

For full parameter and response schemas, see [Runtime API reference](/api-reference/introduction).
