# users v3 — NCM API

The v3 user records for a tenant: email, name, active flag, last login and any pending email change. Full lifecycle: list, create, update and delete users. Roles are not set here, so see tenant authorizations for tenant-wide permissions and account authorizations for per-account roles.

Base URL: https://api.cradlepointecm.com

### GET /api/v3/users

api_v3_beta_users_list

Return a list of users

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| filter[email] | query | string | no |  |
| filter[email][ne] | query | string | no |  |
| filter[first_name] | query | string | no |  |
| filter[first_name][ne] | query | string | no |  |
| filter[id] | query | string | no |  |
| filter[is_active] | query | string | no |  |
| filter[is_active][ne] | query | string | no |  |
| filter[last_login] | query | string | no |  |
| filter[last_login][gt] | query | string | no |  |
| filter[last_login][gte] | query | string | no |  |
| filter[last_login][lt] | query | string | no |  |
| filter[last_login][lte] | query | string | no |  |
| filter[last_login][ne] | query | string | no |  |
| filter[last_name] | query | string | no |  |
| filter[last_name][ne] | query | string | no |  |
| page[after] | query | string | no | Cursor for next page. |
| page[before] | query | string | no | Cursor for prior page. |
| page[size] | query | integer | no | Number of results to return per page. |
| search | query | string | no | The search query param performs a case insensitive substring search on a set of fields. <br> A record matches if any search field matches the search text. <br>If the search param doesn't include a field list, the server selects the fields. <br>Example:<ul><li>Search by substring: `search=substring1,substring2` </li><li>Search by field(s) and substring: `search[fieldA,fieldB]=substring1,substring2,substring3` </li><ul> |
| sort | query | array of string (email | -email | first_name | -first_name | last_name | -last_name | is_active | -is_active | last_login | -last_login) | no | Which field to use when ordering the results. |

**Example request**

```bash
curl "https://api.cradlepointecm.com/api/v3/users" \
  -H "Authorization: Bearer <token>"
```

**Response 200**

```json
{
  "data": {
    "type": "users",
    "id": "DyGDWX1TxzAbhudD",
    "attributes": {
      "email": "john.smith@somedomain.com",
      "first_name": "John",
      "last_name": "Smith",
      "is_active": true,
      "last_login": "2023-07-17T19:30:22.839949Z",
      "pending_email": null
    },
    "relationships": {
      "tenant": {
        "data": {
          "type": "tenants",
          "id": "5513t00001jcO5N"
        }
      }
    },
    "links": {
      "self": "https://api.cradlepointecm.com/api/v3/users/DyGDWX1TxzAbhudD"
    }
  }
}
```

### POST /api/v3/users

api_v3_beta_users_create

Create a user

**Request body**

**Example request**

```bash
curl -X POST "https://api.cradlepointecm.com/api/v3/users" \
  -H "Authorization: Bearer <token>"
```

**Response 201**

```json
{
  "data": {
    "type": "users",
    "id": "N9UWn5AWaCi2eaO5",
    "attributes": {
      "email": "mike.smith@somedomain.com",
      "first_name": "Mike",
      "last_name": "Smith",
      "is_active": true,
      "last_login": null,
      "pending_email": null
    },
    "relationships": {
      "tenant": {
        "data": {
          "type": "tenants",
          "id": "0016u00000FUees"
        }
      }
    },
    "links": {
      "self": "https://api.cradlepointecm.com/api/v3/users/N9UWn5AWaCi2eaO5"
    }
  }
}
```

### GET /api/v3/users/{id}

api_v3_beta_users_retrieve

Get a single user

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes |  |

**Example request**

```bash
curl "https://api.cradlepointecm.com/api/v3/users/{id}" \
  -H "Authorization: Bearer <token>"
```

**Response 200**

### PUT /api/v3/users/{id}

api_v3_beta_users_update

Update an existing user

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes |  |

**Request body**

**Example request**

```bash
curl -X PUT "https://api.cradlepointecm.com/api/v3/users/{id}" \
  -H "Authorization: Bearer <token>"
```

**Response 200**

```json
{
  "data": {
    "type": "users",
    "id": "wmB2E3oxropZDm3j",
    "attributes": {
      "email": "jdoe@somedomain.com",
      "first_name": "John",
      "last_name": "Doe Jr",
      "is_active": true,
      "last_login": null,
      "pending_email": null
    },
    "relationships": {
      "tenant": {
        "data": {
          "type": "tenants",
          "id": "0016u00000FUees"
        }
      }
    },
    "links": {
      "self": "https://api.cradlepointecm.com/api/v3/users/wmB2E3oxropZDm3j"
    }
  }
}
```

### DELETE /api/v3/users/{id}

api_v3_beta_users_destroy

Delete a user

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes |  |

**Example request**

```bash
curl -X DELETE "https://api.cradlepointecm.com/api/v3/users/{id}" \
  -H "Authorization: Bearer <token>"
```

**Response 204** — No response body
