Portainer Team Memberships API

Manage team memberships

Operations 5

GET /team_memberships List team memberships #
POST /team_memberships Create a new team membership #
DELETE /team_memberships/{id} Remove a team membership #
PUT /team_memberships/{id} Update a team membership #
GET /teams/{id}/memberships List team memberships #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/portainer-team-memberships-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

portainer-team-memberships-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: info@portainer.io
  description: Portainer API is an HTTP API served by Portainer.
  license:
    name: zlib
    url: https://github.com/portainer/portainer/blob/develop/LICENSE
  title: PortainerCE Team Memberships API
  version: 2.39.1
servers:
- url: /api
tags:
- description: Manage team memberships
  name: Team Memberships
paths:
  /team_memberships:
    get:
      description: 'List team memberships. Access is only available to administrators and team leaders.

        **Access policy**: administrator'
      operationId: TeamMembershipList
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/portainer.TeamMembership'
                type: array
        '400':
          description: Invalid request
        '403':
          description: Permission denied
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: List team memberships
      tags:
      - Team Memberships
    post:
      description: 'Create a new team memberships. Access is only available to administrators leaders of the associated team.

        **Access policy**: administrator'
      operationId: TeamMembershipCreate
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.TeamMembership'
        '400':
          description: Invalid request
        '403':
          description: Permission denied to manage memberships
        '409':
          description: Team membership already registered
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Create a new team membership
      tags:
      - Team Memberships
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/teammemberships.teamMembershipCreatePayload'
        description: Team membership details
        required: true
  /team_memberships/{id}:
    delete:
      description: 'Remove a team membership. Access is only available to administrators leaders of the associated team.

        **Access policy**: administrator'
      operationId: TeamMembershipDelete
      parameters:
      - description: TeamMembership identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Success
        '400':
          description: Invalid request
        '403':
          description: Permission denied
        '404':
          description: TeamMembership not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Remove a team membership
      tags:
      - Team Memberships
    put:
      description: 'Update a team membership. Access is only available to administrators or leaders of the associated team.

        **Access policy**: administrator or leaders of the associated team'
      operationId: TeamMembershipUpdate
      parameters:
      - description: Team membership identifier
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.TeamMembership'
        '400':
          description: Invalid request
        '403':
          description: Permission denied
        '404':
          description: TeamMembership not found
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Update a team membership
      tags:
      - Team Memberships
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/teammemberships.teamMembershipUpdatePayload'
        description: Team membership details
        required: true
  /teams/{id}/memberships:
    get:
      description: 'List team memberships. Access is only available to administrators and team leaders.

        **Access policy**: restricted'
      operationId: TeamMemberships
      parameters:
      - description: Team Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/portainer.TeamMembership'
                type: array
        '400':
          description: Invalid request
        '403':
          description: Permission denied
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: List team memberships
      tags:
      - Team Memberships
components:
  schemas:
    teammemberships.teamMembershipUpdatePayload:
      properties:
        Role:
          description: Role for the user inside the team (1 for leader and 2 for regular member)
          enum:
          - 1
          - 2
          example: 1
          type: integer
        TeamID:
          description: Team identifier
          example: 1
          type: integer
        UserID:
          description: User identifier
          example: 1
          type: integer
      required:
      - Role
      - TeamID
      - UserID
      type: object
    portainer.TeamMembership:
      properties:
        Id:
          description: Membership Identifier
          example: 1
          type: integer
        Role:
          allOf:
          - $ref: '#/components/schemas/portainer.MembershipRole'
          description: Team role (1 for team leader and 2 for team member)
          example: 1
        TeamID:
          description: Team identifier
          example: 1
          type: integer
        UserID:
          description: User identifier
          example: 1
          type: integer
      type: object
    teammemberships.teamMembershipCreatePayload:
      properties:
        Role:
          description: Role for the user inside the team (1 for leader and 2 for regular member)
          enum:
          - 1
          - 2
          example: 1
          type: integer
        TeamID:
          description: Team identifier
          example: 1
          type: integer
        UserID:
          description: User identifier
          example: 1
          type: integer
      required:
      - Role
      - TeamID
      - UserID
      type: object
    portainer.MembershipRole:
      enum:
      - 0
      - 1
      - 2
      type: integer
      x-enum-varnames:
      - _
      - TeamLeader
      - TeamMember
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-API-KEY
      type: apiKey
    jwt:
      in: header
      name: Authorization
      type: apiKey