Namespaces

Move a resource into a namespace

Moves a resource from organization level or another namespace into this one.

POST
/v1/namespaces/{id}/resources

Moves a resource from organization level or another namespace into this one. A domain brings its senders; a sender on a domain cannot move alone (assign the domain); a contact brings its identities; a template brings every template in its project. A moved resource stops being a default. An address or external id the namespace already holds conflicts. Keys scoped to the old namespace stop reaching the resource at once. Mailboxes, API keys, and webhook endpoints keep the namespace they were created in.

x-api-key<token>

In: header

Path Parameters

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

type*NamespaceResourceType

Value in

  • "domain"
  • "sender"
  • "contact"
  • "template"
resourceId*string

The resource's id, such as dom_... for a domain.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/namespaces/string/resources" \  -H "Content-Type: application/json" \  -d '{    "type": "domain",    "resourceId": "string"  }'
{  "type": "domain",  "id": "string",  "namespaceId": "string"}

Related documentation