Sirv REST API
Sirv provides you with 2 APIs:
- REST API - manage your account, your users, search files, upload, delete and more.
- S3 API - move files, rename files and create folders.
This page explains how to use the Sirv REST API.
To use the Sirv REST API, create an API client from the Settings page of your Sirv account:
Once created, you'll see your Client ID and Client Secret:
The clientId and clientSecret pair represent the API client. The API client can have full access to all operations or be limited to specific API methods.
Connect to Sirv
Each API call must be authenticated with a bearer token (JSON Web Token). You can get a token with a POST request.
Once you have a token, you can use any of the 40+ Sirv REST API methods.
You can continue to reuse the token until it expires. Once the token expires (see the expiresIn field, in seconds), request a new token.
Documentation for all Sirv REST API methods is at https://apidocs.sirv.com/. It contains a summary of each method, how it can be used and a list of properties that can be set.
Sample scripts for various languages are provided:
REST API limits
The Sirv REST API has a limit to how many requests can be returned per hour.
Enterprise plan limits:
- Total requests per hour: 14000
- Search requests: 2000
- Video to spin conversions: 400
- Spin to video conversions: 400
- Fetch requests: 4000
- New account creations: 10
Business plan limits:
- Total requests per hour: 7000
- Search requests: 1000
- Video to spin conversions: 200
- Spin to video conversions: 200
- Fetch requests: 2000
- New account creations: 5
Free plan limits:
- Total requests per hour: 500
- Search requests: 50
- Video to spin conversions: 20
- Spin to video conversions: 20
- Fetch requests: 300
- New account creations: 0
The total requests per hour is for all types of request combined.
The hour starts counting from the time that the first request is received by Sirv. For example, if a request is received at 18:35:51, the API allowance will be reset at 19:35:51.
Check API usage
- Endpoint: https://api.sirv.com/v2/account/limits
- Documentation: https://apidocs.sirv.com/#get-api-limits
The API method will return:
- Your limit
- Number of requests in last hour
- Number of requests remaining
- Time when limit will reset (UTC epoch seconds)
Note: accessing this endpoint will not count towards your REST API rate limit.
Special API options
Sirv also provides special API methods, available upon request. Please contact Sirv support if you wish to have access to any of the following:
- Create new accounts
- Get user credentials
- Get list of a users' accounts