> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/mutations/assessments/new-user-assessments.md).

# New User Assessments

Use the `newUserAssessments` mutation to obtain all available assessment URLs for the user.&#x20;

A new user profile will be created if the provided email doesn't match an existing user.

### Arguments

| Argument     | Type    | Description                                                                                         |
| ------------ | ------- | --------------------------------------------------------------------------------------------------- |
| `email`      | String! | User's email. If the email isn't found, a new User will be created.                                 |
| `externalId` | String  | Optional external ID. If an external ID already exists for the user, the value will be overwritten. |
| `assessment` | ID      | Optional assessment Id to filter results.                                                           |

### Available Fields

| Field Name    | Type         | Description              |
| ------------- | ------------ | ------------------------ |
| `UserId`      | ID           | The user's ID            |
| `externalId`  | ID           | User's external ID       |
| `assessments` | \[Assessment | Assessment's information |

### Example

{% tabs %}
{% tab title="Request" %}

```graphql
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'
    }}
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
   "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"
                  }
               }
            ]
         }
      }
   }
}

```

{% endtab %}
{% endtabs %}

### Example with Assessment Filter

{% tabs %}
{% tab title="Request" %}

```graphql
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='
    }}
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
   "data":{
      "newUserAssessments":{
         "success":true,
         "message":"Operation succeeded",
         "userId":"VXNlcjphZTViOGJiNS02ODgyLTQ4YWEtYjIxNi1jNTNhZDllNTJiMWY=",
         "externalId":"91124c24-8007-45bf-8f2e-c027b0787a3f",
         "assessments":{
            "edges":[
               {
                  "node":{
                     "id":"QXNzZXNzbWVudDpiNWRjNzY4ZC0wMjA3LTQ5ODAtODBjMS1lZDRiZGUyNGE0MGQ=",
                     "title":"Assessment-0"
                  }
               }
            ]
         }
      }
   }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.suggestic.com/graphql/query/mutations/assessments/new-user-assessments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
