Skip to main content
GET
/
api
/
sms
curl "https://app.neariq.io/api/sms" \
  -H "Cookie: <dashboard session cookie>"
SMS endpoints are dashboard endpoints. They use the signed-in app session, not X-NearIQ-Key. SMS actions require a Growth plan or higher, available monthly SMS allowance, and proper customer consent before sending messages.
Only message customers who have given consent. Keep opt-out handling available in every workflow that collects SMS contacts.

GET /api/sms

Returns SMS configuration status and the active business SMS number.
curl "https://app.neariq.io/api/sms" \
  -H "Cookie: <dashboard session cookie>"
{
  "configured": true,
  "business": {
    "id": "5d49faca-17f3-45f6-a0ef-60bd93754771",
    "name": "Aster Grove Fitness",
    "smsNumber": "+15551234567",
    "smsEnabled": true
  }
}
To search available numbers, use action=search.
curl "https://app.neariq.io/api/sms?action=search&areaCode=512" \
  -H "Cookie: <dashboard session cookie>"
{
  "configured": true,
  "numbers": [
    {
      "number": "+15125550123",
      "friendlyName": "(512) 555-0123",
      "locality": "Austin",
      "region": "TX"
    }
  ]
}

POST /api/sms

Runs one SMS action: provision a number, send a review request, or release the active number.

Provision a number

curl -X POST "https://app.neariq.io/api/sms" \
  -H "Content-Type: application/json" \
  -H "Cookie: <dashboard session cookie>" \
  -d '{ "action": "provision", "phoneNumber": "+15125550123" }'
{
  "ok": true,
  "number": "+15125550123",
  "sid": "PN123"
}

Send a review request

curl -X POST "https://app.neariq.io/api/sms" \
  -H "Content-Type: application/json" \
  -H "Cookie: <dashboard session cookie>" \
  -d '{
    "action": "send_review_request",
    "to": "+15557654321",
    "customerName": "Jane"
  }'
{
  "ok": true,
  "messageSid": "SM123",
  "status": "queued"
}

Release a number

curl -X POST "https://app.neariq.io/api/sms" \
  -H "Content-Type: application/json" \
  -H "Cookie: <dashboard session cookie>" \
  -d '{ "action": "release" }'
{
  "ok": true
}
Consent contacts are managed through dashboard business endpoints. SMS consent rows track phone number, consent source, consent timestamp, and opt-out state so review requests, reminders, and conversations can respect customer preferences.

Errors

StatusMeaning
400Missing action fields, no SMS number, or duplicate number
401Missing dashboard session
403Plan does not include SMS or monthly allowance is exhausted
404No active business found
409Business already has an SMS number
503SMS is not configured