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

# Update a tenant

> Changes the fields you send. `is_active` false offboards the tenant, and true switches it on again. Needs the `tenants:write` scope.



## OpenAPI

````yaml /openapi/partner.yaml patch /api/v1/partner/tenants/{external_ref}/
openapi: 3.1.0
info:
  title: ImpelLabs Partner API
  version: '1'
  description: >-
    The Partner API provisions customer businesses (tenants) and runs their
    channels, conversations and templates from your own product. Call it from
    your server with a partner key. Every path ends with a slash.
servers:
  - url: https://api.impellabs.tech
security:
  - bearer: []
tags:
  - name: Keys
    description: Your partner API keys.
  - name: Tenants
    description: Customer businesses, their channels, conversations and templates.
  - name: Webhooks
    description: Where your tenants' events go.
  - name: WhatsApp sign-up
    description: The settings of the hosted WhatsApp sign-up.
paths:
  /api/v1/partner/tenants/{external_ref}/:
    patch:
      tags:
        - Tenants
      summary: Update a tenant
      description: >-
        Changes the fields you send. `is_active` false offboards the tenant, and
        true switches it on again. Needs the `tenants:write` scope.
      operationId: patch_api_v1_partner_tenants_external_ref
      parameters:
        - name: external_ref
          in: path
          required: true
          schema:
            type: string
          description: Your own id for the customer business, set when you created it.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The business name.
                monthly_credit_cap:
                  type: integer
                  minimum: 0
                  description: The credit cap for a month. 0 removes the cap.
                is_active:
                  type: boolean
                  description: False offboards the tenant. True switches it on.
                plan:
                  type: string
                  description: The slug of one of your active plans.
            example:
              monthly_credit_cap: 8000
        required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                external_ref: acme-001
                id: 2f1c0b9e-0000-4000-8000-000000000000
                name: Acme Dental
                plan: free
                status: active
                billed_to: partner
                billing_mode: payg
                monthly_credit_cap: 5000
                is_active: true
                created_at: '2026-01-15T09:30:00+00:00'
        '400':
          $ref: '#/components/responses/Invalid'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        4XX:
          description: The request is not valid or not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  responses:
    Invalid:
      description: >-
        A field is missing or wrong. The body names each field: {"field": "what
        to fix"}.
    Unauthorized:
      description: The credentials are missing, wrong, expired or revoked.
    Forbidden:
      description: These credentials may not do this.
    NotFound:
      description: There is no such row, or these credentials cannot see it.
  schemas:
    Error:
      type: object
      description: >-
        An error. Most errors carry `detail`. Some carry `error` with `code` and
        `message`.
      properties:
        detail:
          type: string
        code:
          type: string
        field:
          type: string
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.