> For the complete documentation index, see [llms.txt](https://synap.ac/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://synap.ac/docs/api/cookbook/register-a-user.md).

# Register a User

### Prerequisite reading

[Authentication](https://api-docs.synap.ac/authentication-634225m0.md)

[Users & Groups](https://academy.synap.ac/doc/users-and-groups/user-types)

### User resource

A `User` is any individual such as a student, an educator or an admin, that can access your portal. We have a few User-adjacent resources defined in the API which are used in specific contexts.

### Registering a single user

To create a single User account you can send a POST to `/v3/user-registrations`.

#### Register a student into the default Students user group

Unless a `userGroups` relationship is specified, all users are registered into the default Students User Group.

```curl
curl --location --request POST 'https://api.synap.ac/v3/user-registrations' \
--header 'Authorization: Bearer <PAT>' \
--header 'Content-Type: application/vnd.api+json' \
--data-raw '{
    "data": {
        "type": "UserRegistration",
        "attributes": {
            "name": "First Last",
            "emailAddress": "f.last@domain.com",
            "password": "PasswordABC123!"
        },
        "relationships": {}
    }
}'
```

#### Register an educator into an Educator User Group

Find an Educator User Group ID on platform. This can be either the default Educators or a custom Educator User Group. Add it as a relationship to the request.

```
--data-raw '{
    "data": {
        "type": "UserRegistration",
        "attributes": {
            "name": "First Last",
            "emailAddress": "f.last@domain.com",
            "password": "PasswordABC123!"
        },
        "relationships": {
             "userGroups": {
                "data": [
                    {
                        "id": "FID_EDU_001",
                        "type": "UserGroup"
                    }
                ]
            }
        }
    }
}'
```

:::warning\[] Although the `userGroups` relationship is an array field, right now we only support a single value. Registering into multiple groups is currently prohibited due to the potential of request timeouts.

When a user is added to a group they are immediately assigned all active content, such as Assignments, Collections and Exams. This process can take some time especially if the User Group has lots of assigned content. We plan to make some improvements in this area to enable multiple groups on registration in the near future. Until then, please reference the User Group API to add a user into another group after registration. :::

#### Register a student into a specific Sub Portal

Find the Sub Portal ID on platform. Add it as a relationship to the request.

```
--data-raw '{
    "data": {
        "type": "UserRegistration",
        "attributes": {
            "name": "First Last",
            "emailAddress": "f.last@domain.com",
            "password": "PasswordABC123!"
        },
        "relationships": {
             "subPortal": {
                "data":
                    {
                        "id": "FID_SUBP_001",
                        "type": "SubPortal"
                    }
            }
        }
    }
}'
```

#### Specify time zone, locale and disable welcome email

Try one of the optional attributes, such as disabling the Welcome Email from being sent, specifying the user's time zone and locale.

```
--data-raw '{
    "data": {
        "type": "UserRegistration",
        "attributes": {
            "name": "First Last",
            "emailAddress": "f.last@domain.com",
            "password": "PasswordABC123!",
            "locale": "it-IT",
            "timeZone": "Europe/Rome",
            "welcomeEmailDisabled": true
        },
        "relationships": {}
    }
}'
```

#### Add Custom Attributes

[Custom Attributes](https://academy.synap.ac/doc/portals/data-management/attributes) allow your organisation to define properties not present out-of-the-box.

```
--data-raw '{
    "data": {
        "type": "UserRegistration",
        "attributes": {
            "name": "First Last",
            "emailAddress": "f.last@domain.com",
            "password": "PasswordABC123!",
            "attr": {
                "employee-id": "int-123",
                "department": "Sales"
            }
        },
        "relationships": {}
    }
}'
```

### Registering multiple users

We are currently optimising our bulk import endpoint and hope to have this ready by Q3 2025. Until then you can safely make multiple calls to the above endpoint to register more than one user.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://synap.ac/docs/api/cookbook/register-a-user.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
