Portkey · Capability

Portkey API — Workspaces > Members

Portkey API — Workspaces > Members. 5 operations. Lead operation: Add workspace member. Self-contained Naftiko capability covering one Portkey business surface.

Run with Naftiko PortkeyWorkspaces > Members

What You Can Do

POST
Post — Add workspace member
/v1/admin/workspaces/{workspaceid}/users
GET
Get — Get workspace members
/v1/admin/workspaces/{workspaceid}/users
PUT
Put — Update workspace member
/v1/admin/workspaces/{workspaceid}/users/{userid}
DELETE
Delete — Remove workspace member
/v1/admin/workspaces/{workspaceid}/users/{userid}
GET
Get — Get member
/v1/admin/workspaces/{workspaceid}/users/{userid}

MCP Tools

add-workspace-member

Add workspace member

get-workspace-members

Get workspace members

read-only idempotent
update-workspace-member

Update workspace member

idempotent
remove-workspace-member

Remove workspace member

idempotent
get-member

Get member

read-only idempotent

Capability Spec

portkey-workspaces-members.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Portkey API — Workspaces > Members
  description: 'Portkey API — Workspaces > Members. 5 operations. Lead operation: Add workspace member. Self-contained Naftiko
    capability covering one Portkey business surface.'
  tags:
  - Portkey
  - Workspaces > Members
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PORTKEY_API_KEY: PORTKEY_API_KEY
capability:
  consumes:
  - type: http
    namespace: portkey-workspaces-members
    baseUri: https://api.portkey.ai/v1
    description: Portkey API — Workspaces > Members business capability. Self-contained, no shared references.
    resources:
    - name: admin-workspaces-workspaceId-users
      path: /admin/workspaces/{workspaceId}/users
      operations:
      - name: post
        method: POST
        description: Add workspace member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspaceId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: get
        method: GET
        description: Get workspace members
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspaceId
          in: path
          type: string
          required: true
        - name: current_page
          in: query
          type: number
        - name: page_size
          in: query
          type: number
        - name: role
          in: query
          type: string
        - name: email
          in: query
          type: string
    - name: admin-workspaces-workspaceId-users-userId
      path: /admin/workspaces/{workspaceId}/users/{userId}
      operations:
      - name: put
        method: PUT
        description: Update workspace member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspaceId
          in: path
          type: string
          required: true
        - name: userId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: delete
        method: DELETE
        description: Remove workspace member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspaceId
          in: path
          type: string
          required: true
        - name: userId
          in: path
          type: string
          required: true
      - name: get
        method: GET
        description: Get member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: workspaceId
          in: path
          type: string
          required: true
        - name: userId
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.PORTKEY_API_KEY}}'
  exposes:
  - type: rest
    namespace: portkey-workspaces-members-rest
    port: 8080
    description: REST adapter for Portkey API — Workspaces > Members. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/admin/workspaces/{workspaceid}/users
      name: admin-workspaces-workspaceid-users
      description: REST surface for admin-workspaces-workspaceId-users.
      operations:
      - method: POST
        name: post
        description: Add workspace member
        call: portkey-workspaces-members.post
        with:
          workspaceId: rest.workspaceId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get workspace members
        call: portkey-workspaces-members.get
        with:
          workspaceId: rest.workspaceId
          current_page: rest.current_page
          page_size: rest.page_size
          role: rest.role
          email: rest.email
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/admin/workspaces/{workspaceid}/users/{userid}
      name: admin-workspaces-workspaceid-users-userid
      description: REST surface for admin-workspaces-workspaceId-users-userId.
      operations:
      - method: PUT
        name: put
        description: Update workspace member
        call: portkey-workspaces-members.put
        with:
          workspaceId: rest.workspaceId
          userId: rest.userId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Remove workspace member
        call: portkey-workspaces-members.delete
        with:
          workspaceId: rest.workspaceId
          userId: rest.userId
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: get
        description: Get member
        call: portkey-workspaces-members.get
        with:
          workspaceId: rest.workspaceId
          userId: rest.userId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: portkey-workspaces-members-mcp
    port: 9090
    transport: http
    description: MCP adapter for Portkey API — Workspaces > Members. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: add-workspace-member
      description: Add workspace member
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portkey-workspaces-members.post
      with:
        workspaceId: tools.workspaceId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-workspace-members
      description: Get workspace members
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-workspaces-members.get
      with:
        workspaceId: tools.workspaceId
        current_page: tools.current_page
        page_size: tools.page_size
        role: tools.role
        email: tools.email
      outputParameters:
      - type: object
        mapping: $.
    - name: update-workspace-member
      description: Update workspace member
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: portkey-workspaces-members.put
      with:
        workspaceId: tools.workspaceId
        userId: tools.userId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-workspace-member
      description: Remove workspace member
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: portkey-workspaces-members.delete
      with:
        workspaceId: tools.workspaceId
        userId: tools.userId
      outputParameters:
      - type: object
        mapping: $.
    - name: get-member
      description: Get member
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-workspaces-members.get
      with:
        workspaceId: tools.workspaceId
        userId: tools.userId
      outputParameters:
      - type: object
        mapping: $.