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

# Register business

> Create a new Tyms business using a **partner** API key.

<Warning>Call with your **partner** API key in `X-API-Key`. Do not use a business `tyms_sk_` key. After success, use the returned **`api_secret_key`** for all other endpoints.</Warning>


## OpenAPI

````yaml /openapi/adam-v1.json post /register-business
openapi: 3.0.3
info:
  title: Tyms Developer API
  version: 1.0.0
  description: >-
    REST API for Tyms — the AI-Native Accounting Platform for small and
    medium-sized businesses across service, consulting, retail, and
    manufacturing. Paths are appended to the server URL.


    **Business key** (`tyms_sk_...`): all routes except partner distributor
    routes and OAuth authorization steps that document their own auth. **Partner
    key** (`adam_partner_sk_...` or equivalent): `POST /register-business`, `GET
    /referred-businesses`, billing status, and seat/credit grants on referred
    businesses. **OAuth**: integration apps use `tyms_pk_...` / `tyms_sk_...`
    plus user Bearer tokens — see the OAuth guide.


    Financial reports match what you see in the Tyms app. AI create endpoints
    accept optional attachment objects (`name`, `file`, `type`) — see the
    Attachments page in this docs site.
servers:
  - url: https://staging-api.usetyms.com/v1/adam
    description: Sandbox (pre-production). Request credentials at developer@usetyms.com.
  - url: https://api.usetyms.com/v1/adam
    description: Production
security:
  - apiKey: []
tags:
  - name: Partners
    description: >-
      Referral partner (distributor) flows — partner API key only. Register
      businesses, list referrals, read billing, and grant Plus seats or AI
      credits from partner holding.
  - name: Authentication
    description: Validate a business Developer API key.
  - name: OAuth
    description: >-
      Third-party integration authorization — connect Tyms users to your app
      without sharing their business secret keys.
  - name: Chart of accounts
    description: COA and bank-linked accounts.
  - name: Invoices
    description: Invoice CRUD and payments.
  - name: Bills
    description: Bill CRUD and payments.
  - name: Expenses
    description: Expense CRUD.
  - name: Income
    description: Income record CRUD.
  - name: Journals
    description: Journal entry CRUD.
  - name: Contacts
    description: Contact CRUD.
  - name: Banks
    description: Bank accounts.
  - name: Bank transactions
    description: Statement lines and AI-assisted upload.
  - name: Reports
    description: Financial statements (aligned with in-app reports).
  - name: Inventory
    description: Product and service catalog; stock tracking, sell, and restock.
  - name: Fixed Assets
    description: Capital asset acquisition and tracking.
  - name: Quotes
    description: >-
      Sales proposals that can be converted to invoices, income, or prepaid
      income.
  - name: Purchase Orders
    description: Vendor buying commitments that convert to inventory restocks.
  - name: Departments
    description: Reporting dimension for cost/profit allocation within a branch.
  - name: Projects
    description: Job costing and project tracking dimension attached to transactions.
  - name: Branches
    description: Multi-location dimension; reports and lists can filter by branch.
paths:
  /register-business:
    post:
      tags:
        - Partners
      summary: Register business
      description: Create a new Tyms business using a **partner** API key.
      operationId: registerBusiness
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterBusinessRequest'
      responses:
        '200':
          description: >-
            Business created; `api_secret_key` only when `grant_access` is
            `admin`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterBusinessSuccess'
              example:
                status: success
                message: Business registered successfully.
                data:
                  business_uuid: 550e8400-e29b-41d4-a716-446655440000
                  name: Smith Enterprises
                  currency: USD
                  country: US
                  api_public_key: tyms_pk_example
                  api_secret_key: tyms_sk_example
        '401':
          description: Invalid partner key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: failed
                message: >-
                  Invalid partner API key. Use your distributor partner secret,
                  not a business tyms_sk key.
components:
  schemas:
    RegisterBusinessRequest:
      type: object
      example:
        email: owner@example.com
        firstname: Jane
        lastname: Smith
        business_name: Smith Enterprises
        password: Secure1!
        country: US
        currency: USD
        timezone: America/New_York
        grant_access: admin
        credit_from_referral_partner: false
      required:
        - email
        - firstname
        - lastname
        - business_name
        - password
      properties:
        email:
          type: string
          format: email
        firstname:
          type: string
        lastname:
          type: string
        business_name:
          type: string
        password:
          type: string
          minLength: 8
          description: >-
            Owner account password. Must be at least 8 characters and include a
            letter, a number, and a special character (e.g. !@#$%^&*).
          example: Secure1!
        country:
          type: string
          default: US
        currency:
          type: string
          default: USD
        timezone:
          type: string
          default: America/New_York
        industry:
          type: string
        grant_access:
          type: string
          enum:
            - admin
            - viewer
            - editor
          description: >-
            `admin` returns `api_public_key` and `api_secret_key` in the
            response.
        credit_from_referral_partner:
          type: boolean
          default: false
          description: >-
            When `true`, Tyms credit usage for this business is charged to the
            referring partner's credit balance in the partner portal (the
            partner manages credit for the business). Optional; defaults to
            `false`.
    RegisterBusinessSuccess:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
        data:
          type: object
          properties:
            business_uuid:
              type: string
            name:
              type: string
            currency:
              type: string
            country:
              type: string
            api_public_key:
              type: string
            api_secret_key:
              type: string
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: failed
        message:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Business secret `tyms_sk_...` for business-scoped routes. Partner secret
        for register-business and referred-business distributor routes.
      x-default: your_tyms_sk_or_partner_key

````

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