This article will cover the following:
Overview
The Users & Access API lets you programmatically manage every human and system identity in your CAKE account. All requests require a valid API key with sufficient permissions.
List Users
GET /api/2/users.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | integer | No | Filter by a specific user ID. |
| user_status | string | No | Filter by status: active or inactive. |
| role_id | integer | No | Filter users assigned to a specific role. |
| start_at_row | integer | No | Row offset. Default: 1. |
| row_limit | integer | No | Max results. Default: 25. |
Sample request
GET https://yourdomain.cake.com/api/2/users.json
?api_key=YOUR_API_KEY
&user_status=active
&role_id=3Sample response
{
"request_status": "Success",
"users": [
{"user_id": 101, "first_name": "Jordan", "last_name": "Rivera", "email": "jordan@example.com", "role_id": 3, "role_name": "Manager", "user_status": "active"},
{"user_id": 102, "first_name": "Taylor", "last_name": "Kim", "email": "taylor@example.com", "role_id": 3, "role_name": "Manager", "user_status": "active"}
]
}Create User
POST /api/2/user.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| first_name | string | Yes | User's first name. |
| last_name | string | Yes | User's last name. |
| string | Yes | User's email address. Must be unique within the account. | |
| role_id | integer | Yes | ID of the role to assign. Retrieve valid IDs from GET /api/2/roles.json. |
| user_status | string | Yes | Initial status: active or inactive. |
| password | string | Yes | Initial password for the account. |
Sample request
POST https://yourdomain.cake.com/api/2/user.json?api_key=YOUR_API_KEY
{
"first_name": "Morgan",
"last_name": "Chen",
"email": "morgan.chen@example.com",
"role_id": 3,
"user_status": "active",
"password": "Str0ng!Pass#2024"
}Sample response
{
"request_status": "Success",
"user": {
"user_id": 215,
"email": "morgan.chen@example.com",
"role_name": "Manager",
"user_status": "active"
}
}List Roles
Returns all roles defined in the account. Use this endpoint to look up valid role_id values before creating users.
GET /api/2/roles.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| role_id | integer | No | Filter by a specific role ID. |
| role_name | string | No | Filter by role name (exact match). |
Sample request
GET https://yourdomain.cake.com/api/2/roles.json?api_key=YOUR_API_KEYSample response
{
"request_status": "Success",
"roles": [
{"role_id": 1, "role_name": "Administrator"},
{"role_id": 2, "role_name": "Advertiser"},
{"role_id": 3, "role_name": "Manager"},
{"role_id": 4, "role_name": "Affiliate"}
]
}List Account Managers
Returns account managers and their current status. Use this endpoint to retrieve valid account_manager_id values for affiliate and advertiser assignments.
GET /api/2/account_managers.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| account_manager_id | integer | No | Filter to a single account manager by ID. |
| account_manager_status | string | No | Filter by status: active or inactive. |
Sample request
GET https://yourdomain.cake.com/api/2/account_managers.json?api_key=YOUR_API_KEY&account_manager_status=activeSample response
{
"request_status": "Success",
"account_managers": [
{"account_manager_id": 4, "name": "Alex Johnson", "email": "alex@yournetwork.com", "status": "active"},
{"account_manager_id": 5, "name": "Jane Smith", "email": "jane@yournetwork.com", "status": "active"}
]
}If you have any questions, please reach out to your dedicated CAKE Client Success Manager/Account Manager or contact the CAKE Support Team at support@getCAKE.com.