Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mymarky.ai/llms.txt

Use this file to discover all available pages before exploring further.

All API errors return a consistent JSON shape:
{
  "error": {
    "type": "invalid_request_error",
    "code": "missing_field",
    "message": "Field required",
    "param": "caption",
    "doc_url": "https://docs.mymarky.ai/errors#missing_field"
  }
}

Error types

TypeHTTP StatusMeaning
authentication_error401Missing or invalid credentials
permission_error403Valid credentials but insufficient access
not_found_error404Resource doesn’t exist or doesn’t belong to your org
invalid_request_error400, 422Bad input, validation failure
rate_limit_error429Too many requests
api_error500+Server-side error

Error codes

authentication_required

Missing or invalid Authorization header. Include your API key as a Bearer token:
curl https://api.mymarky.ai/api/businesses \
  -H "Authorization: Bearer mk_live_your_key_here"

permission_denied

Your API key doesn’t have access to this resource. Common causes:
  • The business doesn’t belong to your organization
  • Your plan doesn’t include API access

resource_not_found

The resource ID doesn’t exist or has been deleted. Check the ID and try again.

missing_field

A required field is missing from the request body. Check the param field in the error response for which field is needed.

invalid_value

A field has an invalid value. Check the param field and the message for details.

validation_error

The request body failed validation. The param field indicates which field has the issue. If multiple fields failed, check error.details for all of them.

rate_limit_exceeded

You’ve exceeded 100 requests per minute. Check these response headers:
HeaderMeaning
X-RateLimit-LimitMax requests per window (100)
X-RateLimit-RemainingRequests left in this window
X-RateLimit-ResetSeconds until the window resets
Retry-AfterSeconds to wait before retrying

limit_exceeded

A resource limit has been reached (e.g., max 5 webhooks per org, max 10 API keys). Delete unused resources to free up capacity.

storage_limit_exceeded

Business storage limit reached. Delete unused media to free up space.

internal_error

An unexpected server error. Please try again. If the problem persists, submit feedback with the error details.

Handling errors

import httpx

response = httpx.post("https://api.mymarky.ai/api/posts", ...)

if response.status_code >= 400:
    error = response.json()["error"]
    print(f"Error: {error['code']} - {error['message']}")

    if error["code"] == "rate_limit_exceeded":
        retry_after = int(response.headers.get("Retry-After", 60))
        time.sleep(retry_after)