Users

get
Visitor

https://api.commander1.com/v1.0/engage/visitors/
This endpoint allows you to get properties for one specific visitor. When you create the token, you can define which properties to return. This API is more designed to be called from a tag in each user's browser.
Request
Response
Request
Query Parameters
callback
optional
string
(optional) Callback for jsonp request
token
required
string
Security token
site
required
integer
ID of the site
tcid
optional
string
Cookie id. If empty (recommanded) it will read the tcid in the user's cookie.
Response
200: OK
{
"user_age": 39,
"user_privacy_categories": [
"11",
"12",
"13"
]
}

get
User

https://api.commander1.com/engage/user/
This endpoint allows you to get properties for one specific user based on a user_id. When you create the token, you can define which properties to return.
Request
Response
Request
Query Parameters
token
required
string
Security token
user_id
required
string
ID of the user
site
required
integer
ID of the site
Response
200: OK
Consent successfully retrieved.
{
"user_age": 39,
"user_privacy_categories": [
"11",
"12",
"13"
]
}
404: Not Found
Could not find a user matching this query.
{
"message": "Person not found"
}

put
User

https://api.commander1.com/engage/user/
Insert or update a user
Request
Response
Request
Query Parameters
site
required
string
Id of the site (account)
user_id
required
string
Id of the user. Required if tc_id parameter is not set
tc_id
optional
string
Optional. Cookie id of the user
token
optional
string
Security token
Response
200: OK
{"success":true}

Example Request

PUT

https://api.commander1.com/engage/user/?site=1234&user_id=1234&tc_id=1234&token=WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA

{
"preferences.channel":"email",
"preference.frequency":"30d",
...
}

DELETE user

Delete a user

Resource URL

https://api.commander1.com/engage/user/

Resource Information

Response formats

JSON

Requires authentication?

Yes (token)

Parameters

NAME

REQUIREMENT

EXAMPLE VALUES

DESCRIPTION

site

d+

1234

Id of the site

user_id

d+

1234

Id of the user

tc_id (optional)

d+

1234

Id of the visitor

token

[a-zA-Z0-9]*

WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA

Security token

Example Request

DELETE

https://api.commander1.com/engage/user/?site=1234&user_id=1234&tc_id=1234&token=WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA

Response

{"success":true}