Namespaces
Create a namespace
Creates a namespace with status 201. Names are unique within the organization; a duplicate conflicts.
POST
Creates a namespace with status 201. Names are unique within the organization; a duplicate conflicts.
apiKeyheader
x-api-key<token>application/json- body
name*stringMatch
^\S[\s\S]*\S$|^\S$|^$Length
1 <= length <= 128metadata?|nullSuccess
application/json- response
id*NamespaceIdMatch
^ns_[0-9a-hjkmnp-tv-z]{16,24}$name*stringcreatedAt*stringmetadata*Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.
updatedAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.namespaces.create({ "name": "example"});Example Response
{ "id": "string", "name": "string", "createdAt": "string", "metadata": { "property1": "string", "property2": "string" }, "updatedAt": "string"}