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

# Set Alias

`POST /v1/aliases`

Create or update a stored alias, global or scoped to 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 a global alias every caller sees. A user-scoped alias resolves only for that user and shadows a global one of the same name.

## 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

## Other responses

- `422` — Validation Error

## Changes

- **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-07-20** `d9a87177ce4a` — 1 info
  - the endpoint scheme security `XApiKeyAuth` was added to the API
- **2026-07-17** `db57bd46e3eb` — 1 info
  - endpoint added
- **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.dev/mozilla-ai/apis/otari/revisions/c05befed4db4?raw)
