Skip to main content
GET
/
tenants
/
{tenant_id}
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: 'My API Key',
});

const tenant = await client.tenants.retrieve('tenant_id');

console.log(tenant.id);
{
  "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.

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.