Skip to Content

Return a resource to organization level

Moves a resource out of this namespace to organization level, with what follows it as in `POST /v1/namespaces/{id}/resources`.

DELETE
/v1/namespaces/{id}/resources/{type}/{resourceId}

Moves a resource out of this namespace to organization level, with what follows it as in POST /v1/namespaces/{id}/resources. A resource in a different namespace is not found.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^ns_[0-9a-hjkmnp-tv-z]{16,24}$
type*string
Value in"domain""sender""whatsappNumber""smsNumber""contact""template"
resourceId*string

Response Body

NamespaceResource

application/json
  1. response
type*NamespaceResourceType
Value in"domain""sender""whatsappNumber""smsNumber""contact""template"
id*string
namespaceId*|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.namespaces.removeResource({
  "id": "example",
  "type": "domain",
  "resourceId": "example"
});
Example Response
{
  "type": "domain",
  "id": "string",
  "namespaceId": "string"
}

Related documentation