User Management
The User APIs allow you to programmatically create and manage individual Brainshark user accounts. These endpoints are essential for syncing your internal employee or customer databases with Brainshark to automate access and reporting.
What you'll learn:
- How to create new user accounts
- Retrieve user profile information
Use action=1 to create users and action=6 to get user info. All requests go to
/brainshark/webservices_mobile/user.ashx.
- An authenticated session (
sid,sky,uid) — see Authentication - Admin privileges for most operations
Create a New User
Use this endpoint to create a new user account. By default, accounts are cloned from a self-registration template, inheriting specific viewing rights and group memberships.
Request
| Method | Endpoint | Description |
|---|---|---|
| GET | /brainshark/webservices_mobile/user.ashx | Creates a new user account. |
Parameters
| Parameter | Type | Description |
|---|---|---|
sid, sky, uid | - | Standard session identifiers. |
type | integer | Required. Must be set to 2 for Brainshark. |
action | integer | Required. Must be set to 1 for user creation. |
login_dir | string | Required. The company's unique site directory. |
firstname | string | Required. The user's first name. |
lastname | string | Required. The user's last name. |
email | string | Required. The user's email address. This is used as the default username if username is not provided. |
username | string | Optional. A unique username for the account. |
password | string | Optional. Sets the user's initial password. If omitted, a random password is generated. |
uci | string | Optional. A Unique Company Identifier. Useful for mapping Brainshark accounts to external IDs in your own database. |
source | string | Optional. Identifies the source of the user account creation. |
manager_username | string | Optional. Username of the user's manager. |
add | string | Optional. A secondary email address for the user. |
city | string | Optional. The user's city. |
state | string | Optional. The user's state or region. |
dept | string | Optional. The user's department. |
Company_Name | string | Optional. The user's company name. |
phone | string | Optional. The user's phone number. |
postalcode | string | Optional. The user's postal code. |
title | string | Optional. The user's job title. |
custom1–custom10 | string | Optional. Custom profile fields 1 through 10. |
sitename | string | Optional. The name of the site to register the user on (for multi-site setups). |
url | string | Optional. A URL associated with the user. |
sso_key | string | Optional. SSO key for the user account. |
Is_active | boolean | Optional. Controls whether the account is active on creation. Default: true |
To create users via this API, Self Registration must be enabled in your Brainshark company settings.
Example request
- cURL
- JavaScript
- Python
curl -G "https://www.brainshark.com/brainshark/webservices_mobile/user.ashx" \
--data-urlencode "type=2" \
--data-urlencode "action=1" \
--data-urlencode "login_dir=test-company" \
--data-urlencode "firstname=John" \
--data-urlencode "lastname=Smith" \
--data-urlencode "email=jsmith@example.com" \
--data-urlencode "uci=EMP-12345"
const params = new URLSearchParams({
type: 2,
action: 1,
login_dir: 'test-company',
firstname: 'John',
lastname: 'Smith',
email: 'jsmith@example.com',
uci: 'EMP-12345',
});
const response = await fetch(`https://www.brainshark.com/brainshark/webservices_mobile/user.ashx?${params}`);
const data = await response.json();
console.log(data);
import requests
url = "https://www.brainshark.com/brainshark/webservices_mobile/user.ashx"
params = {
"type": 2,
"action": 1,
"login_dir": "test-company",
"firstname": "John",
"lastname": "Smith",
"email": "jsmith@example.com",
"uci": "EMP-12345"
}
response = requests.get(url, params=params)
print(response.json())
Example response
{
"Id": 2548390,
"Username": "jsmith@example.com",
"Email": "jsmith@example.com",
"FullName": "John Smith",
"UCI": "EMP-12345"
}
Get User Information
Retrieve detailed demographic and profile information for a specific Brainshark user.
Request
| Method | Endpoint | Description |
|---|---|---|
| GET | /brainshark/webservices_mobile/user.ashx | Returns profile data for the specified username. |
Parameters
| Parameter | Type | Description |
|---|---|---|
sid, sky, uid | - | Standard session identifiers from an administrative login. |
type | integer | Required. Set to 2. |
action | integer | Required. Set to 6. |
login_dir | string | Required. The company's unique site directory. |
username | string | Required. The username of the account you wish to query. |
Example request
- cURL
- JavaScript
- Python
curl -X GET "https://www.brainshark.com/brainshark/webservices_mobile/user.ashx?type=2&action=6&login_dir=test-company&username=jsmith@example.com&sid=987654321&sky=x9y8z7w6v5u4t3s2r1q0&uid=2548390"
const params = new URLSearchParams({
type: 2,
action: 6,
login_dir: 'test-company',
username: 'jsmith@example.com',
sid: '987654321',
sky: 'x9y8z7w6v5u4t3s2r1q0',
uid: 2548390,
});
const response = await fetch(`https://www.brainshark.com/brainshark/webservices_mobile/user.ashx?${params}`);
const data = await response.json();
console.log(data);
import requests
url = "https://www.brainshark.com/brainshark/webservices_mobile/user.ashx"
params = {
"type": 2,
"action": 6,
"login_dir": "test-company",
"username": "jsmith@example.com",
"sid": "987654321",
"sky": "x9y8z7w6v5u4t3s2r1q0",
"uid": 2548390
}
response = requests.get(url, params=params)
print(response.json())
Example response
{
"Id": 2548390,
"Username": "jsmith@example.com",
"FullName": "John Smith",
"Email": "jsmith@example.com",
"Title": "Regional Manager",
"UCI": "EMP-12345",
"isActive": true
}
Was this page helpful?