Scope Wiser API: Overview and Authentication
The base URL, where to get your API key, how every request is authenticated, and the response shape every endpoint returns. Start here.
What you'll do: get your API key, make your first authenticated call, and learn the response shape every endpoint returns.
Time: 10 minutes.
This guide is for developers. It is about calling Scope Wiser from your own website, app or backend. If you want Scope Wiser to call your system, that is the other direction and it is covered in HTTP API: The Complete Developer Guide.
Before you start
β You can sign in to Scope Wiser
β A server-side place to keep the key: an environment variable on your server
1. Get your API key
Click your avatar at the top right.
Choose API Developer.
You should now see Scope Wiser - Developer ("Get Your API key and become a Scope Wiser developer"), with Your API key, a Copy button and a Generate API key button.
Click Copy and store the key in an environment variable on your server.
The whole reference lives on that page too, grouped as User API, WhatsApp API, Subscriber API, Label API and Catalog API, with a live example for each endpoint.
Treat the key as a password. It grants everything your account can do: reading conversations, messaging customers, deleting subscribers. Keep it in an environment variable on your server, never in front-end JavaScript, a mobile app, or a public repository. Generate API key issues a new one and invalidates the old, so rotate it if it is ever exposed.
2. Make your first call
Every request carries your key as a parameter called apiToken. Use POST from a server.
Send this request, with your key in place of
API-KEY:
curl -X POST \
'https://connect.scopewiser.com/api/v1/label/list' \
-d 'apiToken=API-KEY'Check the response's
statusfield."1"means it worked.
3. Check every response the same way
Every endpoint returns JSON with a status field. It is a string, not a boolean or a number: check for "1", not 1 or true.
| Meaning |
|---|---|
| The call succeeded. |
| The call failed. |
Log unexpected shapes. A few endpoints return
trueinstead of"1", and one sample response spells the keymesasge. Write your client so an unexpected shape is logged rather than treated as success.
β Done whenβ¦
β Your key is stored in an environment variable, not in code
β A POST to
/label/listreturns"status":"1"
If something doesn't work
statusis"0". Readmessage: it holds the reason, in plain English.A plan limit was exceeded. The call returns
status: "0"with a message saying which limit was hit, for example the subscriber cap.A message was not delivered. Outside a 24-hour window since the customer last messaged you, only an approved template is delivered.
A parameter is "missing" though you sent it. Check the spelling for that endpoint: Subscriber Create uses
phoneNumberIDandphoneNumber, notphone_number_id.
Reference
The base URL
Every endpoint sits under:
https://connect.scopewiser.com/api/v1/Authentication
There is no OAuth flow and no separate login call. Every request carries your key as a parameter called apiToken.
Most endpoints accept both GET and POST. Use POST from a server: a key in a query string ends up in browser history, proxy logs and server access logs.
GET
https://connect.scopewiser.com/api/v1/label/list?apiToken=API-KEYPOST: see the example in section 2.
The media upload endpoint also accepts the key as a bearer header, which is the tidier form where your HTTP client supports it:
-H "Authorization: Bearer API-KEY"Example responses
A successful action:
{"status":"1","message":"Labels have been assigned successfully."}A successful read:
{"status":"1","message":[{"id":1,"label_name":"Your label name","status":"1"}]}A failure:
{"status":"0","message":"Subscriber limit has been exceeded. You cannot have more subscribers."}The identifiers you will need
Almost every WhatsApp endpoint wants a phone_number_id: the ID of the WhatsApp number the call acts on, not the number itself. Note the two spellings: most endpoints use phone_number_id, but Subscriber Create uses phoneNumberID and phoneNumber. Copy the parameter names from each endpoint rather than assuming.
Identifier | What it is |
|---|---|
| Your WhatsApp account's phone number ID |
| The customer's number, country code first, digits only, no |
| Comma-separated lists, for example |
| From Bot Flow List |
| Returned when you send; used to check delivery |
Paging
List endpoints take limit and offset, where offset is a page number starting at 1. Conversations cap at 50 per call, subscribers at 100. Responses that have more include nextOffset: keep calling until it stops coming back.
Rate limits and quotas
Your account's plan limits apply to the API exactly as they do in the interface. Sending is governed by the same WhatsApp rules as anywhere else: outside a 24-hour window since the customer last messaged you, only an approved template is delivered. If you exceed a plan limit the call returns status: "0" with a message saying which limit was hit, for example the subscriber cap.
Next: Scope Wiser API: Sending WhatsApp Messages, for text, buttons, media and triggering a bot flow. Scope Wiser API: Managing Subscribers, Labels and Sequences covers the contact endpoints, and Scope Wiser API: Catalogue and Team covers catalogue orders, order status and team members.
