file-linesGetting 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+1arrow-up-right


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.comarrow-up-right

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.comarrow-up-right

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.comarrow-up-right

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.comarrow-up-right


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.comarrow-up-right

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.comarrow-up-right

Optional — Update your company profile Use the updateCompany mutation to adjust legalName, brandName, yearFounded, aboutUs, etc. (with your company token). docs.tnid.comarrow-up-right


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.comarrow-up-right

Invite another company or request a B2B connection

Search for people / see your consumer connections Use searchPeople and b2cConnections on /company. docs.tnid.com+1arrow-up-right

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+1arrow-up-right


4) Where to point your requests


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+1arrow-up-right

Last updated

Was this helpful?