Namespaces
Delete a namespace
Deletes an empty namespace. View request and response details for this Samva email API endpoint.
DELETE
Deletes an empty namespace. A namespace that still holds anything conflicts, and the error counts what remains: mailboxes, API keys, webhook endpoints filtered to it, domains, senders, contacts, or template projects. Delete each, or return it to organization level with DELETE /v1/namespaces/{id}/resources/{type}/{resourceId}; mailboxes, keys, and webhook endpoints cannot move and are deleted. Messages keep the namespace they ran in.
apiKeyheader
x-api-key<token>id*stringMatch
^ns_[0-9a-hjkmnp-tv-z]{16,24}$SuccessResponse
application/json- response
success*booleanimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.namespaces.remove({ "id": "example"});Example Response
{ "success": true}