---
title: "Set who a Smart Router applies to"
method: PUT
path: "/v1/org/auto-routers/{routerId}/assignment"
tags: ["Inference Providers"]
---

# Set who a Smart Router applies to

`PUT /v1/org/auto-routers/{routerId}/assignment`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/org/auto-routers/{routerId}/assignment`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Replaces who a Smart Router applies to: everyone, teams and members. Members it applies to get "Smart: <name>" in the desktop at their next provider sync, when they can use at least one of its models. Making it apply to everyone also needs the Share with everyone permission. Requires the Manage Gateway providers permission and a recent sign-in. Returns the whole list and the router's id.

## Path parameters

- `routerId` string, typeid, required

## Request body

- AutoRouterAssignmentWrite
  - `assignment` AutoRouterAssignment, required
    - `everyone` boolean, required
    - `teamIds` string[], required
    - `memberIds` string[], required

## Response `200`

Who the Smart Router applies to was saved.

- AutoRouterSaved
  - `routing` 'ready' | 'missing_key' | 'unknown', required
  - `canEdit` boolean, required
  - `routers` AutoRouter[], required
    - `id` string, required
    - `name` string, required
    - `assignment` AutoRouterAssignment, required
      - `everyone` boolean, required
      - `teamIds` string[], required
      - `memberIds` string[], required
    - `models` AutoRouterModel[], required
      - `id` string, required
      - `providerId` string, required
      - `modelId` string, required
      - `tasks` string[], required
    - `updatedAt` string, date-time, required
  - `tasks` string[], required
  - `routerId` string, required

## Other responses

- `400`: The request is invalid, or names a team or person that is not in the organization.
- `401`: Authentication required.
- `403`: The caller lacks the Manage Gateway providers permission, needs to sign in again, or makes the router apply to everyone without the Share with everyone permission.
- `404`: The organization or Smart Router was not found.

## Changes

- **2026-10-30** `b2ee4fa3a945`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/org/auto-routers/:routerId/assignment/put.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
