Starting from Conversions API Gateway and Signals Gateway v2.2.0, up-to-date versions of the Control Plane API reference docs, including examples with sample data, can be accessed inside your gateway UI. To find these docs:
Adds a new user for a provided email address and role name.
POST https://{capig_domain}/hub/graphql/
_________________________________________________________________________________________________________________
mutation useAddUserAccountMutation(
$addUserWithRoleInput: AddUserWithRoleInput!
) {
userMutations {
addUserWithRole(input: $addUserWithRoleInput) {
userAlreadyExist
invitationLink
user {
id
email
status
roles {
name
displayName
}
isSelf
canBeDeleted
defaultTenantId
}
}
}
}
_________________________________________________________________________________________________________
input AddUserWithRoleInput {
email: String!
roleName: String!
}
AddUserWithRoleInput
| Field | Description |
|---|---|
| Required Email of the user |
| Required |
AddUserResponse
| Field | Description |
|---|---|
| Indicates whether the user already exist |
| Link to invite the user |
| User Object |
| Code | Description |
|---|---|
400 | Invalid input provided |
401 | Not authorized to add user |
404 | Role name not found or incorrect |
409 | User already exists in the account |
500 | Internal server error |
Mutation
mutation useAddUserAccountMutation(
$addUserWithRoleInput: AddUserWithRoleInput!
) {
userMutations {
addUserWithRole(input: $addUserWithRoleInput) {
userAlreadyExist
invitationLink
user {
id
email
status
roles {
name
displayName
}
}
}
}
}
Variables
{
"addUserWithRoleInput": {
"email": "tempUser1@testaccount.com",
"roleName": "advertiser-manage-wW58k7FQ"
}
}
{
"data": {
"userMutations": {
"addUserWithRole": {
"userAlreadyExist": false,
"invitationLink": "http://localhost:8443/auth/verify/?token=0MGaMI_FRDe80OAgrSSdZw&et=inv&email=tempUser1@testaccount.com",
"user": {
"id": "97a9753d-a469-4f23-8aa7-748e4cf86877",
"email": "tempuser1@testaccount.com",
"status": 2,
"roles": [
{
"name": "advertiser-manage-wW58k7FQ",
"displayName": "manage"
}
]
}
}
}
}
}
Allow adding and revoking of user roles.
POST https://{capig_domain}/hub/graphql/
_________________________________________________________________________________________________________________
mutation UserAccessChangeMutation(
$changeRoleForUserInput: ChangeRoleForUserInput!
) {
userMutations {
changeRoleForUser(input: $changeRoleForUserInput) {
user {
id
email
status
roles {
name
displayName
}
isSelf
canBeDeleted
defaultTenantId
}
}
}
}
_________________________________________________________________________________________________________
input ChangeRoleForUserInput {
userId: String!
roleToRevoke: String
roleToAdd: String
}
ChangeRoleForUserInput
| Field | Description |
|---|---|
| Required Unique identifier of the user |
| Optional |
| Optional A user can have only one set of permissions per advertiser/partner account. |
ChangeRoleForUserResponse
| Field | Description |
|---|---|
| User Object |
| Code | Description |
|---|---|
400 | Invalid input provided |
401 | Not authorized to revoke/add user |
404 | UserId/role name not found or incorrect |
500 | Internal server error |
Mutation
mutation UserAccessChangeMutation(
$changeRoleForUserInput: ChangeRoleForUserInput!
) {
userMutations {
changeRoleForUser(input: $changeRoleForUserInput) {
user {
id
email
roles {
name
displayName
}
}
}
}
}
Variables
{
"changeRoleForUserInput": {
"userId": "97a9753d-a469-4f23-8aa7-748e4cf86877",
"roleToRevoke": "advertiser-admin-wW58k7FQ",
"roleToAdd": "agency-admin"
}
}
{
"data": {
"userMutations": {
"changeRoleForUser": {
"user": {
"id": "97a9753d-a469-4f23-8aa7-748e4cf86877",
"email": "tempuser1@testaccount.com",
"roles": [
{
"name": "agency-admin",
"displayName": "admin"
}
]
}
}
}
}
}
Generates invitation link for new users. Also, if the SMTP feature is enabled, then an email will be sent to the provided email address else just the output is returned.
POST https://{capig_domain}/hub/graphql/
_________________________________________________________________________________________________________________
mutation ActivateElementMutation(
$sendInvitationInput: SendInvitationInput!
) {
userMutations {
sendInvitation(input: $sendInvitationInput)
}
}
_________________________________________________________________________________________________________
input SendInvitationInput {
email: String!
tenantId: String
userType: UserType!
}
SendInvitationInput
| Field | Description |
|---|---|
| Required Email of the user |
| Optional Unique identifier of the account. (For partner users, this should be null) |
| Required Type of user |
String | Invitation link for the user |
| Code | Description |
|---|---|
400 | Invalid input provided |
401 | The user is not authorized to send invitation |
404 | Unable to find user for the |
500 | Internal server error |
Mutation
mutation ActivateElementMutation(
$sendInvitationInput: SendInvitationInput!
) {
userMutations {
sendInvitation(input: $sendInvitationInput)
}
}
Variables
{
"sendInvitationInput": {
"email": "tempuser1@testaccount.com",
"tenantId": "wW58k7FQ",
"userType": "ADVERTISER"
}
}
"data": {
"userMutations": {
"sendInvitation": "http://localhost:8443/auth/verify/?token=uo3hMrl1QEeUtx5PXRoUvg&et=inv&email=tempuser1@testaccount.com"
}
}