Welcome to the Pave Distribution APIs! 👋
General API Structure
The Pave Distribution APIs are all REST APIs that adhere to a sensible set of guidelines. All our APIs will use the following structures consistently.
API Endpoints
Our APIs can be found at: https://api.paveapp.com/distribution.
Note
You can use the detailed API reference to see all available endpoints.
Status Codes
Pave uses the following status codes across all of our APIs:
Successful Status Codes
200 OK— Produced a response successfully.
Error Status Codes
401 Unauthorized— The API token being used to access the APIs is not valid. See the "authentication" section for more details.403 Forbidden— The API token being used to access the APIs does not have access to this resource. See the "authentication" section for more details.
Responses
The Pave Distribution API responds with JSON, with the Content-Type header set to application/json.
Authentication
Pave Distribution APIs use the standards compliant OAuth 2.0 "Client Credentials" flow for all requests.
Whilst covering the details of OAuth is beyond the scope of this documentation, below you can find some important concepts you will need to keep in mind as you authenticate and use the Pave Distribution APIs.
Client Secrets
When first setting up the Pave Distribution APIs you will be provided with two sets of a Client ID and a Client Secret for test and production use. These should be treated as confidential, stored somewhere secure and access limited where possible.
Critical
If you have reason to believe that your Client Secret has been leaked, please contact Pave immediately so your old credentials can be revoked and new ones issued to you.
Refreshing Tokens
You use your Client ID and Client Secret to issue API tokens, at the endpoint https://api.paveapp.com/distribution/oauth/token.
The validity period of API tokens is 2-3 hours, and a new one will need to be created after this period elapses for security reasons.
Scopes
The API token has a 'leads' scope applied. These scopes grant access to the leads endpoint including POST /ledas to send a lead.