Skip to main content

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​

FileWhat it has
Messaging APISMS, WhatsApp and email, at /messaging/v1
Airtime APIAirtime 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, at https://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 the apiKey header, or oauth2, 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​

  1. Choose Import and drop in the file. Postman makes a collection with a request for each endpoint.
  2. Open the collection's Variables, and set baseUrl to the Sandbox server.
  3. 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.
  4. Send Send an SMS to 231880000100, the Simulator, from PSandbox. 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.