> For the complete documentation index, see [llms.txt](https://developer.perculus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.perculus.com/services/participant-management/attandee-update.md).

# Updating Participants

{% hint style="danger" %}
**Important Note!**\
\
Constructor Groups’ V1 API has been retired and is no longer available to new customers. Please use the Groups V2 API going forward.\
\
Link to V2 API documentation: <https://developer.perculus.com/v2-en>
{% endhint %}

There are two ways to update participant details for a session:

* [ATTENDANCE\_CODE](#with-attendance_code)
* [EMAIL](#with-email)

### With ATTENDANCE\_CODE

{% hint style="warning" %}
You need the **SESSION\_ID** of the session and the **ATTENDANCE\_CODE**, which is the participant ID of the user, to update the participant in a session.
{% endhint %}

Available parameters:

| Parameters | Type   | Description                                                             |
| ---------- | ------ | ----------------------------------------------------------------------- |
| name       | string | Name of the participant                                                 |
| surname    | string | Surname of the participant                                              |
| email      | string | Email of the participant                                                |
| role       | string | Role of the user([see](/accepted-formats/roles.md) for possible values) |
| mobile     | string | Mobile phone of the participant                                         |

**Example Payload:**

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

```bash
curl --location --request PUT 'https://<DOMAIN>/xapi/session/<SESSION_ID>/attendee/<ATTENDANCE_CODE>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "test",
    "surname": "surname"
    "role": "u"
}'
```

{% endtab %}

{% tab title="Python" %}

```python
from perculus_sdk.client import APIClient

# API client
client = APIClient()
...

# Update an Attendee by ATTENDANCE_CODE
attendee = client.attendees.update_by_attendance_code(
    session_id="<SESSION_ID>",
    attendance_code="<ATTENDANCE_CODE>",
    attendee={
        "name": "<NAME>",
        "surname": "<SURNAME>"
        "role": "<ROLE>"
    }
)
print(attendee)
```

{% endtab %}

{% tab title="C#" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import APIClient from "perculus-sdk"

// API client
const client = new APIClient()
...

// Update Attendee
const attendee = client.attendees.updateAttendee(
    "<SESSION_ID>", "<ATTENDANCE_CODE>",
    {
        name: "test",
        surname: "surname"
        role: "u"   
    }    
)
console.log(attendee)
```

{% endtab %}

{% tab title="GO" %}

```
// ASAP :)
```

{% endtab %}
{% endtabs %}

### With EMAIL

{% hint style="warning" %}
You need the **SESSION\_ID** of the session and the **EMAIL,** which is the email of the user, to update the participant in a session.
{% endhint %}

Available parameters:

| Parameters | Type   | Description                                                             |
| ---------- | ------ | ----------------------------------------------------------------------- |
| name       | string | Name of the participant                                                 |
| surname    | string | Surname of the participant                                              |
| email      | string | Email of the participant                                                |
| role       | string | Role of the user([see](/accepted-formats/roles.md) for possible values) |
| mobile     | string | Mobile phone of the participant                                         |

**Example payload:**

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

```bash
curl --location --request PUT 'https://<DOMAIN>/xapi/session/<SESSION_ID>/attendee/<EMAIL>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "test",
    "surname": "surname"
    "role": "u"
}'
```

{% endtab %}

{% tab title="Python" %}

```python
from perculus_sdk.client import APIClient

# API client
client = APIClient()
...

# Update an Attendee by EMAIL
attendee = client.attendees.update_by_email(
    session_id="<SESSION_ID>",
    email="<EMAIL>",
    attendee={
        "name": "<NAME>",
        "surname": "<SURNAME>"
        "role": "<ROLE>"
    }
)
print(attendee)
```

{% endtab %}

{% tab title="C#" %}

```
// ASAP :)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import APIClient from "perculus-sdk"

// API client
const client = new APIClient()
...

// Update Attendee
const attendee = client.attendees.updateAttendee(
    "<SESSION_ID>", "<EMAIL>",
    {
        name: "test",
        surname: "surname"
        role: "u"   
    }    
)
console.log(attendee)
```

{% endtab %}

{% tab title="GO" %}

```
// ASAP :)
```

{% endtab %}
{% endtabs %}
