# Add user to journey

Use the `addUserToJourney` mutation to assign a user to a WGPT journey.

## **Arguments**

<table data-header-hidden><thead><tr><th>Argument</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Argument</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>input</code></td><td>Input</td><td></td></tr><tr><td><code>input.journey</code></td><td>ID!</td><td>Id of the journey to assign.</td></tr><tr><td><code>input.portalUser</code></td><td>ID!</td><td>Id of the Coach to assign.</td></tr><tr><td><code>input.profile</code></td><td>ID!</td><td>User Id base64 encoded.</td></tr></tbody></table>

## Available Fields

The following fields will be displayed in the response:

| Field     | Type   | Description                                                                          |
| --------- | ------ | ------------------------------------------------------------------------------------ |
| `success` | string | **True** if the user has been assigned to journey successfully. Otherwise, **False** |
| `message` | string | Description of the result                                                            |

## **Examples**

### Setup a user's password

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

```graphql
mutation{
  addUserToJourney (input:{journey:"Sm91cm5leTowNTM1NDgwNC0xZWVlLTQzN2YtYjczNS01N2IwZGE2MzA0ZDQ=" portalUser:"Q29hY2g6NzczMA==" profile:"TWVtYmVyOjMwNmEzMmI5LTJkZjAtNGM1MS05MmM4LWQwMDJiODE0NGE0MA=="}){
    success
    message
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "createUser": {
      "success": true,
      "message": "User assigned to journey"
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://docs.suggestic.com/graphql/query/mutations/ai-assistant/new-user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
