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

# Generate an access token for an organization workspace



## OpenAPI

````yaml /api-reference/membrane-api.json post /org-workspaces/{id}/access-token
openapi: 3.0.0
info:
  title: Membrane API
  description: API documentation for Membrane Engine
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getmembrane.com
security:
  - bearer: []
tags: []
paths:
  /org-workspaces/{id}/access-token:
    post:
      tags:
        - OrgWorkspaces
      summary: Generate an access token for an organization workspace
      operationId: generateOrgWorkspaceAccessToken
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateAccessTokenRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateAccessTokenResponseDto'
components:
  schemas:
    GenerateAccessTokenRequestDto:
      type: object
      properties:
        isAdmin:
          type: boolean
          description: Whether to generate an admin token
        tenantId:
          type: string
          description: Customer ID to scope the token to
        tenantKey:
          type: string
          description: Customer key to scope the token to (resolved to tenantId)
        name:
          type: string
          description: Name for the generated token
        fields:
          type: object
          description: Custom fields to include in the token
          additionalProperties:
            type: object
    GenerateAccessTokenResponseDto:
      type: object
      properties:
        token:
          type: string
          description: The generated access token
      required:
        - token
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````