> ## 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.

# Partners and Register business

> How Adam referral partners onboard businesses and use the Register business API with a partner key.

Adam works with **referral business partners** (distributors): organizations or individuals who introduce new small businesses to the platform. Partners may earn **commissions** or work on **prepaid** commercial terms on behalf of those businesses—commercial terms are agreed during **partner onboarding** with Adam, not via this public API.

This page explains the **integration story**. Every request field for **`POST /register-business`** is documented under [Register business](/api-reference/register-business).

## Becoming a partner

1. **Apply and onboard** through Adam’s partner program (sales or partner operations). Adam registers you as a referral business partner and issues **partner API credentials** (partner secret key, often prefixed like `adam_partner_sk_...`).
2. **Agree commercial terms** (revenue share, prepaid wallets, support expectations, branding, etc.). Those details are **not** exposed on the Developer API; they are contractual.
3. **Integrate** using your partner key **only** for registration, then each business’s **`tyms_sk_...`** for everything else.

<Warning>
  Do **not** call **`POST /register-business`** with a business `tyms_sk_` key. That route expects a **partner** credential issued through Adam’s partner program. Use the partner secret in `X-API-Key` (or `api-key` / `sk`).
</Warning>

## Why Register business exists

Partners often need to:

* **Create** the Tyms business and owner account in one step.
* Optionally become an **admin** on that business so they can finish setup or support the owner.
* Optionally receive that business’s **Developer API keys** in the response so they can automate bookkeeping **on behalf of** the business they referred.

Only businesses created through this **partner** flow are attributed to you as referrer in Adam’s systems. You receive **`api_secret_key`** in the success payload **only** when registration succeeds **and** you requested `grant_access: admin` (see reference).

## End-to-end integration flow

<Steps>
  <Step title="Partner authentication">
    Obtain your **partner secret** from Adam after partner onboarding. Use it exclusively for [Register business](/api-reference/register-business).
  </Step>

  <Step title="Register the business">
    `POST /v1/adam/register-business` with JSON body: owner profile, `business_name`, `password`, optional locale fields, optional `credit_from_referral_partner` (boolean, default `false` — bill Adam credit usage to the partner’s partner-portal balance), and `grant_access` (`admin` | `editor` | `viewer`). On success you receive `business_uuid` and business metadata; with `grant_access: admin` you also receive `api_public_key` and `api_secret_key`.
  </Step>

  <Step title="Integrate as the business">
    Call **`GET /auth/validate`**, **`POST /invoices`**, **`GET /reports/income-statement`**, etc., with **`X-API-Key: tyms_sk_...`** from the registration response — **not** the partner key.
  </Step>
</Steps>

## API surface

Use **`POST /register-business`** on the **Developer API** base URL so partner registration and all later calls stay on the same **`v1/adam`** surface.

## Support

* **API support:** [developer@useadam.io](mailto:developer@useadam.io)
* **Partner program enrollment:** contact your Adam partner representative or [developer@useadam.io](mailto:developer@useadam.io) if you do not yet have partner credentials.
