> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create / Update Tenants

> API to create a new Tenant OR update an existing Tenant



## OpenAPI

````yaml POST /v1/tenant/{tenant_id}
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v1/tenant/{tenant_id}:
    post:
      summary: Create / Update Tenants
      description: API to create a new Tenant OR update an existing Tenant
      operationId: create-tenants
      parameters:
        - name: tenant_id
          in: path
          description: unique identifier of the tenant that you want to create / update
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - tenant_name
              properties:
                tenant_name:
                  type: string
                  description: >-
                    Name of the tenant. You can add company / organization name
                    here
                  default: Awesome Tenant
                logo:
                  type: string
                  description: URL of the tenant logo
                  default: >-
                    https://ik.imagekit.io/l0quatz6utm/suprsend/staging/media/suprsend-only-logo_c8aa27faef118418e8c5bd7b31a1cafc74e09200.png
                primary_color:
                  type: string
                  description: >-
                    Primary color of the tenant - used for designing tenant
                    template. If you don't provide any of the colors for the
                    tenant, SuprSend will assume you want to use the default
                    values, so color settings will automatically be set to the
                    color settings of default tenant.
                  default: '#ff0000'
                secondary_color:
                  type: string
                  description: >-
                    Secondary color of the tenant - not used for designing the
                    default templates. You can however add this property and use
                    it in your templates
                  example: '#00ff00'
                tertiary_color:
                  type: string
                  description: >-
                    Tertiary color of the tenant - not used for designing the
                    default templates. You can however add this property and use
                    it in your templates
                  example: '#0000ff'
                preference_page_url:
                  type: string
                  description: Link of the preference page inside the tenant product
                social_links:
                  type: object
                  description: >-
                    urls of social media accounts of the tenant. If you really
                    want to remove any social link, you must set its value=""
                    (instead of null)
                  properties:
                    website:
                      type: string
                      description: >-
                        link of tenant website. While updating a social link, if
                        you want to remove the link, you must the value=""
                        (instead of null)
                      default: https://suprsend.com
                    facebook:
                      type: string
                      description: tenant facebook page link
                    LinkedIn:
                      type: string
                      description: tenant linkedin page link
                    x:
                      type: string
                      description: tenant x(previously twitter) page link
                    instagram:
                      type: string
                      description: tenant instagram page link
                    medium:
                      type: string
                      description: tenant medium page link
                    discord:
                      type: string
                      description: tenant discord page link
                    telegram:
                      type: string
                      description: tenant telegram page link
                    youtube:
                      type: string
                      description: tenant youtube page link
                    tiktok:
                      type: string
                      description: tenant tiktok page link
                properties:
                  type: object
                  description: >-
                    Custom properties associated with the tenant. Update
                    operation on properties works like upsert on 1st-level keys
                    (i.e., if top-level key doesn't already exist, then it will
                    be added, otherwise its value will be replaced by the new
                    value. All other key-value pairs will remain unchanged).
                  additionalProperties:
                    type: string
      responses:
        '201':
          description: 201 - Created
          content:
            application/json:
              examples:
                Result:
                  value:
                    tenant_id: brand_id
                    tenant_name: Awesome Tenant
                    logo: >-
                      https://ik.imagekit.io/l0quatz6utm/suprsend/staging/media/suprsend-only-logo_c8aa27faef118418e8c5bd7b31a1cafc74e09200.png
                    timezone: null
                    blocked_channels:
                      - email
                    embedded_preference_url: https://app.suprsend.com/settings
                    hosted_preference_domain: preferences.suprsend.com
                    primary_color: '#ff0000'
                    secondary_color: '#0000ff'
                    tertiary_color: '#00ffff'
                    social_links:
                      website: https://suprsend.com
                      facebook: https://www.company.com
                      LinkedIn: ''
                      x: ''
                      instagram: ''
                      medium: ''
                      discord: ''
                      telegram: ''
                      youtube: ''
                    properties:
                      k1: v1
                      address: my company address
                    updated_at: '2025-04-06T21:01:35.359787Z'
              schema:
                type: object
                description: >-
                  Updated Object Payload is returned in response. JSON structure
                  similar to request payload.
        '400':
          description: 400 - Bad Request
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 400
                    error_code: error
                    type: ValidationError
                    message: >-
                      {"tenant_name": ["Ensure this field contains non-html
                      text"]}
                    detail:
                      tenant_name:
                        - Ensure this field contains non-html text
              schema:
                type: object
                description: error code and message detailing the error
      deprecated: false
      security:
        - BearerAuth: []
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.

````

Built with [Mintlify](https://mintlify.com).