Sandbox keys are prefixed sk_test_, production keys sk_live_. Get a sandbox key instantly via self-signup; production keys require a KYC-approved organization.
Sending your key
Authorization header
Authorization: Bearer sk_test_xxxxxxxxxxxx
# or
x-api-key: sk_test_xxxxxxxxxxxx
API Key Authentication
Bearer API key + scopes
Endpoint
GET (applies to every /v1/* endpoint)
GET(applies to every /v1/* endpoint)Live
Every protected endpoint requires either Authorization: Bearer <key> or an x-api-key: <key> header. Keys are environment-scoped (SANDBOX sk_test_... vs PRODUCTION sk_live_...) and carry a list of OAuth-style scopes (e.g. verification.pan.read, orders.create, payments.write). Sensitive scopes can additionally be restricted to an IP allowlist. Requests are also subject to per-endpoint rate limits enforced server-side.
Example
Make the call
curl -X GET "https://api-b2b.stampmitra.in(applies to every /v1/* endpoint)" \
-H "Authorization: Bearer sk_test_xxxxxxxxxxxx"
Playground
Try it
This endpoint is planned and has no backend yet, so it can't be called.
Dashboard Login (Email + Password + OTP)
Sign up a dashboard user (email + password)
Endpoint
POST /v1/auth/password/signup
POST/v1/auth/password/signupLive
Creates an Organization (or joins none - organizationName is optional and auto-creates a personal workspace when omitted) and an owner User with a bcrypt-hashed password. Sets no session yet; a verification email is sent. Rate-limited per-IP and per-email.
Request
Request parameters
Request parameters
Field
Type
Description
fullNamerequired
string
1-150 characters.
emailrequired
string
Valid email address.
passwordrequired
string
10-72 chars; must include upper, lower, digit and symbol.
organizationName
string
Up to 200 characters. Omit to auto-create a personal workspace.
{
"organizationId": "org_5f2c1a9b3d7e4f6a",
"userId": "usr_2b8e4d4a5fc9f3a1",
"message": "Signup successful. Check your email to verify your account."
}
Response fields
Field
Type
organizationId
string
userId
string
message
string
Errors
Error responses
400Weak password
{
"error": {
"code": "BAD_REQUEST",
"message": "password must be at least 10 characters and include an uppercase letter, a lowercase letter, a digit and a symbol",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
409Email already registered
{
"error": {
"code": "CONFLICT",
"message": "A record with these details already exists.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
429Rate limited
{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit exceeded: 60 requests per 60 seconds for this endpoint.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
Verifies the email/password pair and, on success, emails a one-time code and returns a challengeId. No session is created yet - call verify-otp with the code to finish logging in.
{
"error": {
"code": "BAD_REQUEST",
"message": "This code is invalid or has expired.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
429Rate limited
{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit exceeded: 60 requests per 60 seconds for this endpoint.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
Notes
Good to know
Note
The response's Set-Cookie header (not shown above) carries the httpOnly session cookie; the frontend must send credentials: "include" on every subsequent password-auth call.
Get the current session's user
Endpoint
GET /v1/auth/password/me
GET/v1/auth/password/meLive
Returns the logged-in user for the current session cookie.
Example
Make the call
curl -X GET "https://api-b2b.stampmitra.in/v1/auth/password/me" \
-H "Authorization: Bearer sk_test_xxxxxxxxxxxx"
{
"error": {
"code": "BAD_REQUEST",
"message": "This verification link is invalid or has expired.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
Resend the email-verification link
Endpoint
POST /v1/auth/password/resend-verification
POST/v1/auth/password/resend-verificationLive
Rate-limited per-email; sends a fresh verification email if the account exists and is unverified.
{
"error": {
"code": "BAD_REQUEST",
"message": "password must be at least 10 characters and include an uppercase letter, a lowercase letter, a digit and a symbol",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
Team Management
Invite a member by email + role
Endpoint
POST /v1/team/invites
POST/v1/team/invitesLive
Owner/Admin only. Creates a pending invite and emails an accept link. Rate-limited per-IP and per-email.
Request
Request parameters
Request parameters
Field
Type
Description
emailrequired
string
Invitee's email.
rolerequired
string
One of ADMIN, MEMBER (OWNER cannot be granted via invite).
{
"error": {
"code": "FORBIDDEN",
"message": "API key is valid but lacks the required scope for this endpoint.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
429Rate limited
{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit exceeded: 60 requests per 60 seconds for this endpoint.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
List pending invites
Endpoint
GET /v1/team/invites
GET/v1/team/invitesLive
Owner/Admin only.
Example
Make the call
curl -X GET "https://api-b2b.stampmitra.in/v1/team/invites" \
-H "Authorization: Bearer sk_test_xxxxxxxxxxxx"
{
"error": {
"code": "BAD_REQUEST",
"message": "Cannot change the role of the organization's last owner.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
404Resource not found
{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "Cannot remove the organization's last owner.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
404Resource not found
{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}
Accept a team invite
Endpoint
POST /v1/team/invites/:token/accept
POST/v1/team/invites/:token/acceptLive
Public endpoint (no auth required at the route level). If the caller has an active session for the invited email, the invite attaches immediately; otherwise it returns signup_required so the frontend can route to signup with the invite token carried through.
Example
Make the call
curl -X POST "https://api-b2b.stampmitra.in/v1/team/invites/:token/accept" \
-H "Authorization: Bearer sk_test_xxxxxxxxxxxx"