---
title: "Create namespace under a parent key"
method: POST
path: "/skynet/namespaced-apikeys"
tags: ["Tracking_Namespace"]
---

# Create namespace under a parent key

`POST /skynet/namespaced-apikeys`

## Request

- Base URL: `https://api.nextbillion.io`
- URL: `https://api.nextbillion.io/skynet/namespaced-apikeys`
- Auth: API key in query parameter `key`
- TypeScript: <https://skmtc.dev/nextbillion-ai/apis/one-spec-service/docs/skynet/namespaced-apikeys/post.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `namespace` string, required
- `key` string, 32 character alphanumeric string, required

## Request body

- object

## Response `200`

- object
  - `status` integer: Returns the API response code.
  - `result` object: An object to return the details about the namespace key created.
    - `apikey` string: Returns the unique key created for the specified namespace.
    - `namespace` string: Returns the name of the namespace for which the key is created.
    - `expires_at` integer: Returns the time, expressed as UNIX epoch timestamp in seconds, when the namespace key will expire.
    - `sub_id` string: An internal subscription ID.
    - `created_at` integer: Returns the time, expressed as UNIX epoch timestamp in seconds, when the namespace key was created.
  - `message` string: Returns the error message in case of any error. If there is no error, then this field is absent in the response.
  - `error` string: Returns the error type in case of any error. If there is no error, then this field is absent in the response.

---

[API](https://skmtc.dev/nextbillion-ai/apis/one-spec-service.md) - [All operations](https://skmtc.dev/nextbillion-ai/apis/one-spec-service/llms.txt) - [OpenAPI document](https://skmtc.dev/nextbillion-ai/apis/one-spec-service/revisions/b647f1808dda?raw)
