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

> ## Agent Instructions
> If you are an agent buying Catalog services: start with these steps. Every page has a .md version.
> 1. Payment is live-only: every Catalog listing settles on mainnet. Sandbox pays only two free testnet test merchants kept for rehearsal (mpp-dev-paid-ping and x402-org-protected); no other Catalog listing is payable there, and a key or sign-in works only in its own environment.
> 2. From an assistant: install the Catalog MCP (live server https://mcp.live.nevermined.app/mcp; Claude Code and Cursor commands, Codex config.toml entry): https://nevermined.ai/docs/products/catalog/mcp.md. Sign in over OAuth and approve a spending cap or credit consent once (no API key needed): https://nevermined.ai/docs/mcp/catalog-mcp/overview.md#connect-from-your-assistant. Then call search_services, get_service, quote_service and pay_service, in that order.
> 3. Over REST: get a plain API key (https://nevermined.ai/docs/agents-guide/get-api-key.md) and create a crypto Delegation (provider erc4337). Quote the call with POST /api/v1/router/quote (https://nevermined.ai/docs/api-reference/router/quote.md), fund the Delegation's wallet on the network the quote names (Base for x402, Tempo for MPP), then call /api/v1/router/svc/<slug>/<invokePath>: https://nevermined.ai/docs/products/catalog/from-a-harness.md and https://nevermined.ai/docs/products/catalog/router/quickstart.md
> 4. Or pay with Nevermined credits, which need no wallet and no Delegation. A new account that signs up with a verified email gets free welcome credits while the offer is open (200,000 credits for 30 days today): https://nevermined.ai/docs/products/catalog/router/subscription.md
> Buying a Nevermined payment plan from an agent that sells one (not a Catalog service) is a different path: enroll a card (https://nevermined.ai/docs/agents-guide/enroll-card.md) and buy the plan over x402 (https://nevermined.ai/docs/getting-started/ai-agent-purchase.md). A card Delegation cannot pay a Catalog service.
> SDK quickstart: https://nevermined.ai/docs/integrate/quickstart/typescript.md. Pricing: https://nevermined.ai/pricing/

# Invite a member to, or onboard a customer into, the organization

> Invites a member to, or onboards a customer into, the caller's organization. The `as` field selects the outcome:

- `member` (default): creates a pending invitation with the requested role (defaults to Member) and emails the invitee a link to join, the same invitation `POST /organizations/{orgId}/invitations` creates. No account is provisioned and nothing about an existing account is returned: `walletResult` carries only the `invitation`. The invitee becomes a member when they accept. Requires the organization to be on the Premium tier or higher, and a free member seat (pending invitations count toward the seat cap). If the invitation email cannot be sent, the response is `503` (`BCK.ORGANIZATIONS.0041`) and no invitation is created.
- `customer`: **white-label onboarding** — provisions a Nevermined identity (and Privy-managed wallet) for the email. No seat is consumed. `role` is ignored. The behaviour depends on whether the email already has a Nevermined identity:
  - **new account**: recorded into the organization Customers CRM immediately (before any purchase) and the response returns a usable, scoped NVM API key (`walletResult.nvmApiKey`, 201) so the organization can transparently act for its own customer. The key is tagged to the caller's organization, so the customer's requests resolve to that workspace and their activity/purchases are attributed to it.
  - **existing account**: no key is issued (account-takeover guard). An email challenge is sent to the owner and the response is `202` with `walletResult.consentRequired = true`; the organization cannot obtain a credential for an account it does not own without the owner’s consent. If the consent email cannot be sent, the response is `503` (`BCK.ORGANIZATIONS.0041`) instead, and a retry sends a new email.

Requires a Nevermined API key and organization admin privileges.



## OpenAPI

````yaml /api-reference/organizations-openapi.json post /organizations/account
openapi: 3.0.0
info:
  title: Nevermined Organizations API
  description: >-
    Manage a Nevermined organization programmatically — members, tiers, groups &
    budgets, treasury wallets, customers, webhooks, analytics, and
    agent-discovery surfaces.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.sandbox.nevermined.app/api/v1
    description: Sandbox
  - url: https://api.live.nevermined.app/api/v1
    description: Live
security: []
tags:
  - name: Organizations
    x-group: General
    description: Organization settings, members & roles, and workspace context.
  - name: Organizations - Billing
    x-group: Billing
    description: Tiers, subscriptions, invoices, checkout, and the public tier catalog.
  - name: Groups
    x-group: Groups & Budgets
    description: Organization groups, per-group budgets, and shared payment methods.
  - name: Organizations - Wallets
    x-group: Wallets
    description: Custodial stablecoin treasury wallets.
  - name: Organizations - Customers
    x-group: Customers
    description: The white-label customer CRM (Enterprise).
  - name: Organizations - Analytics
    x-group: Analytics
    description: Revenue, MRR, usage, conversion, and per-member metrics.
  - name: Organizations - Webhooks
    x-group: Webhooks
    description: Outbound webhook subscriptions and deliveries.
  - name: Organizations - Activity
    x-group: Activity
    description: The organization activity feed.
  - name: Organizations - Realtime
    x-group: Realtime
    description: Realtime WebSocket secret management (Enterprise).
  - name: Invitations
    x-group: Invitations
    description: Invite people to an organization.
  - name: Organizations - Integration
    x-group: Agent Discovery
    description: >-
      Public agent-discovery surfaces (llms.txt, agentic-instructions.md,
      ai-catalog.json).
paths:
  /organizations/account:
    post:
      tags:
        - Organizations
      summary: Invite a member to, or onboard a customer into, the organization
      description: >-
        Invites a member to, or onboards a customer into, the caller's
        organization. The `as` field selects the outcome:


        - `member` (default): creates a pending invitation with the requested
        role (defaults to Member) and emails the invitee a link to join, the
        same invitation `POST /organizations/{orgId}/invitations` creates. No
        account is provisioned and nothing about an existing account is
        returned: `walletResult` carries only the `invitation`. The invitee
        becomes a member when they accept. Requires the organization to be on
        the Premium tier or higher, and a free member seat (pending invitations
        count toward the seat cap). If the invitation email cannot be sent, the
        response is `503` (`BCK.ORGANIZATIONS.0041`) and no invitation is
        created.

        - `customer`: **white-label onboarding** — provisions a Nevermined
        identity (and Privy-managed wallet) for the email. No seat is consumed.
        `role` is ignored. The behaviour depends on whether the email already
        has a Nevermined identity:
          - **new account**: recorded into the organization Customers CRM immediately (before any purchase) and the response returns a usable, scoped NVM API key (`walletResult.nvmApiKey`, 201) so the organization can transparently act for its own customer. The key is tagged to the caller's organization, so the customer's requests resolve to that workspace and their activity/purchases are attributed to it.
          - **existing account**: no key is issued (account-takeover guard). An email challenge is sent to the owner and the response is `202` with `walletResult.consentRequired = true`; the organization cannot obtain a credential for an account it does not own without the owner’s consent. If the consent email cannot be sent, the response is `503` (`BCK.ORGANIZATIONS.0041`) instead, and a retry sends a new email.

        Requires a Nevermined API key and organization admin privileges.
      operationId: OrganizationsController_createUserByOrganization
      parameters: []
      requestBody:
        required: true
        description: Email to invite or onboard, and the outcome (`as`).
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateTokenDto'
            examples:
              member:
                summary: Member invitation (default)
                value:
                  email: user@example.com
                  role: Member
              customer:
                summary: White-label customer onboarding
                value:
                  email: customer@example.com
                  as: customer
      responses:
        '201':
          description: >-
            For `as=member`: the invitation was created and its email sent;
            `walletResult.invitation` is the pending invitation (`status` is
            `pending`). No account identity is returned. For `as=customer` with
            a NEW account: recorded into the Customers CRM (no seat) with a
            usable scoped `nvmApiKey` returned.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Member invitation (as=member)
                    type: object
                    required:
                      - success
                      - walletResult
                    properties:
                      success:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: Invitation sent
                      walletResult:
                        type: object
                        properties:
                          invitation:
                            $ref: '#/components/schemas/InvitationResponseDto'
                        required:
                          - invitation
                  - title: Customer credential (as=customer)
                    type: object
                    required:
                      - success
                      - walletResult
                    properties:
                      success:
                        type: boolean
                        example: true
                      message:
                        type: string
                        example: Customer onboarded
                      walletResult:
                        type: object
                        properties:
                          hash:
                            type: string
                          userId:
                            type: string
                          userWallet:
                            type: string
                          alreadyMember:
                            type: boolean
                            example: false
                          nvmApiKey:
                            type: string
                            description: >-
                              Usable, scoped NVM API key (Bearer credential).
                              Present only for a NEW-account `as=customer`.
                          isCustomer:
                            type: boolean
                            description: >-
                              True when provisioned via the white-label customer
                              outcome (new account).
                          customerRecorded:
                            type: boolean
                            description: >-
                              Whether the customer was written to the Customers
                              CRM. False signals a best-effort write failed (the
                              customer is still provisioned and keyed).
                        required:
                          - hash
                          - isCustomer
        '202':
          description: >-
            `as=customer` for an EXISTING account the caller does not own: no
            credential issued and the account's identity is deliberately NOT
            disclosed (opaque). An email challenge was sent to the owner;
            `walletResult.consentRequired = true`. Onboarding completes once the
            owner consents.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                  walletResult:
                    type: object
                    properties:
                      alreadyMember:
                        type: boolean
                        example: false
                      consentRequired:
                        type: boolean
                        example: true
        '400':
          description: >-
            Validation error — BCK.HTTP.400 when `email` is missing or `role` is
            not Admin or Member; for `as=member`, BCK.INVITATIONS.0007 when
            `email` is not a valid address of at most 254 characters; for
            `as=customer`, BCK.ACCOUNT_PROVISIONING.0001 for an empty email.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: >-
            Caller is not an active admin of the organization. For `as=member`,
            also BCK.INVITATIONS.0006 when the organization is below the Premium
            tier, or BCK.ORGANIZATIONS.0008 when the email belongs to an active
            member of the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '409':
          description: >-
            For `as=member`: BCK.INVITATIONS.0002 when a pending invitation
            already exists for that email. For `as=customer`, no credential can
            be issued for this email: BCK.ORGANIZATIONS.0034 when it names a
            customer the organization blocked, BCK.ORGANIZATIONS.0035 when the
            Nevermined account behind it is disabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '422':
          description: >-
            `as=member` only: BCK.INVITATIONS.0001 when the organization has no
            free member seat (active members and pending invitations both count
            toward the cap).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: >-
            Internal server error — e.g. BCK.NOTIF.0007 when this deployment has
            no mail provider, so the invitation or consent email cannot be sent
            (a retry will not help), or, for `as=member`, BCK.INVITATIONS.0009
            when the invitation email was not sent and the invitation could not
            be withdrawn: revoke `params.invitationId`, then invite again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '503':
          description: >-
            BCK.ORGANIZATIONS.0041: the invitation (`as=member`) or consent
            (`as=customer`) email was not accepted for delivery (for
            `as=member`, or not confirmed within 10 seconds: that email may
            still arrive, and its link no longer works). This call added no
            member and left nothing pending: for `as=member`, no invitation is
            left pending (one may be listed as revoked; an email with a pending
            invitation answers `409` before any email is sent); for
            `as=customer`, no earlier consent link is pending. Retry after a
            backoff and cap automatic retries: each retry sends a new email. The
            `503` carries no `Retry-After`. For `as=member`,
            BCK.INVITATIONS.0008 means concurrent invitations to the
            organization conflicted and nothing was stored or sent: retry after
            a short backoff. For `as=customer` the address counts once toward
            the 20-per-hour consent limit and takes at most 3 consent emails an
            hour, failed sends included (then `429` with `Retry-After`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - Authorization: []
components:
  schemas:
    GenerateTokenDto:
      type: object
      properties: {}
    InvitationResponseDto:
      type: object
      properties:
        id:
          type: string
          example: oi-550e8400-e29b-41d4-a716-446655440000
        email:
          type: string
          example: colleague@example.com
        name:
          type: string
          example: Jane Doe
          nullable: true
        role:
          type: string
          enum:
            - Admin
            - Member
        status:
          type: string
          enum:
            - pending
            - accepted
            - revoked
            - expired
        expiresAt:
          format: date-time
          type: string
        invitedByUserId:
          type: string
        createdAt:
          format: date-time
          type: string
      required:
        - id
        - email
        - role
        - status
        - expiresAt
        - invitedByUserId
        - createdAt
    ErrorResponseDto:
      type: object
      properties:
        code:
          type: string
          description: >-
            Error code identifier (e.g., BCK.PROTOCOL.0001, BCK.X402.0005).
            NOTE: any endpoint may also return a framework-level
            `BCK.HTTP.<status>` code (e.g. `BCK.HTTP.400` from request
            validation, `BCK.HTTP.429` from throttling, `BCK.HTTP.404`) — these
            are emitted by the global fallback filter for HTTP errors that carry
            no domain-specific code. Clients must tolerate them.
          example: BCK.COMMON.0001
        httpStatus:
          type: number
          description: HTTP status code
          example: 500
        message:
          type: string
          description: Human-readable error message describing what went wrong
          example: Unable to initialize Nevermined instance
        details:
          type: string
          description: >-
            Throw-site detail string supplementing the canonical message. Only
            set when the call site supplied an opts.message; absent otherwise.
          example: Hash JWT is not signed by the node account
        hint:
          type: string
          description: >-
            Actionable remediation hint, sourced from the catalogue or supplied
            at the throw site. Tells the caller what to fix or where to look.
          example: >-
            Verify the wallet has sufficient balance and that the plan is
            active.
        docsUrl:
          type: string
          description: Permalink to the docs page describing this error code.
          example: >-
            https://nevermined.ai/docs/development-guide/api-errors/codes#bck-x402-0008
        category:
          type: string
          description: >-
            Coarse classification of the failure, useful for client-side
            branching without parsing the message.
          enum:
            - validation
            - auth
            - business
            - integration
            - internal
          example: integration
        retryable:
          type: boolean
          description: >-
            Whether the failure is transient and the same call can be retried
            with identical inputs. Absent when the catalogue does not assert
            either way.
          example: true
        correlationId:
          type: string
          description: >-
            Request-scoped correlation id stamped by the global filter. Echoed
            in the x-correlation-id response header. Quote this when reporting
            issues.
          example: a3f6b1c4-7d2e-4a9b-8e0c-12f4d8e6c5b9
        uuid:
          type: string
          description: >-
            Per-error UUID generated at construction. Useful for log
            correlation.
          example: e-550e8400-e29b-41d4-a716-446655440000
        date:
          type: string
          description: ISO timestamp at which the error was constructed.
          example: '2026-05-09T12:34:56.789Z'
          format: date-time
        params:
          type: string
          description: >-
            JSON-stringified contextual parameters supplied at the throw site
            (e.g. IDs, state). Always a string in the wire format — parse with
            JSON.parse if needed.
          example: '{"planId":"43298432984329","reason":"Invalid configuration"}'
      required:
        - code
        - httpStatus
        - message
  securitySchemes:
    Authorization:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.