Namespaces

Delete a namespace

Deletes an empty namespace. View request and response details for this Samva email API endpoint.

DELETE
/v1/namespaces/{id}

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.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^ns_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

SuccessResponse

application/json
  1. response
success*boolean
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.namespaces.remove({  "id": "example"});
Example Response
{  "success": true}

Related documentation