---
title: "Bulk set tenants"
method: POST
path: "/v1/tenants/bulk/set"
tags: ["Tenants", "Bulk operations"]
---

# Bulk set tenants

`POST /v1/tenants/bulk/set`

Set or update up to 1,000 tenants in a single operation.

## Request body

- BulkSetTenantsRequest — A request to set tenants in bulk.
  - `tenants` InlineTenantRequest[], required — The tenants to be upserted.
    - union — An request to set a tenant inline.
      - string — The unique identifier for the tenant.
      - object — A tenant to be set in the system. You can supply any additional properties on the tenant object.
        - `channel_data` union — The channel data for the tenant.
          - unknown
          - object — A request to set channel data for a type of channel inline.
        - `id` string, required — The unique identifier for the tenant.
        - `name` string, nullable — An optional name for the tenant.
        - `preferences` union — The preferences for the tenant.
          - unknown
          - object — Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.
        - `settings` object — The settings for the tenant. Includes branding and preference set.
          - `branding` object — The branding for the tenant.
            - `icon_url` string, nullable — The icon URL for the tenant. Must point to a valid image with an image MIME type.
            - `logo_url` string, nullable — The logo URL for the tenant. Must point to a valid image with an image MIME type.
            - `primary_color` string, nullable — The primary color for the tenant, provided as a hex value.
            - `primary_color_contrast` string, nullable — The primary color contrast for the tenant, provided as a hex value.
          - `preference_set` union — The preference set for the tenant. Used to override the default preference set.
            - unknown
            - object — A request to set a preference set for a recipient.
              - …

## Response `200`

OK

- BulkOperation — A bulk operation entity.
  - `__typename` string, required — The typename of the schema.
  - `completed_at` string, date-time, nullable — Timestamp when the bulk operation was completed.
  - `error_count` integer — The number of failed operations.
  - `error_items` object[] — A list of items that failed to be processed.
    - `collection` string, nullable — The collection this object belongs to.
    - `id` string, required — Unique identifier for the object.
  - `estimated_total_rows` integer, required — The estimated total number of rows to process.
  - `failed_at` string, date-time, nullable — Timestamp when the bulk operation failed.
  - `id` string, uuid, required — Unique identifier for the bulk operation.
  - `inserted_at` string, date-time, required — Timestamp when the resource was created.
  - `name` string, required — The name of the bulk operation.
  - `processed_rows` integer, required — The number of rows processed so far.
  - `progress_path` string, uri — The URI to the bulk operation's progress.
  - `started_at` string, date-time, nullable — Timestamp when the bulk operation was started.
  - `status` 'queued' | 'processing' | 'completed' | 'failed', required — The status of the bulk operation.
  - `success_count` integer, required — The number of successful operations.
  - `updated_at` string, date-time, required — The timestamp when the resource was last updated.

---

[API](https://skmtc.net/knocklabs/apis/knock-api.md) · [All operations](https://skmtc.net/knocklabs/apis/knock-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/knocklabs/knock-api/revisions/4b8499dddbc5/schema)
