Skip to main content
PUT
/
tenants
/
{tenant_id}
Create or Replace a Tenant
curl --request PUT \
  --url https://api.courier.com/tenants/{tenant_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "parent_tenant_id": "<string>",
  "default_preferences": {
    "items": [
      {
        "status": "OPTED_OUT",
        "has_custom_routing": true,
        "custom_routing": [
          "direct_message"
        ],
        "id": "<string>"
      }
    ]
  },
  "properties": {},
  "user_profile": {},
  "brand_id": "<string>"
}'
{
  "id": "<string>",
  "name": "<string>",
  "parent_tenant_id": "<string>",
  "default_preferences": {
    "items": [
      {
        "status": "OPTED_OUT",
        "has_custom_routing": true,
        "custom_routing": [
          "direct_message"
        ],
        "id": "<string>"
      }
    ]
  },
  "properties": {},
  "user_profile": {},
  "brand_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenant_id
string
required

A unique identifier representing the tenant to be returned.

Body

application/json
name
string
required

Name of the tenant.

parent_tenant_id
string | null

Tenant's parent id (if any).

default_preferences
object

Defines the preferences used for the tenant when the user hasn't specified their own.

properties
object | null

Arbitrary properties accessible to a template.

user_profile
object | null

A user profile object merged with user profile on send.

brand_id
string | null

Brand to be used for the account when one is not specified by the send call.

Response

id
string
required

Id of the tenant.

name
string
required

Name of the tenant.

parent_tenant_id
string | null

Tenant's parent id (if any).

default_preferences
object

Defines the preferences used for the account when the user hasn't specified their own.

properties
object | null

Arbitrary properties accessible to a template.

user_profile
object | null

A user profile object merged with user profile on send.

brand_id
string | null

Brand to be used for the account when one is not specified by the send call.