curl "https://server.smartlead.ai/api/v1/users/get-by-api-key" -H "X-API-Key: YOUR_KEY"
import requests
response = requests.get(
"https://server.smartlead.ai/api/v1/users/get-by-api-key",
headers={"X-API-Key": "YOUR_API_KEY"},
)
print(response.json()["data"]["email"])
{
"success": true,
"message": "User data retrieved successfully",
"data": {
"id": 1001,
"name": "Jane Doe",
"email": "jane@example.com",
"uuid": "0b3f6c1e-7a2d-4e8b-9c5f-1d2e3f4a5b6c",
"provider": "app",
"access_info": {},
"plan_details": {
"id": 2001,
"plan_type": "TRIAL_PLAN",
"trial_start_date": "2026-11-01T00:00:00.000Z",
"trial_end_date": "2026-11-15T00:00:00.000Z",
"new_feature_access": {}
}
}
}
{
"message": "Invalid API Key"
}
{
"message": "API key is required."
}
{
"success": false,
"message": "User not found for the provided API key"
}
Utilities
Get Account by API Key
Check an API key and see which account and plan it belongs to
GET
/
api
/
v1
/
users
/
get-by-api-key
curl "https://server.smartlead.ai/api/v1/users/get-by-api-key" -H "X-API-Key: YOUR_KEY"
import requests
response = requests.get(
"https://server.smartlead.ai/api/v1/users/get-by-api-key",
headers={"X-API-Key": "YOUR_API_KEY"},
)
print(response.json()["data"]["email"])
{
"success": true,
"message": "User data retrieved successfully",
"data": {
"id": 1001,
"name": "Jane Doe",
"email": "jane@example.com",
"uuid": "0b3f6c1e-7a2d-4e8b-9c5f-1d2e3f4a5b6c",
"provider": "app",
"access_info": {},
"plan_details": {
"id": 2001,
"plan_type": "TRIAL_PLAN",
"trial_start_date": "2026-11-01T00:00:00.000Z",
"trial_end_date": "2026-11-15T00:00:00.000Z",
"new_feature_access": {}
}
}
}
{
"message": "Invalid API Key"
}
{
"message": "API key is required."
}
{
"success": false,
"message": "User not found for the provided API key"
}
Returns the account that owns the API key you send, with its plan. It changes nothing and spends nothing, so it is a safe first call to test a key or confirm which workspace you are about to act on.
It looks the key up among main account API keys. A client API key is not found here and returns 404.
Query Parameters
curl "https://server.smartlead.ai/api/v1/users/get-by-api-key" -H "X-API-Key: YOUR_KEY"
import requests
response = requests.get(
"https://server.smartlead.ai/api/v1/users/get-by-api-key",
headers={"X-API-Key": "YOUR_API_KEY"},
)
print(response.json()["data"]["email"])
{
"success": true,
"message": "User data retrieved successfully",
"data": {
"id": 1001,
"name": "Jane Doe",
"email": "jane@example.com",
"uuid": "0b3f6c1e-7a2d-4e8b-9c5f-1d2e3f4a5b6c",
"provider": "app",
"access_info": {},
"plan_details": {
"id": 2001,
"plan_type": "TRIAL_PLAN",
"trial_start_date": "2026-11-01T00:00:00.000Z",
"trial_end_date": "2026-11-15T00:00:00.000Z",
"new_feature_access": {}
}
}
}
{
"message": "Invalid API Key"
}
{
"message": "API key is required."
}
{
"success": false,
"message": "User not found for the provided API key"
}
