# Update

## Update End User

<mark style="color:green;">`POST`</mark> `https://api.explo.co/api/update_end_user/`

This endpoint updates an existing user group.  Currently, the only fields you can update is the name and data\_source field.

#### Headers

| Name                                                  | Type   | Description                                                                                                      |
| ----------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| Explo-Authorization<mark style="color:red;">\*</mark> | string | API authorization token which is unique to your team. You can access this in the Developers tab in your account. |

#### Request Body

| Name                                                   | Type   | Description                                            |
| ------------------------------------------------------ | ------ | ------------------------------------------------------ |
| provided\_id<mark style="color:red;">\*</mark>         | string | The ID of the end user you provided in creation        |
| end\_user\_group\_id<mark style="color:red;">\*</mark> | number | The ID of the end user group the end user belongs to   |
| email                                                  | string | A new email to associate the end user with             |
| attributes                                             | json   | A new set of attributes to associate the end user with |

{% tabs %}
{% tab title="200 " %}
```
{
    "success": 1,
    "end_user": {
        "provided_id": 3,
        "email": "example@explo.co",
        "attributes": "{'name': 'Example', 'header': '<div/>'",
    }
}
```
{% endtab %}
{% endtabs %}

**Response field descriptions**

<table data-header-hidden><thead><tr><th>Field Name</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td>Field Name</td><td>Type</td><td>Description</td></tr><tr><td>success</td><td>number</td><td>Indicates whether the call was successful. 1 if successful, 0 if not.</td></tr><tr><td>end_user.provided_id</td><td>string</td><td>This was the provided_id provided in the request body</td></tr><tr><td>end_user.emai</td><td>string</td><td>This was the email provided in the request body</td></tr><tr><td>end_user.attributes</td><td>string</td><td>This was the set of attributes provided in the request body</td></tr></tbody></table>

**Example Request**

```
curl --location --request POST 'https://api.explo.co/api/update_end_user/' \
--header 'Content-Type: application/json' \
--header 'Explo-Authorization: Token <token>' \
--data-raw '{
    "provided_id": "example_1",
    "email": "example@explo.co",
    "end_user_group_id": 123
}'
```
