Use the newUserAssessments
mutation to obtain all available assessment URLs for the user.
A new user profile will be created if the provided email doesn't match an existing user.
Arguments
User's email. If the email isn't found, a new User will be created.
Optional external ID. If an external ID already exists for the user, the value will be overwritten.
Optional assessment Id to filter results.
Available Fields
Field Name
Type
Description
Example
mutation($input: NewUserAssessmentsInput!) {
newUserAssessments(input: $input) {
success
message
userId
externalId
assessments {
edges {
node {
id
title
url
}
}
}
}
}
variables = {
{'input':
{'email': 'tester@test.com',
'externalId': '8b62865d-229d-41dc-8af6-99f6f7a35010'
}}
}
{
"data":{
"newUserAssessments":{
"success":true,
"message":"Operation succeeded",
"userId":"VXNlcjpmYzkyZDdmYS0yNDMwLTRjOTItYmRmZS00MmZmOWNhOWVhZGI=",
"externalId":"dcc9f143-1578-4769-937b-4e052d7aa994",
"assessments":{
"edges":[
{
"node":{
"id":"QXNzZXNzbWVudDpmMDZiYzliMS01OGI2LTQ4ZjgtYWFkYS1kNjUyYjQ5OWQ3Y2I=",
"title":"Assessment-0"
}
},
{
"node":{
"id":"QXNzZXNzbWVudDo3NzM1NDc0Ni1iYzBhLTQ3MjQtYmRlOS0xMmVmZjFjZWQwZGM=",
"title":"Assessment-1"
}
},
{
"node":{
"id":"QXNzZXNzbWVudDoxNTNkMWFlYi0xMjkyLTQ1NDUtOTFiMS00MDU5YzhiM2ZiNDY=",
"title":"Assessment-2"
}
},
{
"node":{
"id":"QXNzZXNzbWVudDowY2RjODBlOS1lM2EyLTQ0YWQtODA0NC04ODEwNTE4M2FhMTE=",
"title":"Assessment-3"
}
}
]
}
}
}
}
Example with Assessment Filter
mutation($input: NewUserAssessmentsInput!) {
newUserAssessments(input: $input) {
success
message
userId
externalId
assessments {
edges {
node {
id
title
url
}
}
}
}
}
variables = {
{'input':
{'email': 'tester@test.com',
'externalId': '8b62865d-229d-41dc-8af6-99f6f7a35010',
'assessment': 'QXNzZXNzbWVudDowZTRjYTY0NC04YzcxLTQ1YzctYWYwMC1lOWQzNjc4ODc4NTU='
}}
}
{
"data":{
"newUserAssessments":{
"success":true,
"message":"Operation succeeded",
"userId":"VXNlcjphZTViOGJiNS02ODgyLTQ4YWEtYjIxNi1jNTNhZDllNTJiMWY=",
"externalId":"91124c24-8007-45bf-8f2e-c027b0787a3f",
"assessments":{
"edges":[
{
"node":{
"id":"QXNzZXNzbWVudDpiNWRjNzY4ZC0wMjA3LTQ5ODAtODBjMS1lZDRiZGUyNGE0MGQ=",
"title":"Assessment-0"
}
}
]
}
}
}
}