Create an API key
Record your API key at creation in a secure location. This will be the only opportunity to view and record it.
The Sublime API uses API keys for authentication. To generate an API key:
- Load your Sublime dashboard
- Click API in the left-hand navigation under Automate
- Click the New Key button
- Give your API key a name
- Click Create
- Click Copy and paste your key in a secure location, like a password manager. This is the only time you can view and copy your key.
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.sublime.security/v0/messages/3391c0e4-2d7e-4eaa-841c-2d5f7146759e