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

# Create Organization Tenant

> Create a tenant in an organization and return it. The tenant is a demo tenant when the organization is a service firm and a regular tenant otherwise. `name` must not be empty and `identifier_limit`, when given, cannot be higher than the identifier limit of the organization's plan. Requires write permission on the tenants of the organization (on its demo tenants for a service firm).

&#x20;Required API key permission: **Write Organization Admin**


## OpenAPI

````yaml firework-v2-openapi post /firework/v2/organizations/{organization_id}/tenants
openapi: 3.0.1
info:
  description: >

    Manage and access Firework resources.


    Requests are authenticated with API tokens, which are obtained using an API
    key:


    1. Generate an API key from the [Profile
    page](https://app.flare.io/#/profile).

    2. Send a `POST` request to `https://api.flare.io/tokens/generate` with the
    `Authorization: <api-key>` header to get an API token. API tokens expire
    after 1 hour.

    3. Call the API endpoints with the `Authorization: Bearer <api-token>`
    header.


    See [Authentication](https://api.docs.flare.io/concepts/authentication) for
    details.
  title: Firework API
  version: v2
servers:
  - url: https://api.flare.io/
security:
  - BearerAuth: []
tags:
  - description: >-
      The authenticated user, its API keys, organizations, tenants, onboarding
      and usage.
    name: Account
  - description: >-
      Events collected by Flare: global search, tenant and identifier feeds,
      event details, actions and saved feed views.
    name: Events
  - description: >-
      Identifiers are the assets a tenant monitors, such as domains, keywords
      and email addresses. Includes recommendations and authorization of
      sensitive identifiers.
    name: Identifiers
  - description: Report groups, reports, their sections, schedules and delivery channels.
    name: Reports
paths:
  /firework/v2/organizations/{organization_id}/tenants:
    post:
      tags:
        - Account
      summary: Create a tenant
      description: >-
        Create a tenant in an organization and return it. The tenant is a demo
        tenant when the organization is a service firm and a regular tenant
        otherwise. `name` must not be empty and `identifier_limit`, when given,
        cannot be higher than the identifier limit of the organization's plan.
        Requires write permission on the tenants of the organization (on its
        demo tenants for a service firm).
      operationId: post_organization_tenants_api
      parameters:
        - description: ID of the organization.
          in: path
          name: organization_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTenantInfo'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tenant'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            The tenant cannot be created. Codes: `NO_EMPTY_TENANT_NAME` (empty
            name), `INVALID_IDENTIFIER_LIMIT` (limit higher than the
            organization's), `CANT_CREATE_TENANT_IN_ORGANIZATION` (tenant type
            not allowed in this organization).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            Codes: `FORBIDDEN` (the caller cannot create tenants in this
            organization), `DEMO_TENANT_LIMIT_REACHED` (the organization reached
            its demo tenant limit).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            The organization does not exist or is not visible to the caller
            (code `NOT_FOUND`).
components:
  schemas:
    NewTenantInfo:
      properties:
        name:
          description: Display name of the tenant; must not be empty.
          type: string
        description:
          description: Free text describing the purpose of the tenant.
          type: string
        industry:
          description: Industry of the tenant.
          enum:
            - global
            - transport
            - education
            - energy
            - finance
            - healthcare
            - manufacturing
            - retail
            - software
            - telecommunication
          example: global
          type: string
      type: object
    Tenant:
      properties:
        id:
          description: Tenant ID
          type: integer
        name:
          description: Tenant name
          type: string
        type:
          description: Tenant type
          type: string
        description:
          description: This tenant's purpose
          type: string
        organization_id:
          description: ID of the owner organization
          type: integer
        urn:
          description: The uniform resource name of the tenant.
          type: string
        number_of_employees:
          description: The number of employees for the tenant.
          type: integer
        industry:
          description: The industry of the tenant.
          type: string
        is_disabled:
          description: Indicates if the tenant is disabled
          type: boolean
        is_archived:
          description: Indicates if the tenant is archived
          type: boolean
        feed_id:
          description: ID of the feed
          type: integer
        permissions:
          items:
            type: string
          type: array
        prevent_global_search:
          description: Indicates if the tenant can perform global searches
          type: boolean
      type: object
    HttpError:
      properties:
        message:
          description: Human-readable description of the error.
          type: string
        code:
          description: Machine-readable error code.
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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