# Model Routes

> SDK methods for the Model Routes module, accessed via `soat.modelRoutes`. See the [Model Routes module docs](/docs/modules/model-routes) for permissions and data model, and each method's REST page for the full request/response schema.

# Model Routes

SDK methods for the Model Routes module, accessed via `soat.modelRoutes`. See the [Model Routes module docs](/docs/modules/model-routes) for permissions and data model, and each method's REST page for the full request/response schema.

### `soat.modelRoutes.listModelRoutes()`

List model routes

- Method: `GET`
- Path: `/api/v1/model-routes`

```ts
await soat.modelRoutes.listModelRoutes({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/model-routes/list-model-routes)

### `soat.modelRoutes.createModelRoute()`

Create a model route

- Method: `POST`
- Path: `/api/v1/model-routes`

```ts
await soat.modelRoutes.createModelRoute({
  body: { name, targets, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/model-routes/create-model-route)

### `soat.modelRoutes.getModelRoute()`

Get a model route

- Method: `GET`
- Path: `/api/v1/model-routes/{route_id}`

```ts
await soat.modelRoutes.getModelRoute({
  path: { route_id },
});
```

→ [Request & response schema](/docs/api/model-routes/get-model-route)

### `soat.modelRoutes.updateModelRoute()`

Update a model route

- Method: `PUT`
- Path: `/api/v1/model-routes/{route_id}`

```ts
await soat.modelRoutes.updateModelRoute({
  path: { route_id },
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/model-routes/update-model-route)

### `soat.modelRoutes.deleteModelRoute()`

Delete a model route

- Method: `DELETE`
- Path: `/api/v1/model-routes/{route_id}`

```ts
await soat.modelRoutes.deleteModelRoute({
  path: { route_id },
});
```

→ [Request & response schema](/docs/api/model-routes/delete-model-route)
