---
title: "Create an alias"
method: POST
path: "/aliases"
tags: ["Aliases"]
---

# Create an alias

`POST /aliases`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/aliases`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/aliases/post.ts> (a function with typed inputs; its response is checked against the schema)

This API let’s you to create an alias

## Request body

- CreateBulkAliasRequest: Create bulk alias
  - `aliases` CreateAliasRequest[], required
    - `value` string, required

## Response `201`

Response for list aliases request

- AliasPaginatedResponse: Represents for list response of alias
  - `data` Alias[]
    - `value` string, required
    - `createdAt` string, date-time, required
  - `nextToken` string

## Other responses

- `default`: Error response

## Changes

- **2023-12-22** `edb9ea013bb1`: 3 breaking, 1 warning, 2 info
  - added the new required request property `aliases`
  - removed the required property `createdAt` from the response with the `201` status
  - removed the required property `value` from the response with the `201` status
  - removed the request property `value`
  - …2 more
- **2023-11-30** `b3351be4b462`: 1 info
  - endpoint added
- **2023-09-02** `6b13f6f47735`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/aliases/post.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
