---
title: "Create a subname"
method: POST
path: "/v1/subnames"
tags: ["experimental"]
---

# Create a subname

`POST /v1/subnames`

## Request

- Base URL: `http://api.enoki.mystenlabs.com`
- URL: `http://api.enoki.mystenlabs.com/v1/subnames`
- Auth: HTTP bearer

Initiates the creation of a subname. The subname request is added to a processing queue and will be created asynchronously, typically within a few seconds. Note: A successful response from this API does not guarantee that the subname has been created yet. To check the status of the subname, use the `get` subname API or resolve the name directly on Sui.

## Headers

- `zklogin-jwt` string: The JWT of the user signed in with zkLogin.

## Request body

- CreateSubnameRequest
  - `domain` string, required: The domain name to create the subname under.
  - `network` 'testnet' | 'mainnet': The network the domain and subname are registered on.
  - `subname` string, required: The subname to create.
  - `targetAddress` string: The address the new subname will resolve to

## Response `202`

Successful response

- CreateSubnameResponse
  - `data` object, required
    - `name` string, required
    - `status` 'PENDING' | 'ACTIVE' | 'FAILED', required
    - `createdAt` string, date-time, required: The date and time the subname was created in ISO 8601 format

---

[API](https://skmtc.dev/mystenlabs/apis/enoki-api-specification.md) - [All operations](https://skmtc.dev/mystenlabs/apis/enoki-api-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/mystenlabs/apis/enoki-api-specification/revisions/2ac8d418823a?raw)
