Create new user for your organization.
This endpoint creates a new user account and generates the necessary API
credentials for accessing Credira services.
Authorizations
Add Bearer YOUR_CREDIRA_AI_KEY
as the value of the Authorization
header.
Body
The email address for the new user account
The full name of the user
The company name associated with the user
The role of the user within the organization
The department the user belongs to
The phone number of the user
Additional metadata for the user account
curl --request POST \
--url https://api.credira.com/v1/users \
--header 'Authorization: Bearer YOUR_CREDIRA_AI_KEY' \
--header 'Content-Type: application/json' \
--data '{
"email": "john.doe@company.com",
"name": "John Doe",
"company": "Acme Corporation",
"role": "billing_manager",
"department": "finance",
"phone": "+1234567890",
"metadata": {
"subscription_plan": "premium",
"timezone": "America/New_York",
"language": "en"
}
}'
{
"success": true,
"data": {
"id": "user_123456789",
"email": "john.doe@company.com",
"name": "John Doe",
"company": "Acme Corporation",
"role": "billing_manager",
"department": "finance",
"phone": "+1234567890",
"api_key": "credira_sk_1234567890abcdef",
"account_id": "acc_789123456",
"status": "active",
"created_time": "2024-01-15T10:30:00Z",
"last_login": null,
"permissions": [
"calls:read",
"calls:write",
"emails:read",
"emails:write",
"callouts:read",
"callouts:write"
],
"metadata": {
"subscription_plan": "premium",
"timezone": "America/New_York",
"language": "en"
}
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789",
"message": "User created successfully"
}
}
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Missing required field: email"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing Credira AI key"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "CONFLICT",
"message": "User with this email already exists"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid email address format"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}