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

# Create service account

> Create a new service account in the workspace. By default, a workspace can have up to 20 service accounts. Enterprise customers may request an increase to this limit.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/service-accounts
openapi: 3.1.0
info:
  title: Threetone API
  description: >-
    APIs for the Threetone Agents Platform and shared workspace resources.
    Authenticate programmatic requests with an API key in the x-api-key header.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/service-accounts:
    post:
      tags:
        - workspace
      summary: Create service account
      description: >-
        Create a new service account in the workspace. By default, a workspace
        can have up to 20 service accounts. Enterprise customers may request an
        increase to this limit.
      operationId: create_service_account
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_create_service_account_v1_service_accounts_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/WorkspaceCreateServiceAccountResponseModel
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_create_service_account_v1_service_accounts_post:
      properties:
        name:
          type: string
          title: Name
        default_sharing_groups:
          anyOf:
            - items:
                $ref: '#/components/schemas/DefaultSharingGroupConfig'
              type: array
            - type: 'null'
          title: Default Sharing Groups
          description: >-
            List of groups with their permission levels to share with by
            default. Each entry should specify a group_id and a permission_level
            (admin, editor, or viewer).
      type: object
      required:
        - name
      title: Body_create_service_account_v1_service_accounts_post
    WorkspaceCreateServiceAccountResponseModel:
      properties:
        service-account-user-id:
          type: string
          title: Service-Account-User-Id
      type: object
      required:
        - service-account-user-id
      title: WorkspaceCreateServiceAccountResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DefaultSharingGroupConfig:
      properties:
        group_id:
          type: string
          title: Group Id
          description: The ID of the group to share with
        permission_level:
          type: string
          enum:
            - admin
            - editor
            - viewer
          title: Permission Level
          description: The permission level to grant to the group
      type: object
      required:
        - group_id
        - permission_level
      title: DefaultSharingGroupConfig
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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