---
title: "Set Alias"
method: POST
path: "/v1/aliases"
tags: ["aliases"]
---

# Set Alias

`POST /v1/aliases`

Create or update a stored alias in one workspace, optionally for one user.

## Request body

- AliasRequest — Request to create or update an alias.
  - `name` string, required — Display name callers use as the model, e.g. 'fast-model'.
  - `target` string, required — Selector the alias resolves to, as 'provider:model' or 'instance:model'.
  - `user_id` string, nullable — User this alias belongs to. Omit for an alias every caller in the workspace sees. A user-scoped alias resolves only for that user and shadows the workspace-wide one of the same name.
  - `workspace_id` string, uuid, nullable — Workspace this alias belongs to. Omit for the deployment's default workspace. The alias resolves only for requests in that workspace, so two workspaces can each point the same name at a different model.

## Response `200`

Successful Response

- AliasResponse — A model alias and where it is defined.
  - `created_at` string, nullable
  - `name` string, required
  - `source` string, required
  - `target` string, required
  - `updated_at` string, nullable
  - `user_id` string, nullable
  - `workspace_id` string, uuid, nullable

## Other responses

- `422` — Validation Error

## Changes

> 126 revisions in range; 72 could not be searched.

- **2026-07-31** `7437535331c5` — 2 info
  - added the new optional request property `user_id`
  - added the optional property `user_id` to the response with the `200` status
- **2026-04-17** `0f43605bdc13` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/mozilla-ai/apis/otari/changes/v1/aliases/post.md)

---

[API](https://skmtc.dev/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.dev/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/7f178e92b56c/schema)
