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

# Validate that the user may use an org as their workspace context

> Checks active membership in the given org before the client flips its `X-Current-Org-Id` header. The literal value "personal" is always valid and returns `currentOrgId: null` without a database lookup. Returns 403 if the user is not an active member of the requested org. Requires a Nevermined API key or a Privy identity token.



## OpenAPI

````yaml /api-reference/organizations-openapi.json post /organizations/{orgId}/validate
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/{orgId}/validate:
    post:
      tags:
        - Organizations
      summary: Validate that the user may use an org as their workspace context
      description: >-
        Checks active membership in the given org before the client flips its
        `X-Current-Org-Id` header. The literal value "personal" is always valid
        and returns `currentOrgId: null` without a database lookup. Returns 403
        if the user is not an active member of the requested org. Requires a
        Nevermined API key or a Privy identity token.
      operationId: OrganizationsController_validateOrgContext
      parameters:
        - name: orgId
          required: true
          in: path
          description: >-
            Organization id to validate as the workspace context. Pass the
            literal value "personal" to select the no-org (personal) context,
            which always validates and returns currentOrgId: null.
          schema:
            type: string
            example: org-abc123
      responses:
        '200':
          description: User is allowed to use this org context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateOrgResponseDto'
        '403':
          description: User is not an active member of the requested organization
      security:
        - Authorization: []
components:
  schemas:
    ValidateOrgResponseDto:
      type: object
      properties:
        valid:
          type: boolean
          example: true
          description: >-
            Whether the user is allowed to use the requested org as their
            workspace context
        currentOrgId:
          type: string
          example: org-abc123
          description: The org ID that was validated, or null for personal context
          nullable: true
        role:
          type: string
          example: Member
          description: Role of the user in the organization
          enum:
            - Admin
            - Member
        orgName:
          type: string
          example: Acme Corp
          description: Name of the organization
        orgType:
          type: string
          example: Lapsed
          description: Type of the organization
          enum:
            - Premium
            - Enterprise
            - Lapsed
            - Other
      required:
        - valid
        - currentOrgId
  securitySchemes:
    Authorization:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

## Related topics

- [Get the organization info for a user](/docs/api-reference/organizations/get-the-organization-info-for-a-user.md)
- [Organizations & Workspaces](/docs/integrate/patterns/organizations.md)
- [Workspaces & Members](/docs/solutions/organizations/workspaces-and-members.md)
- [List the authenticated user's active org memberships](/docs/api-reference/organizations/list-the-authenticated-users-active-org-memberships.md)
- [API error codes](/docs/development-guide/api-errors/codes.md)
