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
On this page
  • Status codes
  • Error messages
Build with Middesk

Status codes and errors messages

Was this page helpful?
Previous

Implement webhooks

Next
Built with

The Middesk API is organized around REST. The API has predictable, resource-oriented URLs and uses HTTP response codes to indicate API errors. Every API response, including errors, returns JSON.

The Middesk API has rate limiting to ensure high performance across all customers. Requests per customer are limited to 20 requests per second.

Status codes

Middesk uses standard HTTP response codes to indicate the success or failure of an API request.

As a rule of thumb, codes in the 2xx range indicate success. Codes in the 4xx range indicate an error in the provided information (for example, a required parameter was omitted or a validation error occurred).

Codes in the 5xx range indicate an error with Middesk servers. These should be extremely rare.

Some 2xx and 4xx errors include additional context in the response body.

Status CodeMeaning
200OK - Everything worked as expected.
201The object was created.
202The request was accepted.
400Bad Request - The request was unacceptable.
401Unauthorized - An invalid API key was provided.
404Not Found - The requested resource does not exist.
422Validation - A parameter was not formatted correctly.
429Too Many Requests - An account has sent too many requests in a given amount of time.
500Internal Server Error - Middesk encountered an internal server error.

Error messages

When Middesk encounters an error processing a request, Middesk returns a 4xx or 5xx status code and a JSON response containing information about the error. The errors array contains one or more Error objects.

Each Error object contains a message field explaining the error. Some Error objects contain an optional parameter field that highlights what specific field caused the error.

Example error response from POST /v1/businesses
1{
2 "errors": [
3 {
4 "message": "Name is required",
5 "parameter": "name"
6 },
7 {
8 "message": "Address line1 is required",
9 "parameter": "address.address_line1"
10 }
11 ]
12}
Get a demo
Contact your account manager or contact sales to inquire about access.