Skip to main content

API Keys

1 API call in this section.

API Key Health Check

External & Carrier Integrations / API Keys
GET/external/api-key/{{api_key_plain}}/health

Validates an API key and returns its metadata and enabled modules. Path Parameters: - api_key_plain (required): The raw API key. If it starts with 'od_', the prefix is ignored during hashing. Responses: 200 valid; 400 api_key_required; 401 invalid/revoked/expired; 404 not found; 500 internal_server_error.

Send a bearer token in Authorization and a tenant API key when the integration requires X-APIKey or X-API-Key.
Request
curl
1curl --request GET "$ONDI_BASE_URL/external/api-key/{{api_key_plain}}/health" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "X-API-Key: {{api_key}}"

Path parameters

api_key_plainRequired
path string

Variable used inside the request path.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

X-API-KeyOptional
header string

{{api_key}}

Responses

Success - Valid200OK
Response body
json
1{2  "success": true,3  "message": "API key is valid",4  "id": "key-uuid",5  "name": "Integration Key",6  "created_at": "2024-01-01T00:00:00Z",7  "created_by": "user-uuid",8  "expires_at": null,9  "is_active": true,10  "revoked_at": null,11  "modules": [12    "deliveries",13    "zones",14    "pricing"15  ]16}
Error - API Key Required400Bad Request
Response body
json
1{2  "success": false,3  "message": "API key is required"4}
Error - Not Found404Not Found
Response body
json
1{2  "success": false,3  "message": "API key not found"4}
Error - Invalid/Revoked/Expired401Unauthorized
Response body
json
1{2  "success": false,3  "message": "API key is revoked, expired, or inactive"4}
Error - Server Error500Internal Server Error
Response body
json
1{2  "success": false,3  "message": "internal_server_error"4}