> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/telewellness-portal/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/telewellness-portal/api-reference/coaches/invite-coach.md).

# Invite Coach

Use the `inviteCoach` to send a user invitation access to the coaching portal.

{% hint style="info" %}
This endpoint should be run on the "[Coaching Portal](https://production.suggestic.com/cp/graphql)"
{% endhint %}

## Input Fields

| **Field Name** | **Type** |                         **Description**                         |
| :------------: | :------: | :-------------------------------------------------------------: |
|      email     |  String  |                            user email                           |
|      name      |  String  |                            user name                            |
|    disabled    |  Boolean |     **True** if you want to disable user, otherwie F**alse**    |
|    makeAdmin   |  Boolean |      **True** to make coach **admin,** otherwise **False**      |
|   allowSeeAll  |  Boolean | **True** to allow coach to see all members, otherwise F**alse** |
|     members    |   Array  |                      Assign users to coach                      |

## Available Fields

The following fields will be displayed in the response:

| **Field Name** | **Type** |                              **Description**                              |
| :------------: | :------: | :-----------------------------------------------------------------------: |
|     success    |  Boolean | **True** if the coach has been invited successfully. Otherwise, **False** |
|     message    |  String  |                         Description of the result                         |
|      coach     |  Object  |                            Coach object details                           |

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

```graphql
mutation {
    inviteCoach(
        email: "randomuser@gmail.com"
        name: "Random User"
        disabled: False
        makeAdmin: False
        allowSeeAll: true
        members: ["ID"]
    ) {
        success message coach
    }
}
```

{% endtab %}

{% tab title="Example" %}

```graphql
{
  "data": {
    "inviteCoach": {
      "success": true,
      "message": "Invitation sent",
      "coach": {
        "id": "Q29hY2g6ODk2",
        "email": "randomuser@gmail.com",
        "name": "Random User",
        "isAdmin": true,
        "isDisabled": false,
        "createdAt": "2021-11-24T18:07:29.189670+00:00",
        "updatedAt": "2022-01-17T21:27:54.241497+00:00"
      }
    }
  }
}p
```

{% endtab %}
{% endtabs %}
