Create an API key
The Sublime API uses API keys for authentication. To generate an API key:
- Load your Sublime dashboard
- Click Developer in the left-hand navigation
- Click the New Key button
- Give your API key a name
- Click Save
The API uses the Bearer authentication scheme to authenticate requests.
Once you've created your API key, include this header in your requests, replacing YOUR_API_KEY
with your API key:
Authorization: Bearer YOUR_API_KEY
For example, here is a complete curl request for fetching the metadata of a message with ID 3391c0e4-2d7e-4eaa-841c-2d5f7146759e
:
curl \
-H "Authorization: Bearer st4o9hnkltjxpz1dcjo1guga8304hjq8ingb6sx3ldyj96isg8k0xg5749jlusiy" \
https://example.sublimesecurity.com/v0/messages/3391c0e4-2d7e-4eaa-841c-2d5f7146759e