Get and use your API keys

Authenticate your requests to the Middesk API using API keys. Two are automatically provisioned when your account is created: one each for sandbox and production environments.

1

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.

2

Use your API keys

API authentication is generally performed using HTTP Basic Auth. Provide the API key as the username value.

Bearer Auth is supported as well. 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.

1curl https://api.middesk.com/v1/businesses \
2 -u mk_live_YOUR_API_KEY:
3

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 (prefixed mk_test) for sandbox mode, for use with https://api-sandbox.middesk.com/v1/ requests
  • Live API key (prefixed mk_live) for production, for use with https://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.

Get a demo
Contact your account manager or contact sales to inquire about access.