> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Member

> 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`.


<sub>Updated May 8, 2026</sub>


## OpenAPI

````yaml POST /api/v1/members
openapi: 3.0.3
info:
  title: Raff API
  description: >
    REST API for managing cloud infrastructure on Raff.


    ## Authentication

    Most endpoints require authentication via API key. Catalog endpoints under
    `/api/v1/public/` are open and require no authentication.


    ### API Key Authentication

    Include your API key in the `X-API-Key` header:
      ```
      curl -H "X-API-Key: YOUR_API_KEY" https://api.rafftechnologies.com/api/v1/vms
      ```

    ## Catalog

    Use the public catalog endpoints to discover available regions, OS
    templates, and pricing plans before creating resources:

    - `GET /api/v1/public/regions` — list available regions

    - `GET /api/v1/public/templates` — list OS templates (use the `id` as
    `template_id` when creating a VM)

    - `GET /api/v1/public/pricing/vm` — list VM pricing plans (use the `id` as
    `pricing_id` when creating a VM)

    - `GET /api/v1/public/pricing/volume` — volume storage pricing

    - `GET /api/v1/public/pricing/snapshot` — snapshot storage pricing

    - `GET /api/v1/public/pricing/backup` — backup storage pricing

    - `GET /api/v1/public/pricing/ip` — IP address pricing
  version: 1.0.0
  contact:
    name: Raff Technologies
    url: https://rafftechnologies.com
servers:
  - url: https://api.rafftechnologies.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Catalog
    description: >-
      Discover available regions, OS templates, and pricing plans. No
      authentication required.
  - name: Health
    description: Health check endpoints
  - name: Projects
    description: Organize resources into projects for billing and access control
  - name: Virtual Machines
    description: Create, manage, and control virtual machines
  - name: Networking
    description: >-
      Attach and detach VPCs, floating IPs, and security groups to VM network
      interfaces
  - name: Snapshots
    description: Point-in-time copies of VMs and volumes for quick rollback or cloning
  - name: Backups
    description: Scheduled and on-demand VM backups with restore capability
  - name: Backup Schedules
    description: Recurring daily or weekly backup schedules attached to a VM
  - name: SSH Keys
    description: Manage account-level SSH keys for VM provisioning
  - name: Members
    description: Account-level members — invite, list, update role, remove
  - name: Project Members
    description: Members of a specific project — same model as Members but project-scoped
  - name: Roles
    description: Custom roles bundling account or project permissions
  - name: Permissions
    description: List the catalog of permission strings used by roles
  - name: API Keys
    description: Create and manage API keys for programmatic access
  - name: Invitations
    description: Create and cancel email-based invitations to join the account or a project
paths:
  /api/v1/members:
    post:
      tags:
        - Members
      summary: Add account member
      description: >
        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`.
      operationId: addMember
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddMemberRequest'
      responses:
        '201':
          description: Member added (or invitation sent)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Member'
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  schemas:
    AddMemberRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          description: >-
            Email to invite. Mutually exclusive with `target_user_id` and
            `api_key_id`.
        target_user_id:
          type: string
          format: uuid
          description: >-
            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:
          type: string
          format: uuid
          description: >-
            API key UUID to grant account-level access via this membership.
            Mutually exclusive with `email` and `target_user_id`.
        role_id:
          type: string
          format: uuid
          description: Role UUID. Required.
    Member:
      type: object
      required:
        - id
        - email
        - status
      properties:
        id:
          type: string
          format: uuid
          description: Account member ID
        account_id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
          nullable: true
          description: User UUID. `null` for pending invitations until the invitee accepts.
        email:
          type: string
          format: email
        role:
          type: string
          description: Role slug (deprecated — prefer `role_id` and `role_name`)
        role_id:
          type: string
          format: uuid
        role_name:
          type: string
          example: Operator
        status:
          type: string
          enum:
            - pending
            - active
            - suspended
          description: |
            Membership status:
            - `pending` — invited but not yet accepted
            - `active` — full member
            - `suspended` — temporarily disabled by an admin
        invited_by:
          type: string
          format: uuid
        invited_at:
          type: string
          format: date-time
        accepted_at:
          type: string
          format: date-time
        invitation_id:
          type: string
          format: uuid
          description: >-
            Set when `status` is `pending` — the underlying invitation ID. Use
            [Cancel Invitation](#tag/Invitations/operation/cancelInvitation) to
            revoke.
        invitation_expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Each key is bound to a specific account.

````