For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact SalesGet Support
HomeGuidesAPI reference
HomeGuidesAPI reference
  • Get started
    • Quickstart—Verify a Business
    • Quickstart—Register an entity for payroll taxes
    • Learn how Middesk works
    • Security
    • Changelog
  • Build with Middesk
    • Get your API keys
    • Understand API changes
    • Status codes and errors reference
    • Implement webhooks
    • Secure webhooks
    • Use GraphQL
    • Connect MCP
  • Verify a business (KYB)
    • Verify TIN
    • Verify name and address
    • Verify Secretary of State status
    • Verify owners and officers
    • Screen for sanctions and watchlists
    • Search for adverse media
    • Search for Politically Exposed Persons
    • Implement KYC
    • Discover connections
    • Evaluate online presence
    • Assess credit risk
    • Accelerate onboarding
    • Monitor business activity
    • Manage business entities
    • Work with agents
LogoLogo
Contact SalesGet Support
Build with Middesk

Get and use your API keys

Was this page helpful?
Previous

Understand API changes

Next
Built with

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.

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.

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.

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.