All endpoints are paginated and will return a maximum of 100 results per page. See individual endpoints and example responses for more details on pagination parameters. A maximum of 500 requests per minute can be made to our API.

1. Getting Authenticated

To use our API you will need to make an OAuth application (or use an existing one) in the developer settings tab on your Standard Metrics settings page. Every Standard Metrics API request must be authenticated with a Bearer Token in the request header. Bearer Tokens are temporary and can be created using the client_id and client_secret generated by your OAuth application. There are two ways to exchange your client_id and client_secret for a valid Bearer Token via the /o/token/ endpoint:

2. Retrieving Bearer Token Here on the Docs

By going to the Get API Access Token page.
  1. Hitting Try it ▶.
  2. Setting the Authorization.username field as your client_id and the Authorization.password field as your client_secret and hitting Send.
The resulting response will be of the following form:
{
  "access_token": "ACCESS_TOKEN",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "read write"
}
Where your Bearer token is the "access_token" field. You can copy this token to be used as Bearer authentication in all of your requests. Bearer Tokens expire after one hour.

3. Retrieving Bearer Token Programmatically

Authentication example (with Python):
import base64

client_id = "YOUR_CLIENT_ID"
client_secret = "YOUR_CLIENT_SECRET"
credential = f"{client_id}:{client_secret}"
base64.b64encode(credential.encode("utf-8"))
b'ENCODED_CREDENTIAL'
You can now exchange this credential for an access token, eg:
curl -X POST \
    -H "Authorization: Basic ENCODED_CREDENTIAL" \
    -H "Cache-Control: no-cache" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    "https://api.standardmetrics.io/o/token/" \
    -d "grant_type=client_credentials"
Receiving the following response:
{
    "access_token": "YOUR_ACCESS_TOKEN",
    "expires_in": 36000,
    "token_type": "Bearer",
    "scope": "read write"
}

4. Making requests

When making API requests, you must include your access token in the Authorization header with the “Bearer ” prefix. For example:
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    "https://api.standardmetrics.io/api/v1/companies/"
When using our docs, paste your Bearer Token into the Authorization field of any endpoint. Auth tokens persist across your sesion. After retrieiving a token from the Get API Access Token page, the field may auto fill with Basic <base64 encoded client_id:client_secret>. Be sure to fully replace this with your Bearer When making any requests. The field should read Bearer <your_bearer_token>.