> ## Documentation Index
> Fetch the complete documentation index at: https://fermata-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new account

> Creates a new user treasury account. If a valid stripe token isn't passed, then we will create a stripe customer ID for them



## OpenAPI

````yaml POST /v1/companies/{company_id}/accounts/
openapi: 3.1.0
info:
  version: '0.1'
  title: Fermata API
  summary: >-
    Fermata is a billing engine that supports prepaid balances and real-time
    usage computation
  description: ''
servers:
  - url: https://api.gofermata.com
security:
  - apiKey: []
paths:
  /v1/companies/{company_id}/accounts/:
    post:
      summary: Create a new account
      description: >-
        Creates a new user treasury account. If a valid stripe token isn't
        passed, then we will create a stripe customer ID for them
      operationId: post-accounts
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                email:
                  type: string
                metadata:
                  type: object
                stripe_id:
                  type: string
                  description: >-
                    If a Stripe customer ID already exists for this account,
                    pass it in here, otherwise we'll make one.
                plan_id:
                  type: string
                  description: >-
                    If you specify a plan then all appropriate denominated
                    treasury accounts are created and all parameters are preset
              required:
                - name
                - email
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/account'
      security:
        - apiKey: []
      servers:
        - url: https://api.gofermata.com
components:
  schemas:
    account:
      x-internal: true
      x-stoplight:
        internallyExcluded: true
        errorMessage: This object is set as internal and excluded.
  securitySchemes:
    apiKey:
      type: http
      scheme: basic

````