# Invite subaccount admin

> Add a team member and email them an invitation.

Source: https://docs.mycrmsim.com/docs/subaccount-admins/invite-subaccount-admin

```http
POST https://backend.mysmsgateway.app/api/v1/ext/subaccount-admins
```

- Category: myCRMSIM Subaccount Admins / Subaccount Admins
- Auth: Bearer access token
- Scope: `subaccount_admins.write`

No password is sent or set through the API. The person gets the same invitation email as from the dashboard, with a link to set their own password (valid 24 hours, works once). After that they can use **Forgot password** on the sign-in page.

Device limits come first. `android_quantity`, `imessage_quantity`, `whatsapp_quantity` and `rcs_quantity` set how many devices of each channel the admin may hold (the same limits as the dashboard form; they also cap how many devices the admin can connect themselves). The iMessage, WhatsApp and RCS limits cannot go above your own plan's quantity for that channel. Then assign devices by id, one array per channel: `android_device_ids`, `imessage_device_ids`, `whatsapp_device_ids`, `rcs_device_ids` — no more ids than the channel's limit. The limit and the ids can be sent in the same request.

Getting device ids: call List devices (Devices section, `GET /api/v1/ext/devices`, scope `devices.read`; add `?channel=android` to filter) and use each device's `id`, putting it in the array for its `channel`. Ids are unique only within a channel, so the same number can be an Android device and a WhatsApp number — always match the array to the device's `channel`. Only devices on the installer's own account can be assigned (404 otherwise).

Plan, white label and 2FA settings are set on the dashboard.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | body | string | yes | Full name, up to 255 characters. Example: `Sam Doe` |
| `email` | body | string | yes | They sign in with it. Must not be registered already. Example: `sam@example.com` |
| `workspace_ids` | body | array<number> | no | Workspaces of the account they can work in. Default none. Example: `[7]` |
| `status` | body | enum | no | Default active. One of: `active`, `inactive`. |
| `android_quantity` | body | number | no | How many Android (SMS) devices they may hold. No plan cap. Default 0. Example: `2` |
| `imessage_quantity` | body | number | no | How many iMessage devices they may hold. At most your plan's iMessage quantity. Default 0. Example: `1` |
| `whatsapp_quantity` | body | number | no | How many WhatsApp numbers they may hold. At most your plan's WhatsApp quantity. Default 0. Example: `1` |
| `rcs_quantity` | body | number | no | How many RCS senders they may hold. At most your plan's RCS quantity. Default 0. Example: `0` |
| `android_device_ids` | body | array<number> | no | Android (SMS) devices — ids from List devices where channel is "android". No more than android_quantity. Default none. |
| `imessage_device_ids` | body | array<number> | no | iMessage devices — ids where channel is "imessage". No more than imessage_quantity. Default none. |
| `whatsapp_device_ids` | body | array<number> | no | WhatsApp numbers — ids where channel is "whatsapp". No more than whatsapp_quantity. Default none. |
| `rcs_device_ids` | body | array<number> | no | RCS senders — ids where channel is "rcs". No more than rcs_quantity. Default none. |

## Request body

```json
{
  "name": "Sam Doe",
  "email": "sam@example.com",
  "workspace_ids": [
    7
  ],
  "android_quantity": 2,
  "android_device_ids": [
    12
  ]
}
```

## Response fields (subaccount_admin)

| Field | Type | Description |
| --- | --- | --- |
| `id` | number | User id — also the assignee_id for tasks, appointments and opportunities. |
| `name` | string | Full name. |
| `email` | string | The email they sign in with. |
| `status` | string | "active" or "inactive". An inactive admin cannot sign in. |
| `workspaces` | array<object> | The workspaces they can work in: id and name. |
| `devices` | object | Devices assigned to them, per channel (android, imessage, whatsapp, rcs): id and name. |
| `device_limits` | object | How many devices of each channel they may hold: android, imessage, whatsapp, rcs (numbers). |
| `created_at` | string (ISO 8601) | When they were added. |

## Response 201

Invited

```json
{
  "success": true,
  "message": "Subaccount admin invited. They set their password from the invitation email (link valid 24 hours).",
  "data": {
    "id": 41,
    "name": "Sam Doe",
    "email": "sam@example.com",
    "status": "active",
    "workspaces": [
      {
        "id": 7,
        "name": "Lee Studio"
      }
    ],
    "devices": {
      "android": [
        {
          "id": 12,
          "name": "Pixel 8"
        }
      ],
      "imessage": [],
      "whatsapp": [],
      "rcs": []
    },
    "device_limits": {
      "android": 2,
      "imessage": 0,
      "whatsapp": 0,
      "rcs": 0
    },
    "created_at": "2026-10-27T09:00:00.000Z"
  }
}
```

## Response 400

Missing or invalid field

```json
{
  "success": false,
  "message": "email must be a valid email address"
}
```

## Response 400

More devices than the limit, or a limit above your plan

```json
{
  "success": false,
  "message": "Android device limit reached: android_quantity is 2, so no more than 2 Android device(s) can be assigned, but this would make 3. Raise android_quantity (it can be sent in the same request) or send fewer devices."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): subaccount_admins.write. This integration was granted: …"
}
```

## Response 403

The token was installed by a subaccount admin, not the account owner

```json
{
  "success": false,
  "message": "Only a token installed by the account owner can manage subaccount admins."
}
```

## Response 404

A workspace is not the account's

```json
{
  "success": false,
  "message": "One or more workspaces not found or not accessible to this token"
}
```

## Response 404

A device is not the account's

```json
{
  "success": false,
  "message": "One or more workspaces or devices not found or not accessible to this token"
}
```

## Response 409

The email is already registered

```json
{
  "success": false,
  "code": "DUPLICATE_EMAIL",
  "message": "That email is already registered"
}
```
