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

# Onboard organization

> Sign-up second step: creates the caller's organization (or reuses the one
it has) and its first tenant, then announces `tenant:created`. Takes a
central-auth access token (`Bearer tq_at_...`) of an account that already
has an operator (`POST /v1/operators/onboarding`).

Every call creates a new tenant: an operator may own several, all in its
one organization. Not idempotent: a retried call creates another tenant.

The response carries no token. Refresh the access token afterwards so it
lists the new tenant.



## OpenAPI

````yaml /api/services-api.yaml post /v1/organizations/onboarding
openapi: 3.0.3
info:
  description: >-
    Talqui is an omnichannel customer service platform that unifies
    conversations from WhatsApp, Instagram, Telegram, and many other channels
    into a single attendant panel, alongside a broader ecosystem of plugins and
    integrations. This API gives developers programmatic access to Talqui's
    services layer, exposing the operations needed to read and manage tenants,
    conversations, plugins, and related resources that power that platform.


    Authentication is available on behalf of an Operator (the default for this
    API), a Plugin Connection, or a Plugin — see the [Talqui authentication
    guide](https://docs.talqui.chat/guides/introduction/authentication/) for how
    each token is obtained and when to use it.


    Need help or have questions not covered here? Reach out to
    support@talqui.com.
  license:
    name: ISC
    url: https://opensource.org/license/isc-license-txt
  title: Talqui - Services API
  version: 0.123.0
servers:
  - description: Production
    url: https://services-api.talqui.chat
security: []
tags:
  - name: Tenants
  - name: Settings
  - name: Analytics/Reports
  - name: Analytics
  - name: Campaigns
  - name: Campaigns/Models
  - name: Contacts
  - name: Contacts/Imports
  - name: Handoff links
  - name: Inboxes
  - name: Messages
  - name: Notifications
  - name: Sessions
  - name: Operators/Shortcuts
  - name: Operators
  - name: Plugins
  - name: Milestones
  - name: Invites
  - name: Organizations
paths:
  /v1/organizations/onboarding:
    post:
      tags:
        - Organizations
      summary: Onboard organization
      description: >-
        Sign-up second step: creates the caller's organization (or reuses the
        one

        it has) and its first tenant, then announces `tenant:created`. Takes a

        central-auth access token (`Bearer tq_at_...`) of an account that
        already

        has an operator (`POST /v1/operators/onboarding`).


        Every call creates a new tenant: an operator may own several, all in its

        one organization. Not idempotent: a retried call creates another tenant.


        The response carries no token. Refresh the access token afterwards so it

        lists the new tenant.
      operationId: OnboardOrganizationController
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                organizationName:
                  description: Company name.
                  minLength: 1
                  type: string
                organizationWebsite:
                  description: Company website, stored lowercased.
                  minLength: 1
                  type: string
                tenantCompanySize:
                  description: Company size bucket, in number of employees.
                  enum:
                    - 1-15
                    - 16-49
                    - 50-199
                    - 200-1999
                    - 2000+
                  type: string
                tenantKind:
                  default: OTHERS
                  description: Business segment, e.g. `PROVIDER_IXC`.
                  minLength: 1
                  type: string
                tenantKindOther:
                  description: >-
                    Free-text segment typed by the user when `tenantKind` is
                    `CORP_OTHERS`. Trimmed; a blank value is ignored.
                  maxLength: 100
                  type: string
                tenantName:
                  description: Name of the first workspace.
                  maxLength: 64
                  minLength: 3
                  type: string
                tenantWebsite:
                  description: Website of the first workspace.
                  minLength: 1
                  type: string
                trialDays:
                  default: 0
                  description: Extra trial days requested at sign-up.
                  maximum: 15
                  minimum: 0
                  type: integer
              required:
                - organizationName
                - organizationWebsite
                - tenantName
                - tenantWebsite
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      created:
                        description: 'Always `true`: every call creates a tenant.'
                        enum:
                          - true
                        type: boolean
                      organization:
                        additionalProperties: false
                        description: >-
                          The operator organization, created with its first
                          tenant.
                        properties:
                          createdAt:
                            description: When the organization was created.
                            format: date-time
                            type: string
                          createdBy:
                            description: Operator who created it.
                            type: string
                          organizationID:
                            description: The organization identifier.
                            type: string
                          organizationMeta:
                            additionalProperties: {}
                            description: Arbitrary metadata.
                            type: object
                          organizationName:
                            description: Company name.
                            type: string
                          organizationWebsite:
                            description: Company website.
                            type: string
                          updatedAt:
                            description: When the organization was last updated.
                            format: date-time
                            type: string
                        required:
                          - organizationID
                          - organizationName
                          - organizationWebsite
                          - organizationMeta
                          - createdAt
                          - createdBy
                          - updatedAt
                        type: object
                      tenant:
                        additionalProperties: false
                        description: The tenant just created.
                        properties:
                          createdAt:
                            description: When the tenant was created.
                            format: date-time
                            type: string
                          createdBy:
                            description: Operator who created the tenant.
                            type: string
                          lastSignInAt:
                            description: When somebody last signed in to this tenant.
                            format: date-time
                            nullable: true
                            type: string
                          organizationID:
                            description: The Talqui organization this tenant belongs to.
                            type: string
                          ownerID:
                            description: The operator who owns the tenant.
                            type: string
                          subscriptionID:
                            description: Billing subscription, when the tenant has one.
                            nullable: true
                            type: string
                          tenantDescription:
                            description: Free-text description.
                            type: string
                          tenantID:
                            description: The tenant identifier.
                            type: string
                          tenantLogo:
                            description: Logo URL, when set.
                            nullable: true
                            type: string
                          tenantMeta:
                            additionalProperties: {}
                            description: Arbitrary metadata attached to the tenant.
                            type: object
                          tenantName:
                            description: Display name.
                            type: string
                          tenantOperatorRoles:
                            additionalProperties: false
                            description: Role groups inside the tenant.
                            properties:
                              managers:
                                description: >-
                                  Operators holding the manager role in this
                                  tenant.
                                items:
                                  type: string
                                type: array
                              owners:
                                description: >-
                                  Operators holding the owner role in this
                                  tenant.
                                items:
                                  type: string
                                type: array
                            required:
                              - owners
                              - managers
                            type: object
                          tenantOperatorsIDs:
                            description: Every operator who is a member of this tenant.
                            items:
                              type: string
                            type: array
                          tenantSettings:
                            additionalProperties: {}
                            description: >-
                              Tenant configuration bag: sessions, routing,
                              messages, business hours and inbox visibility.
                            type: object
                          tenantWebsite:
                            description: The tenant public website.
                            type: string
                          updatedAt:
                            description: When the tenant was last updated.
                            format: date-time
                            type: string
                          updatedBy:
                            description: Operator who last updated the tenant.
                            type: string
                        required:
                          - tenantID
                          - organizationID
                          - tenantName
                          - tenantDescription
                          - tenantWebsite
                          - tenantLogo
                          - tenantOperatorsIDs
                          - tenantOperatorRoles
                          - tenantMeta
                          - ownerID
                          - createdAt
                          - updatedAt
                        type: object
                    required:
                      - organization
                      - tenant
                      - created
                    type: object
                required:
                  - data
                type: object
          description: Response for status 201.
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/RequestValidationError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            RequestValidationError (error_code 1002): request body fails schema
            validation.
        '401':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/UnauthorizedError'
                        - $ref: '#/components/schemas/InvalidTokenError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            UnauthorizedError (error_code 1003): missing access token. |
            InvalidTokenError (error_code 1028): not an access token, or it is
            expired or revoked.
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/OperatorNotFoundError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            OperatorNotFoundError (error_code 1064): the account has no operator
            yet.
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnknownError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            UnknownError (error_code 5999): Unexpected internal error not
            otherwise documented for this endpoint.
