# Users

{% openapi src="<https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json>" path="/api/v3/users" method="get" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}

## add user

<mark style="color:green;">`POST`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/users`

#### Request Body

| Name             | Type    | Description                    |
| ---------------- | ------- | ------------------------------ |
| email            | String  | The user's email address       |
| failed\_attempts | Integer | Number of failed attempts      |
| logins           | integer | Number of login attempts       |
| realname         | String  | The user's real name           |
| password         | String  | The user's password            |
| last\_attempt    | String  | Date of previous login attempt |
| last\_login      | String  | Last login date                |
| gravatar         | String  | The user's gravatar            |
| role             | String  | user's roleString              |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "id": 0,
  "url": "string",
  "email": "string",
  "realname": "string",
  "logins": 0,
  "failed_attempts": 0,
  "last_login": "string",
  "last_attempt": "string",
  "created": "string",
  "updated": "string",
  "role": "string",
  "language": "string",
  "contacts": [
    {
      "id": "string",
      "user_id": "string",
      "data_source": "string",
      "type": "string",
      "contact": "string",
      "created": "string",
      "updated": "string",
      "can_notify": "string"
    }
  ],
  "allowed_privileges": [
    "string"
  ],
  "gravatar": "string"
}
```

{% endtab %}
{% endtabs %}

{% openapi src="<https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json>" path="/api/v3/users/3" method="get" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}

## edit user

<mark style="color:orange;">`PUT`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/users/1`

#### Request Body

| Name             | Type    | Description                    |
| ---------------- | ------- | ------------------------------ |
| email            | String  | The user's email address       |
| failed\_attempts | Integer | Number of failed attempts      |
| logins           | integer | Number of login attempts       |
| realname         | String  | The user's real name           |
| password         | String  | The user's password            |
| last\_attempt    | String  | Date of previous login attempt |
| last\_login      | String  | Last login date                |
| gravatar         | String  | The user's gravatar            |
| role             | String  | user's roleString              |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "id": 0,
  "url": "string",
  "email": "string",
  "realname": "string",
  "logins": 0,
  "failed_attempts": 0,
  "last_login": "string",
  "last_attempt": "string",
  "created": "string",
  "updated": "string",
  "role": "string",
  "language": "string",
  "contacts": [
    {
      "id": "string",
      "user_id": "string",
      "data_source": "string",
      "type": "string",
      "contact": "string",
      "created": "string",
      "updated": "string",
      "can_notify": "string"
    }
  ],
  "allowed_privileges": [
    "string"
  ],
  "gravatar": "string"
}
```

{% endtab %}
{% endtabs %}

## edit admin user

<mark style="color:orange;">`PUT`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/users/me`

#### Request Body

| Name             | Type    | Description                    |
| ---------------- | ------- | ------------------------------ |
| email            | String  | The user's email address       |
| failed\_attempts | Integer | Number of failed attempts      |
| logins           | integer | Number of login attempts       |
| realname         | String  | The user's real name           |
| password         | String  | The user's password            |
| last\_attempt    | String  | Date of previous login attempt |
| last\_login      | String  | Last login date                |
| gravatar         | String  | The user's gravatar            |
| role             | String  | user's roleString              |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "id": 0,
  "url": "string",
  "email": "string",
  "realname": "string",
  "logins": 0,
  "failed_attempts": 0,
  "last_login": "string",
  "last_attempt": "string",
  "created": "string",
  "updated": "string",
  "role": "string",
  "language": "string",
  "contacts": [
    {
      "id": "string",
      "user_id": "string",
      "data_source": "string",
      "type": "string",
      "contact": "string",
      "created": "string",
      "updated": "string",
      "can_notify": "string"
    }
  ],
  "allowed_privileges": [
    "string"
  ],
  "gravatar": "string"
}
```

{% endtab %}
{% endtabs %}

{% openapi src="<https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json>" path="/api/v3/users/80" method="delete" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}

{% openapi src="<https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json>" path="/api/v3/users/me" method="get" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}
