Set a tenant
Changed onSets a tenant within an environment, performing an upsert operation. Any existing properties will be merged with the incoming properties.
Request
- Base URL: https://api.knock.app
- URL: https://api.knock.app/v1/tenants/{id}
- Auth: HTTP bearer
Path parameters
The unique identifier for the tenant.
Query parameters
When true, merges environment-level default preferences into the tenant's settings.preference_set field before returning the response. Defaults to false.
Request body
Example request
{
"name": "Jurassic Park",
"settings": {
"branding": {
"icon_url": "https://example.com/trex_silhouette_icon.png",
"logo_url": "https://example.com/amber_fossil_logo.png",
"primary_color": "#DF1A22",
"primary_color_contrast": "#FFDE00"
}
}
}Response
OK
Example response
{
"__typename": "Tenant",
"id": "tenant_jp123",
"name": "Jurassic Park",
"settings": {
"branding": {
"dark_icon_url": "https://example.com/trex_silhouette_icon_dark.png",
"dark_logo_url": "https://example.com/amber_fossil_logo_dark.png",
"dark_primary_color": "#FFFFFF",
"dark_primary_color_contrast": "#000000",
"icon_url": "https://example.com/trex_silhouette_icon.png",
"logo_url": "https://example.com/amber_fossil_logo.png",
"primary_color": "#DF1A22",
"primary_color_contrast": "#FFDE00"
},
"preference_set": {
"categories": {
"safety": {
"channel_types": {
"email": true,
"push": true
}
}
},
"channel_types": {
"email": true,
"in_app_feed": true,
"push": true
},
"id": "default",
"workflows": {
"park_alert": {
"channel_types": {
"email": true,
"push": true
}
}
}
}
}
}Changes
- info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
/////// - info
added the new optional request property
///////
- info
- breaking
the request property
///became not nullable - breaking
the
///request property type changed frombooleanto no type - breaking
the
////response's property type changed frombooleanto no type for status - info
added
subschema #1subschema #3to the///request propertyanyOflist - info
added
subschema #1subschema #3to the////response propertyanyOflist for the response status
- breaking