|

Pairfon REST API Reference

https://api.pairfon.com   Bearer Token Auth
POST Login
POSThttps://api.pairfon.com/auth/login
🔓 No authentication required
ParameterTypeRequiredDescription
emailstringrequiredCompany admin email address
passwordstringrequiredAccount password (min 8 chars)
POST Refresh Token
POSThttps://api.pairfon.com/auth/token
🔓 No authentication required
ParameterTypeRequiredDescription
refreshTokenstringrequiredRefresh token received at login
GET Get Current API Key
GEThttps://api.pairfon.com/auth/api-key
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns the current API key and its creation date.

POST Regenerate API Key
POSThttps://api.pairfon.com/auth/api-key/regenerate
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Invalidates the previous key and returns a new one.

POST Create Company
POSThttps://api.pairfon.com/register
🔓 No authentication required
ParameterTypeRequiredDescription
company.namestringrequiredCompany display name
company.phonestringrequiredCompany phone number
company.addressstringoptionalStreet address
company.citystringoptionalCity
company.countrystringoptionalCountry code (e.g. PK, US)
owner.firstNamestringrequiredOwner first name
owner.lastNamestringrequiredOwner last name
owner.emailstringrequiredOwner email address
owner.passwordstringrequiredPassword (min 8 chars, 1 uppercase, 1 number)
owner.phonestringoptionalOwner phone number
GET Verify Email
GEThttps://api.pairfon.com/register/verify-email?token=
🔓 No authentication required
ParameterTypeRequiredDescription
tokenstringrequiredEmail verification token from signup email
POST Forgot Password
POSThttps://api.pairfon.com/forgot-password
🔓 No authentication required
ParameterTypeRequiredDescription
emailstringrequiredEmail address to send reset link to
POST Reset Password
POSThttps://api.pairfon.com/reset-password
🔓 No authentication required
ParameterTypeRequiredDescription
tokenstringrequiredPassword reset token from email
passwordstringrequiredNew password (min 8 chars)
GET Get Current User Profile
GEThttps://api.pairfon.com/profile
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns authenticated user's profile data.

PUT Update Profile
PUThttps://api.pairfon.com/profile/:user_id
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
firstNamestringoptionalUser's first name
lastNamestringoptionalUser's last name
phonestringoptionalUser's phone number
GET List Team Members
GEThttps://api.pairfon.com/users
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns all users in the authenticated company.

POST Invite User
POSThttps://api.pairfon.com/users
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
firstNamestringrequiredInvitee's first name
lastNamestringrequiredInvitee's last name
emailstringrequiredInvitee's email address
phonestringoptionalInvitee's phone number
rolestringrequiredadmin or member
PUT Update User
PUThttps://api.pairfon.com/users/:id
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
firstNamestringoptionalUpdated first name
lastNamestringoptionalUpdated last name
rolestringoptionaladmin or member
DELETE Remove User
DELETEhttps://api.pairfon.com/users/:id
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Removes the specified user from the company.

GET Get Company Profile
GEThttps://api.pairfon.com/company
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns the company profile for the authenticated user's organization.

PUT Update Company
PUThttps://api.pairfon.com/company/:id
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
namestringoptionalCompany display name
phonestringoptionalCompany phone number
addressstringoptionalStreet address
citystringoptionalCity
statestringoptionalState / province
countrystringoptionalCountry code
GET Dashboard Overview
GEThttps://api.pairfon.com/app/home
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns summary cards: total messages sent, active devices, credits used, and recent activity.

GET SMS Analytics
GEThttps://api.pairfon.com/dashboard/stats?users=&devices=
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
usersstringoptionalComma-separated user IDs to filter by
devicesstringoptionalComma-separated device fingerprints to filter by
GET Device List (Dashboard Filters)
GEThttps://api.pairfon.com/dashboard/devices
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns a minimal list of devices (id, name) for use in analytics filter dropdowns.

GET List Paired Devices
GEThttps://api.pairfon.com/device/list
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns all Android devices paired to the company account, including online status and SIM details.

POST Send SMS
POSThttps://api.pairfon.com/device/messages/outbound
🔒 Bearer Token or API Key — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
tostringrequiredRecipient phone number in E.164 format (e.g. +12125551234)
messagestringrequiredSMS message body (max 1600 chars)
device_fingerprintstringrequiredFingerprint of the paired Android device to send from
sim_slotintegeroptionalSIM slot to use: 0 (SIM 1) or 1 (SIM 2). Defaults to 0
GET Get Webhook Config
GEThttps://api.pairfon.com/webhooks/inbound-sms
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns configured inbound SMS webhook URLs and their device/SIM assignments.

PUT Save Webhook Config
PUThttps://api.pairfon.com/webhooks/inbound-sms
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
webhooksarrayrequiredArray of webhook objects
webhooks[].urlstringrequiredHTTPS endpoint to POST inbound SMS payloads to
webhooks[].devicesarrayoptionalDevice fingerprints to listen on. Empty = all devices
webhooks[].simsarrayoptionalSIM slots to listen on (0, 1). Empty = all SIMs
GET List Plans
GEThttps://api.pairfon.com/plans
🔓 No authentication required — public endpoint

No request body. Returns all publicly available subscription plans with pricing and feature details.

POST Create Checkout Session
POSThttps://api.pairfon.com/billing/checkout-session
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN
ParameterTypeRequiredDescription
plan_idstringrequiredPlan identifier from the /plans endpoint
skip_trialbooleanoptionalSet true to skip the free trial period. Default: false
POST Open Billing Portal
POSThttps://api.pairfon.com/billing/portal-session
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns a Stripe billing portal URL for managing subscriptions, payment methods, and invoices.

GET Get Subscription Status
GEThttps://api.pairfon.com/subscription
🔒 Bearer Token — Authorization: Bearer YOUR_TOKEN

No request body. Returns current plan, billing status, trial end date, and usage limits.