How to Manage Users and Roles via the CAKE API

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
ParameterTypeRequiredDescription
user_idintegerNoFilter by a specific user ID.
user_statusstringNoFilter by status: active or inactive.
role_idintegerNoFilter users assigned to a specific role.
start_at_rowintegerNoRow offset. Default: 1.
row_limitintegerNoMax results. Default: 25.

Sample request

GET https://yourdomain.cake.com/api/2/users.json ?api_key=YOUR_API_KEY &user_status=active &role_id=3

Sample 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
ParameterTypeRequiredDescription
first_namestringYesUser's first name.
last_namestringYesUser's last name.
emailstringYesUser's email address. Must be unique within the account.
role_idintegerYesID of the role to assign. Retrieve valid IDs from GET /api/2/roles.json.
user_statusstringYesInitial status: active or inactive.
passwordstringYesInitial 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
ParameterTypeRequiredDescription
role_idintegerNoFilter by a specific role ID.
role_namestringNoFilter by role name (exact match).

Sample request

GET https://yourdomain.cake.com/api/2/roles.json?api_key=YOUR_API_KEY

Sample 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
ParameterTypeRequiredDescription
account_manager_idintegerNoFilter to a single account manager by ID.
account_manager_statusstringNoFilter 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=active

Sample 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.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.