> For the complete documentation index, see [llms.txt](https://api-docs.devhub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.devhub.com/single-sign-on-sso/assigning-a-sites-user.md).

# Assigning a site's user

## Passing a `partner_user_id`

This is the unique user ID you use for this user internally (i.e. their login to your system or a customer ID). If you provide a `partner_user_id` in the params, you don't need to include `user_id` in your request.

In addition to supplying `partner_user_id`, unless you are certain that a User account has been created already on our side, you will need to also pass the user's details to us. These are `first_name`, `last_name`, and `email`. These fields are used to automatically create a User account on our side if it does not already exist. If you are not sure if a user account is already created for the supplied `partner_user_id`, then you can always pass these values to maintain consistency.

### Example of the `partner_user_id` param being used

```javascript
{
  "subdomain": "www"
  "domain": "somebusinessname.com",
  ...

  "partner_user_id": 12345,
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@gmail.com"
}
```


---

# 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://api-docs.devhub.com/single-sign-on-sso/assigning-a-sites-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.
