---
title: "Create Namespace"
method: POST
path: "/api/v1.msgs.namespace.create"
tags: ["Msgs"]
---

# Create Namespace

`POST /api/v1.msgs.namespace.create`

Creates or updates a msgs namespace with the given name.

## Request body

- MsgNamespaceCreateIn
  - `name` string, required
  - `retention` Retention
    - `period_ms` integer, nullable

## Response `200`

- MsgNamespaceCreateOut
  - `name` string, required
  - `retention` Retention, required
    - `period_ms` integer, nullable
  - `created` string, date-time, required
  - `updated` string, date-time, required

## Other responses

- `400`
- `401`
- `403`
- `422`

## Changes

- **2026-04-03** `8128e16dd64a` — 2 warning
  - removed the request property `retention/size_bytes`
  - removed the optional property `retention/size_bytes` from the response with the `200` status
- **2026-03-31** `cb1523fc3cdd` — 1 warning
  - the `retention/period_ms` request property's min was set to `0.00`
- **2026-03-31** `f62be26d2a53` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/svix/apis/diom-api/changes/api/v1.msgs.namespace.create/post.md)

---

[API](https://skmtc.dev/svix/apis/diom-api.md) · [All operations](https://skmtc.dev/svix/apis/diom-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/svix/diom-api/revisions/4bfee3499c4c/schema)
