In order to interface with some of the core functionality, Vouch has exposed specific resources via a REST API. This gives developers a great deal of flexibility when integrating Vouch and opens up the doors to very exciting activations.
The Vouch REST API is only available for customers who have an Enterprise plan.
Base URL
The API is accessed using a base URL in the form:
https://api.vouchfor.com/api/v1/<resource>
Authentication
All requests to the API are authenticated by providing your API key. The API key should be provided as an HTTP header named X-API-TOKEN.
Header
curl -H "X-API-KEY: YOUR_API_KEY" https://api.vouchfor.com/api/v1/<resource>
Your API Key can be found in your account on the the Developer page within your Vouch Account. The REST API is only available for customers with an Enterprise plan.
HTTP Method
The v1 API uses standard HTTP methods for indicating the action to take on a resource.
Method | Action |
---|---|
GET | Retrieve a resource. |
POST | Create, modify or delete a resource. |
Schema
All API requests and response bodies adhere to a common JSON format representing individual items and collections of items.
Errors
The API uses HTTP status codes to indicate an error has occurred while processing a request. There are four main error status codes used by the API:
Code | Description |
---|---|
401 | Invalid API Key |
403 | The request could not be authenticated or the authenticated user is not authorized to access the requested resource. |
404 | The requested resource does not exist. |
422 | The request could not be processed, usually due to a missing or invalid parameter. |
500 | Server Error |