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

# Create a subaccount — CreateAssistants Direct (name), or provision from a GoHighLevel Location ID (location_id)

> Requires scope `subaccounts:create`.



## OpenAPI

````yaml /direct/openapi.json post /v3/subaccounts
openapi: 3.1.0
info:
  title: Assistable Direct API
  version: 3.0.0
  description: >-
    The Assistable Direct API — the same v3 endpoints, for native (GHL-free)
    Direct sub-accounts. Provision a Direct sub-account, manage its users, fund
    its wallet, then drive assistants, contacts, conversations, chat, knowledge,
    tools, calls and more — all scoped by sub-account, with zero GoHighLevel.
    (Appointments are not yet available on Direct.)
servers:
  - url: https://api.assistable.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v3/subaccounts:
    post:
      tags:
        - Subaccounts
      summary: >-
        Create a subaccount — CreateAssistants Direct (name), or provision from
        a GoHighLevel Location ID (location_id)
      description: Requires scope `subaccounts:create`.
      operationId: createSubaccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: >-
                    Display name for a new CreateAssistants Direct (CRM-free)
                    subaccount. Provide EITHER name OR location_id, not both.
                  type: string
                  minLength: 1
                location_id:
                  description: >-
                    GoHighLevel Location ID to provision a GHL-connected
                    subaccount from. Requires the key's workspace to have
                    completed agency-level GHL OAuth. Idempotent per location.
                    Provide EITHER name OR location_id, not both.
                  type: string
                  minLength: 1
              additionalProperties: false
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SubAccount'
                  error:
                    type: 'null'
                  request_id:
                    type: string
                required:
                  - data
                  - request_id
        '400':
          description: Invalid request (validation_error / subaccount_required)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Insufficient scope or subaccount not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Resource not found (not_found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate limit exceeded (rate_limited)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    SubAccount:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        integrationType:
          type: string
        integrationId:
          anyOf:
            - type: string
            - type: 'null'
        locationId:
          anyOf:
            - type: string
            - type: 'null'
        webhookUrl:
          anyOf:
            - type: string
            - type: 'null'
        webhookSecret:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Signing secret for the Direct inbound webhook listener. Returned
            ONCE in the create response — store it then; it is always null on
            list and get and cannot be retrieved again.
        createdAt:
          type: string
      required:
        - id
        - name
        - integrationType
        - integrationId
        - locationId
        - webhookUrl
        - webhookSecret
        - createdAt
      additionalProperties: false
    ApiError:
      type: object
      properties:
        data:
          type: 'null'
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
        request_id:
          type: string
      required:
        - error
        - request_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your v3 API key, e.g. `ask_live_…`

````

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