Authentication
Learn how to authenticate with the MID API using API keys and manage your credentials securely.
API Key Authentication
The MID API uses API keys to authenticate requests. You can view and manage your API keys in the MID Dashboard.
Your API keys carry many privileges, so be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, or forums.
Security
Authenticated Request
curl -X GET \
'https://api.mobid.io/v1/health' \
-H 'X-Mobid-Key: qk_63ccde4e11274c33b9255224'Your API Key
A sample test API key is included in all examples. To test with your own account, replace it with your actual API key or sign in.
Errors
MID uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error given the information provided. Codes in the 5xx range indicate a server error (these are rare).
Error Attributes
| Attribute | Type | Description |
|---|---|---|
code | string | Short error code for programmatic handling |
message | string | Human-readable error description |
data | object | Additional error details (nullable) |
HTTP Status Code Summary
| Code | Meaning |
|---|---|
| 200 | OK — Everything worked as expected |
| 400 | Bad Request — Missing required parameter |
| 401 | Unauthorized — No valid API key provided |
| 402 | Request Failed — Valid parameters but request failed |
| 403 | Forbidden — Insufficient permissions |
| 404 | Not Found — Resource doesn't exist |
| 409 | Conflict — Duplicate idempotent key |
| 429 | Too Many Requests — Rate limit exceeded |
| 5xx | Server Error — Something went wrong on MID's end |