OpenAPI files
The Messaging and Airtime APIs, each as one OpenAPI 3.0 file: every path, request body and response, both base URLs, and both ways to authenticate. Import a file into Postman, Insomnia, Bruno or a code generator.
Download
| File | What it has |
|---|---|
| Messaging API | SMS, WhatsApp and email, at /messaging/v1 |
| Airtime API | Airtime and data bundles, at /airtime/v1 |
The files change with the API. Download them again after a changelog entry.
What's in each file
- Two servers: Live, at
https://api.ponitor.com, and Sandbox, athttps://sandbox-api.ponitor.com. Start with Sandbox and a sandbox key or Test client. See The sandbox. - Two ways to authenticate:
apiKeyAuth, your key in theapiKeyheader, oroauth2, a bearer token from your OAuth 2.0 client with the client credentials grant. See API keys and base URLs. - Every endpoint, with example bodies and the answers it can give, as in the API reference.
Import into Postman
- Choose Import and drop in the file. Postman makes a collection with a request for each endpoint.
- Open the collection's Variables, and set
baseUrlto the Sandbox server. - Under the collection's Authorization, pick one:
- API Key: key
apiKey, your sandbox key as the value, added to the header; or - OAuth 2.0: grant type Client Credentials, access token URL
https://sandbox-api.ponitor.com/oauth2/token, your client ID and secret, and Send as Basic Auth header. Choose Get New Access Token, then Use Token.
- API Key: key
- Send Send an SMS to
231880000100, the Simulator, fromPSandbox. The text arrives on the Simulator.
A token lasts an hour. Choose Get New Access Token again when a call answers 401.
Each request sends the externalId the file has as its example, so sending a request twice returns the first message. To send another, change the externalId. See Retries and externalId.
Keys and secrets you type into Postman stay in your workspace. Don't share a collection or environment you've filled in.