---
title: User
slug: docs/user
docTags: 
createdAt: 2021-08-04T18:22:29.000Z
---

# The Users' Endpoint

:::CodeblockTabs
HTTP

```none
POST https://www.regpack.com/reg/api2/users/
```
:::

The users endpoint allows you to perform a series of actions such as creating, deleting, or updating your users. Each section below describes a different action.

# Basic structure

Each call to the API requires an action and a `group_id`, but often, user calls will include `doc` and `clogin_id`.

| Name        | Type    | Required | Description                                                                                                                                                               |
| ----------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action`    | string  | true     | This describes what you would like to do with the API. Actions include `create`, `create_child`, `login`, `update`, `add_product`, `add_email`, `get_info`, `set_status`. |
| `group_id`  | integer | true     | This designates which project the change should be applied to. `API-id` in the header must be part of the organization that owns the group.                               |
| `clogin_id` | integer | true\*   | This is a central login ID which identifies a single user between any projects within your organization.                                                                  |
| `doc`       | JSON    | false    | This is the user data you would like to include in the request, formatted as JSON.                                                                                        |

\* This is mandatory on all calls except for `create`, since a new user will not yet have a `clogin_id`.

# Additional arguments

| Name                    | Type    | Required | Description                                                                                                                                                                                                                                                                                                              |
| ----------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `connected_to`          | integer | false    | This is the `clogin_id` of a parent and is only relevant in family systems.                                                                                                                                                                                                                                              |
| `submit_forms`          | boolean | false    | This prevents the user's forms from submitting. This is generally advised if you want to prevent the update from activating triggers which are set in your project. `false` will prevent the forms from submitting, but `true` is the default.                                                                           |
| `disable_email_sending` | boolean | false    | This specifically prevents any emails from automatically sending as a result of an API call. `true` will prevent the emails from sending and `false` will allow emails to be sent. Although `false` is the default, it is generally advised that you set this to `true` if you're not sure of what emails might trigger. |

# User metadata

With every call to the API that involves the users endpoint, the system will return at least two objects by default: `meta_info` and `user_info`. `meta_info` provides a summary snapshot of the user's progress, while `user_info` is provided as a convenience for user identification,

Examples of each are below:

# meta\_info

```json
{
    "meta_info": {
        "u_name": "Jim Hall",
        "total_forms": "2",
        "completed_forms": "0",
        "total_user_forms": "2",
        "total_completed_user_forms": "0",
        "total_user_mandatory_forms": "2",
        "total_completed_user_mandatory_forms": "0",
        "total_order": "0.00",
        "total_paid": "0.00",
        "total_balance": "0.00",
        "status_id": "0",
        "status_name": null,
        "status_color": null,
        "application_date": "Dec 8th 2021 17:20",
        "application_date_raw": "2021-12-08 17:20:08",
        "u_comments": "0",
        "group_id": "100909072",
        "uid": "4085257",
        "clogin_id": "102715741",
        "excluded": "0",
        "connected_to": "102715741",
        "total_user_tags": "0",
        "user_tag_ids": null,
        "total_non_excluded_children": "0",
        "star": "0",
        "admin_initials": null,
        "admin_color": null,
        "assigned_admin_id": null
    }
}
```

# user\_info

The key thing to note is that `connected_to` relates child to parent. For a parent or an individual, `connected_to` will be identical to their own `clogin_id`,  while for a child `connected_to` will be `clogin_id` for their respective parent.&#x20;

```json
{
      "user_info": {
        "clogin_id": "102715741",
        "group_id": "100909072",
        "connected_to": "102715741"
    }
}
```



# Example call


This would be an example cURL which creates a user.

```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "create",
    "group_id": 100909072,
    "clogin_id": false,
    "doc": {
        "username": "jim_hall@regpacks.com",
        "password": "dont_just_play_something_sit_there!",
        "org_name": "Jim Hall Trio",
        "main_email": "jim_hall@regpacks.com",
        "first_name": "Jim",
        "last_name": "Hall"
    }
}
```

Example response



```json
{
    "msg": "User registered.",
    "system_action": [
        "user_registered"
    ],
    "success": true,
    "user_info": {
        "clogin_id": "102715741",
        "group_id": "100909072",
        "connected_to": "102715741"
    },
    "meta_info": {
        "u_name": "Jim Hall",
        "total_forms": "2",
        "completed_forms": "0",
        "total_user_forms": "2",
        "total_completed_user_forms": "0",
        "total_user_mandatory_forms": "2",
        "total_completed_user_mandatory_forms": "0",
        "total_order": "0.00",
        "total_paid": "0.00",
        "total_balance": "0.00",
        "status_id": "0",
        "status_name": null,
        "status_color": null,
        "application_date": "Dec 8th 2021 17:20",
        "application_date_raw": "2021-12-08 17:20:08",
        "u_comments": "0",
        "group_id": "100909072",
        "uid": "4085257",
        "clogin_id": "102715741",
        "excluded": "0",
        "connected_to": "102715741",
        "total_user_tags": "0",
        "user_tag_ids": null,
        "total_non_excluded_children": "0",
        "star": "0",
        "admin_initials": null,
        "admin_color": null,
        "assigned_admin_id": null
    }
}
```






