Home /  API Reference / 

API Keys

When you call a Stedi endpoint, you need to provide an API key in the Authorization-header. API Keys lets you create and delete these keys programatically.

An API Key grants access to all resources belonging to a tenant. If you sign up with Stedi as an individual, then you are the tenant and all resources belong to you alone. If you are a member of an account, then the account is the tenant and all resources are shared among the account's members.

Download OpenAPI

Delete API key

DELETE/api_keys/{api_key_prefix}
Deletes the specified API key.
Parameters
Requiredpath

Example

DELETE
https://apikeys.us.stedi.com/2022-01-19/api_keys/...

List API keys

GET/api_keys
Retrieves a list of all API keys belonging to the active tenant. The active tenant is determined by the API key passed in the Authorization-header.
Parameters
Optionalquery

Maximum number of API keys that will be returned in a single response. If there are more API keys, the response will contain a field next_page_token that will allow you to retrieve them.

For example, 25
Optionalquery

A token that allows you to retrieve the next page of API keys. It should have the same value as the next_page_token-field you received in your last response.

Example

GET
https://apikeys.us.stedi.com/2022-01-19/api_keys?page_size=25&page_token=2t7M75ZN1w4OnYFKKT0SUkT95w_ULzPR...

Create API key

POST/api_keys

Create a new API key for the active tenant. The active tenant is determined by the API key passed in the Authorization-header.

When you call a Stedi endpoint, you need to provide an API key in the Authorization-header. Any API key you create using this endpoint grants you access to all resources belonging to the active tenant. If you signed up as an individual, then the active tenant is you and the API key will grant access to all your resources. If you're a member of an account, then the active tenant is the account and the API key will grant access to all resources in that account, regardless of whether they were created by you or by another member.

Since you need an API key to call this endpoint, you need to create your first API key using the UI.

Request body

application/json

Requiredstring
A description of the API key. You can use this to describe what the API key is used for, or who it is associated with. It doesn't have to be unique, but it can't be empty.

Example

POST
https://apikeys.us.stedi.com/2022-01-19/api_keys