components:
  schemas:
    RequestValidationError:
      additionalProperties: false
      properties:
        error:
          enum:
            - RequestValidationError
          type: string
        error_code:
          enum:
            - 1002
          type: number
        fields:
          items:
            additionalProperties: false
            properties:
              allowed:
                type: string
              field:
                type: string
              received:
                type: string
            required:
              - field
              - received
              - allowed
            type: object
          type: array
        message:
          example: Invalid request data.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
        - fields
      type: object
    UnauthorizedError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnauthorizedError
          type: string
        error_code:
          enum:
            - 1003
          type: number
        message:
          example: You are not authorized to perform this request.
          type: string
        statusCode:
          enum:
            - 401
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    InvalidTokenError:
      additionalProperties: false
      properties:
        error:
          enum:
            - InvalidTokenError
          type: string
        error_code:
          enum:
            - 1028
          type: number
        message:
          example: Connection token is invalid or expired.
          type: string
        statusCode:
          enum:
            - 401
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    OperatorNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - OperatorNotFoundError
          type: string
        error_code:
          enum:
            - 1064
          type: number
        message:
          example: Operator not found.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    UnknownError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnknownError
          type: string
        error_code:
          enum:
            - 5999
          type: number
        message:
          example: For some unknown reason your request has not succeeded.
          type: string
        statusCode:
          enum:
            - 500
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object

````

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