# Edit User

{% hint style="info" %}
Edit User Details
{% endhint %}

### Edit User Information

<img src="/files/NKwIxXq4lz2lMBey9soq" alt="API:- https://matar.in.ngrok.io/api/v1/edit_user" class="gitbook-drawing">

### Params

**Header Parameter ⬇️**

<table data-full-width="false"><thead><tr><th width="217.33333333333331">Header Parameter</th><th width="129">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Bearer {{access_token}} </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td><p>Provide Access Token for fetching User Account Details. Access Token is generated via the Submit OTP API endpoint.</p><p></p><p>Sample Access Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjgwMDI0MDIzLCJqdGkiOiI3NDQ0YWRjOS1lMDk4LTQ3YmEtOWYxZS04MmQ5MjgzMzAzMjYiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiRVFPS1NVIiwibmJmIjoxNjgwMDI0MDIzLCJleHAiOjE2ODAxOTY4MjN9.UWYCZXenkVS-SVgHlncOht-ckloNcPilUPoYAmH2Yfw.</p></td></tr></tbody></table>

**Body Parameter ⬇️**

<table data-full-width="false"><thead><tr><th width="239.33333333333331">Body Parameter</th><th width="116">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>name </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>Provide Name for Update.</td></tr><tr><td><strong>language </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>Provide Language for Update</td></tr><tr><td><strong>organization_id </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>Provide Organization ID for update</td></tr><tr><td><strong>image_url </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>Provide image url to update in the user profile.</td></tr></tbody></table>

***

**Sample Request ⬇️ (Body Parameter)**

```
curl --location 'https://matar.in.ngrok.io/api/v1/edit_user' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyODY2MDMwLCJqdGkiOiIyMzFiNTEzZS0xMTRlLTQzZmUtYTY4My03MmIxNzIxMzVmODQiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyODY2MDMwLCJleHAiOjE2OTM3MzAwMzB9.3uHoS3QV0Qfg8bQPPKXW47yPBfkqhCRrbG5lCEm1IoU' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Sri",
    "language": "ur-IN",
    "organization_id": "K7QUEV",
    "image_url": "https://listapp-images.s3.ap-south-1.amazonaws.com/matar_profile_05.png"
}'
```

**Responses ⬇️**

Status Code: **🟢200** (200 denotes **'ok'**)

```200
{
    "_id": "39501T",
    "image_url": "https://listapp-images.s3.ap-south-1.amazonaws.com/matar_profile_05.png",
    "language": "ur-IN",
    "name": "Sri",
    "phone_number": "917846234567",
    "roles": {
        "default": [
            "K7QUEV"
        ]
    }
}
```

Status Code: 🔴**404** (404 denotes **'Not found'**)

```
{
      
}
```

***

**Response Parameter Description:**

<table><thead><tr><th width="251">Response Parameter</th><th>Description</th></tr></thead><tbody><tr><td>_id</td><td>User ID</td></tr><tr><td>image_url</td><td>User Profile Image URL or Avatar</td></tr><tr><td>language</td><td>Language in which the user has signed in. To see all language types check <a href="https://app.archbee.com/public/PREVIEW-o7hw14NiYUSoBh_fwO3tH/PREVIEW-uN5Grg_GVNAr5Zv5aKjrc#OYc7P">Get all Languages</a> API Endpoint.</td></tr><tr><td>name</td><td>Name for the User Account</td></tr><tr><td>phone_number</td><td>Phone Number Linked to User Account</td></tr><tr><td>roles : default :</td><td>This contains the organization id in which the User has joined. To see the list of all organizations by org id check <a href="https://app.archbee.com/public/PREVIEW-o7hw14NiYUSoBh_fwO3tH/PREVIEW-nV9vykmU0cOZb1Q6ju0X0#uJGco">Get List of organizations</a> API endpoint.</td></tr></tbody></table>


---

# 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://gramhal.gitbook.io/matar/developer-reference/api/user-login/edit-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.
