> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/getting-started-guide.md).

# Getting Started Guide

## TNID API — Getting Started

### 0) What you’ll use

* **Auth endpoints:** `/auth/create_user_otp`, `/auth/token`
* **GraphQL endpoints:** `/user` (for people) and `/company` (for businesses)
* You can try everything with Postman first. [docs.tnid.com+1](https://docs.tnid.com/getting-started/quickstart-1?utm_source=chatgpt.com)

***

### 1) Create (or claim) your individual profile

Think of this as “getting your user login.”

**Step A — Request a one-time code (OTP)**\
Send your phone number (and, if you’re creating a new user, first/last name + email) to **`/auth/create_user_otp`**. You’ll receive an OTP. [docs.tnid.com](https://docs.tnid.com/getting-started/quickstart-1?utm_source=chatgpt.com)

**Step B — Exchange the OTP for a Bearer token**\
Send your **`telephone_number`** and **`otp_code`** to **`/auth/token`**.\
You’ll get an **`access_token`** (Bearer token) that lets you call the **`/user`** GraphQL API. Save it securely. [docs.tnid.com](https://docs.tnid.com/getting-started/quickstart-1?utm_source=chatgpt.com)

**Optional — Update your user profile**\
With your user token, call the **`/user`** GraphQL mutation `updateUser` to set things like `firstName`, `lastName`, `username`, or `aboutMe`. [docs.tnid.com](https://docs.tnid.com/user/update-user-profile)

> Tip: If you prefer a point-and-click test, open Postman → choose **GraphQL** → paste your token into the **Authorization: Bearer** header → target **`/user`**. [docs.tnid.com](https://docs.tnid.com/getting-started/accessing-via-postman-graphql-schema-examples?utm_source=chatgpt.com)

***

### 2) Create your company (as that user)

Once you have a user token, you can make a company and (optionally) mint credentials for it.

**Step A — Create the company profile**\
Call the **`createCompany`** mutation on **`/user`** and provide basics (`legalName`, `profileName`, optional `brandName`, `taxId`, etc.).\
If you include **`provisionCompanyClientSecret: true`**, TNID will also return a **`clientId`/`clientSecret`** you can use for company-level API calls. [docs.tnid.com](https://docs.tnid.com/user/company-features/create-company-profile)

**Step B — (Alternative) Generate company credentials later**\
If you didn’t provision in step A, you can still create client credentials from the TNID UI (Client Secrets) and then exchange **`client_id`/`client_secret`** at **`/auth/token`** to get a **company Bearer token**. Use that token with **`/company`** GraphQL. [docs.tnid.com](https://docs.tnid.com/getting-started/quickstart?utm_source=chatgpt.com)

**Optional — Update your company profile**\
Use the **`updateCompany`** mutation to adjust `legalName`, `brandName`, `yearFounded`, `aboutUs`, etc. (with your **company** token). [docs.tnid.com](https://docs.tnid.com/company/update-company-profile?utm_source=chatgpt.com)

***

### 3) Common “first calls” after setup

**Find companies (to connect with or avoid duplicates)**\
Query `companies` (name, taxId, email, telephoneNumber, webpage) via **`/company`**. Handy when checking if your org already exists. [docs.tnid.com](https://docs.tnid.com/company/search-companies?utm_source=chatgpt.com)

**Invite another company or request a B2B connection**

* Invite by details (e.g., legal name + a rep’s email) using `createB2bInvite`. [docs.tnid.com](https://docs.tnid.com/company/invite-company?utm_source=chatgpt.com)
* Or send a connection request by `invitedCompanyId` with `createB2bConnectionRequest`. [docs.tnid.com](https://docs.tnid.com/company/b2b-features/send-b2b-connection-request?utm_source=chatgpt.com)

**Search for people / see your consumer connections**\
Use `searchPeople` and `b2cConnections` on **`/company`**. [docs.tnid.com+1](https://docs.tnid.com/company/b2c-features/search-people?utm_source=chatgpt.com)

**User-side spam reporting (popular early integration)**\
As a user, call `createSpamReport` / `listSpamReports` on **`/user`** to help your customers report unwanted communications. [docs.tnid.com+1](https://docs.tnid.com/user/spam-reporting-features/create-spam-report?utm_source=chatgpt.com)

***

### 4) Where to point your requests

* **GraphQL**
  * People: **`/user`**
  * Companies: **`/company`** [docs.tnid.com](https://docs.tnid.com/?utm_source=chatgpt.com)
* **Auth**
  * OTP: **`/auth/create_user_otp`**
  * Token exchange: **`/auth/token`** [docs.tnid.com+1](https://docs.tnid.com/getting-started/quickstart-1?utm_source=chatgpt.com)
* **Postman quick start** (browse schema + run mutations with your Bearer token). [docs.tnid.com](https://docs.tnid.com/getting-started/accessing-via-postman-graphql-schema-examples?utm_source=chatgpt.com)

***

### 5) Quick mental model

1. **Become a user** (OTP → token → `/user`).
2. **Create your company** (as that user) and **mint company creds**.
3. **Act as the company** (company token → `/company`) for B2B/B2C, profile updates, invites, etc. [docs.tnid.com+1](https://docs.tnid.com/user/company-features/create-company-profile)
