curl --request GET \
--url https://api.credira.com/v1/users/user_123456789 \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
const userId = "user_123456789";
const response = await fetch(`https://api.credira.com/v1/users/${userId}`, {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);
{
"success": true,
"data": {
"id": "user_123456789",
"email": "john.doe@company.com",
"name": "John Doe",
"company": "Acme Corporation",
"role": "billing_manager",
"department": "finance",
"phone": "+1234567890",
"account_id": "acc_789123456",
"status": "active",
"created_time": "2024-01-15T10:30:00Z",
"last_login": "2024-01-20T09:15:00Z",
"permissions": [
"calls:read",
"calls:write",
"emails:read",
"emails:write",
"callouts:read",
"callouts:write"
],
"activity_stats": {
"total_calls_made": 45,
"total_emails_sent": 120,
"total_callouts_created": 8,
"last_activity": "2024-01-20T09:15:00Z"
},
"metadata": {
"subscription_plan": "premium",
"timezone": "America/New_York",
"language": "en"
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
Users
Get User
Retrieve user details by ID
GET
/
users
/
{id}
curl --request GET \
--url https://api.credira.com/v1/users/user_123456789 \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
const userId = "user_123456789";
const response = await fetch(`https://api.credira.com/v1/users/${userId}`, {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);
{
"success": true,
"data": {
"id": "user_123456789",
"email": "john.doe@company.com",
"name": "John Doe",
"company": "Acme Corporation",
"role": "billing_manager",
"department": "finance",
"phone": "+1234567890",
"account_id": "acc_789123456",
"status": "active",
"created_time": "2024-01-15T10:30:00Z",
"last_login": "2024-01-20T09:15:00Z",
"permissions": [
"calls:read",
"calls:write",
"emails:read",
"emails:write",
"callouts:read",
"callouts:write"
],
"activity_stats": {
"total_calls_made": 45,
"total_emails_sent": 120,
"total_callouts_created": 8,
"last_activity": "2024-01-20T09:15:00Z"
},
"metadata": {
"subscription_plan": "premium",
"timezone": "America/New_York",
"language": "en"
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
Retrieve detailed information about a specific user by their unique identifier.
This endpoint returns comprehensive user information including permissions,
account details, and activity data.
Request
string
required
The unique identifier of the user to retrieve
string
required
Bearer token for API authentication
curl --request GET \
--url https://api.credira.com/v1/users/user_123456789 \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
const userId = "user_123456789";
const response = await fetch(`https://api.credira.com/v1/users/${userId}`, {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);
{
"success": true,
"data": {
"id": "user_123456789",
"email": "john.doe@company.com",
"name": "John Doe",
"company": "Acme Corporation",
"role": "billing_manager",
"department": "finance",
"phone": "+1234567890",
"account_id": "acc_789123456",
"status": "active",
"created_time": "2024-01-15T10:30:00Z",
"last_login": "2024-01-20T09:15:00Z",
"permissions": [
"calls:read",
"calls:write",
"emails:read",
"emails:write",
"callouts:read",
"callouts:write"
],
"activity_stats": {
"total_calls_made": 45,
"total_emails_sent": 120,
"total_callouts_created": 8,
"last_activity": "2024-01-20T09:15:00Z"
},
"metadata": {
"subscription_plan": "premium",
"timezone": "America/New_York",
"language": "en"
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Invalid user ID format"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to access this user"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "User not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
