---
name: "directory_create_user"
area: "directory"
title: "Create an account for a joiner"
price: "$0.25"
method: "POST"
url: "https://api.conecto.chat/v1/tools/directory_create_user"
mcp_server: "https://api.conecto.chat/mcp/directory"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/directory/directory_create_user"
---

# Create an account for a joiner (`directory_create_user`)

Opens a joiner's account with their title, department and groups; no password passes Conecto.

Open a joiner's account in the directory, with their title, department and groups. Okta emails them their own activation link; in Entra ID they start with the company's usual way in (a Temporary Access Pass or a reset). Conecto never sees a password.

Price: $0.25 a call. A call that fails costs nothing.

## Use it when

Someone starts and needs their work account.

- For their HR record, use [hr_save_people](https://conecto.chat/tools/hr/hr_save_people.md).

## Say this to your agent

> Jonas Becker starts in the warehouse on Monday as a warehouse operative. Set up his account.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `first_name` | string | yes | 1 to 80 characters. |  |  |
| `last_name` | string | yes | 1 to 80 characters. |  |  |
| `email` | string | yes | Their work address and sign-in name. 3 to 200 characters. |  |  |
| `title` | string | no | Up to 120 characters. |  |  |
| `department` | string | no | Up to 120 characters. |  |  |
| `groups` | array of strings | no | Group ids to add them to. Up to 20 items. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `directory_create_user` on the MCP server `https://api.conecto.chat/mcp/directory` with these arguments:

```json
{
  "first_name": "Jonas",
  "last_name": "Becker",
  "email": "jonas.becker@hansenvoss.example",
  "title": "Warehouse operative",
  "department": "Warehouse",
  "groups": [
    "00g1warehouse"
  ]
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/directory_create_user \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"first_name": "Jonas", "last_name": "Becker", "email": "jonas.becker@hansenvoss.example", "title": "Warehouse operative", "department": "Warehouse", "groups": ["00g1warehouse"]}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "directory_create_user",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.25",
  "balance_usd": "$19.75",
  "result": {
    "person": {
      "id": "00u3",
      "name": "Jonas Becker",
      "email": "jonas.becker@hansenvoss.example",
      "title": "Warehouse operative",
      "department": "Warehouse",
      "enabled": true,
      "status": "active"
    },
    "groups_added": 1,
    "next": "Okta emails them an activation link."
  }
}
```

`result`: person: the new account; groups_added; next: how they sign in the first time.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_connected` | 409 | No directory is connected yet. | Connect Entra ID or Okta with directory_connect. |
| `conflict` | 409 | The directory has that person already. | Update them instead. |
| `invalid_input` | 400 | email is not an address. | Give their work address. |
| `directory_rejected` | 502 | The directory refused, usually because a permission is missing. | Ask its admin to grant what the message names. |
| `directory_unavailable` | 503 | The directory could not be reached. | Try again in a minute; nothing changed. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [directory_connect](https://conecto.chat/tools/directory/directory_connect.md): Connects the company's Microsoft Entra ID or Okta, checked by reading one person. $0.001 a call.
- [directory_list_users](https://conecto.chat/tools/directory/directory_list_users.md): People in the directory with their name, email, title, department and whether they can sign in. Free up to 1,000,000 reads a month.
- [directory_get_user](https://conecto.chat/tools/directory/directory_get_user.md): One person in the directory by id or email. Free up to 1,000,000 reads a month.
- [directory_list_groups](https://conecto.chat/tools/directory/directory_list_groups.md): The directory's groups with their id, name and description. Free up to 1,000,000 reads a month.
- [directory_update_user](https://conecto.chat/tools/directory/directory_update_user.md): Changes a person's title, department or manager in the directory. $0.01 a call.
- [directory_set_groups](https://conecto.chat/tools/directory/directory_set_groups.md): Adds a person to groups and takes them out of others. $0.01 a call.
- [directory_suspend_user](https://conecto.chat/tools/directory/directory_suspend_user.md): Blocks a leaver's sign-in and ends their sessions, after the owner approves by default. $0.25 a call.
- [directory_restore_user](https://conecto.chat/tools/directory/directory_restore_user.md): Lets a suspended person sign in again. $0.001 a call.
- [directory_sync_from_hr](https://conecto.chat/tools/directory/directory_sync_from_hr.md): Sets titles and departments in the directory as HR has them; dry_run shows the plan first. $0.01 a call.
- [directory_disconnect](https://conecto.chat/tools/directory/directory_disconnect.md): Forgets the directory's credentials; nothing in the directory changes. Free.
