Get and use your API keys
Authenticate your requests to the Middesk API using API keys. Middesk provisions two keys when your account is created: one for sandbox and one for production.
Find your API keys
You can access your API keys in the Middesk Dashboard, under Settings > Developer > Credentials.
You can also create new API keys on that page.
Use your API keys
API authentication is generally performed using HTTP Basic Auth. Provide the API key as the username value.
You can also use Bearer Auth. Pass a header value of Authorization: Bearer mk_live_YOUR_API_KEY.
Neither approach requires a password, but all API requests should be made over HTTPS.
Match API keys to the environment
To support your development cycles, the API has two environments (or modes):
- Sandbox, to test your integration with mock data before going live
- Production (or live), for real businesses and requests
The two provisioned keys in your account match these two environments;
Test API key(prefixedmk_test) for sandbox mode, for use withhttps://api-sandbox.middesk.com/v1/requestsLive API key(prefixedmk_live) for production, for use withhttps://api.middesk.com/v1/requests
The API key type and URL must match. You cannot use a production key with a sandbox URL or the other way around.