---
title: "Add account member"
method: POST
path: "/api/v1/members"
tags: ["Members"]
---

# Add account member

`POST /api/v1/members`

Add a new member to the account. There are three ways:

- **Email invitation** — pass `email` only. An invitation is sent; the recipient accepts it from the dashboard. The member appears in `pending` status until accepted. Equivalent to calling `POST /api/v1/invitations` directly.
- **Direct add** — pass `target_user_id` for a user who already has an account on Raff (e.g. a project-only user being promoted to account member).
- **API key** — pass `api_key_id` to make an existing API key a member with the given role. Mutually exclusive with `email` and `target_user_id`.

## Request body

- AddMemberRequest
  - `email` string, email — Email to invite. Mutually exclusive with `target_user_id` and `api_key_id`.
  - `target_user_id` string, uuid — User UUID to add directly. The user must already exist on Raff (e.g. an existing project-only member). Mutually exclusive with `email` and `api_key_id`.
  - `api_key_id` string, uuid — API key UUID to grant account-level access via this membership. Mutually exclusive with `email` and `target_user_id`.
  - `role_id` string, uuid — Role UUID. Required.

## Response `201`

Member added (or invitation sent)

- object
  - `success` boolean
  - `data` Member
    - `id` string, uuid, required — Account member ID
    - `account_id` string, uuid
    - `user_id` string, uuid, nullable — User UUID. `null` for pending invitations until the invitee accepts.
    - `email` string, email, required
    - `role` string — Role slug (deprecated — prefer `role_id` and `role_name`)
    - `role_id` string, uuid
    - `role_name` string
    - `status` 'pending' | 'active' | 'suspended', required — Membership status: - `pending` — invited but not yet accepted - `active` — full member - `suspended` — temporarily disabled by an admin
    - `invited_by` string, uuid
    - `invited_at` string, date-time
    - `accepted_at` string, date-time
    - `invitation_id` string, uuid — Set when `status` is `pending` — the underlying invitation ID. Use [Cancel Invitation](#tag/Invitations/operation/cancelInvitation) to revoke.
    - `invitation_expires_at` string, date-time
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400` — Invalid request parameters

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/2f4df56be77c/schema)
