npm

npm Team API

The Team API from npm — 3 operation(s) for team.

Operations 5

PUT /-/org/{orgName}/team Create a new team #
DELETE /-/org/{orgName}/{teamName} Delete a team #
GET /-/org/{orgName}/{teamName}/user Get all users in a team #
PUT /-/org/{orgName}/{teamName}/user Add a user to a team #
DELETE /-/org/{orgName}/{teamName}/user Remove a user from a team #

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/npm:npm-team-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

npm-team-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Npm Team API
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-logo:
    url: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAACyCAYAAAC0oD1PAAAAAXNSR0IArs4c6QAAAJZlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAARAAAAWodpAAQAAAABAAAAbAAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgSW1hZ2VSZWFkeQAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAfSgAwAEAAAAAQAAALIAAAAA7l/aDAAAAAl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CgAABAgS6ExDo3Y1MwwQIECBAYCog0KcmjhAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECByYwP8ABJX2MCfo+K4AAAAASUVORK5CYII=

      '
    altText: npm logo
  x-refined-note:
  - x-source differs across the merged source definitions and was not carried
  description: 'Operations tagged Team across 2 of this provider''s published API definitions: npm-registry-reference-openapi.json, npm-registry-reference-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://registry.npmjs.org
tags:
- name: Team
paths:
  /-/org/{orgName}/team:
    parameters:
    - $ref: '#/components/parameters/OrgName'
    - $ref: '#/components/parameters/RequiredBearerToken'
    put:
      tags:
      - Team
      summary: Create a new team
      description: 'Create a new team for an org.


        Granular Access Tokens with `bypass_2fa: true` are not permitted to

        call this endpoint and receive `403 Forbidden`. This operation must

        be performed via an interactive 2FA challenge.'
      operationId: putScopeTeam
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the team to create
                description:
                  type: string
                  description: The description of the team to create
              example:
                name: wombats
                description: All developers
      security:
      - npmSessionToken: []
      - npmAccessToken: []
      - granularAccessToken: []
      responses:
        '201':
          description: Team was created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: The name of the team that was created
                example:
                  name: wombats
        '401':
          $ref: '#/components/responses/responses-Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden2FABypassGAT'
    servers:
    - url: https://registry.npmjs.org
  /-/org/{orgName}/{teamName}:
    parameters:
    - $ref: '#/components/parameters/OrgName'
    - $ref: '#/components/parameters/TeamName'
    - $ref: '#/components/parameters/RequiredBearerToken'
    delete:
      tags:
      - Team
      summary: Delete a team
      description: 'Delete a team from a given org.


        Granular Access Tokens with `bypass_2fa: true` are not permitted to

        call this endpoint and receive `403 Forbidden`. This operation must

        be performed via an interactive 2FA challenge.'
      operationId: deleteTeam
      security:
      - npmSessionToken: []
      - npmAccessToken: []
      - granularAccessToken: []
      responses:
        '204':
          $ref: '#/components/responses/EmptySuccess'
        '401':
          $ref: '#/components/responses/responses-Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden2FABypassGAT'
    servers:
    - url: https://registry.npmjs.org
  /-/org/{orgName}/{teamName}/user:
    parameters:
    - $ref: '#/components/parameters/OrgName'
    - $ref: '#/components/parameters/TeamName'
    - $ref: '#/components/parameters/RequiredBearerToken'
    get:
      tags:
      - Team
      summary: Get all users in a team
      operationId: getTeamMembership
      security:
      - npmSessionToken: []
      responses:
        '200':
          $ref: '#/components/responses/TeamUsers'
        '401':
          $ref: '#/components/responses/responses-Unauthorized'
    put:
      tags:
      - Team
      summary: Add a user to a team
      description: 'Add a user to a team in an org. The user must already be a member of the org.


        Granular Access Tokens with `bypass_2fa: true` are not permitted to

        call this endpoint and receive `403 Forbidden`. This operation must

        be performed via an interactive 2FA challenge.'
      operationId: createTeamMembership
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  type: string
                  description: The username of the user to add to the team
              example:
                user: npm-cli-bot
      security:
      - npmSessionToken: []
      - npmAccessToken: []
      - granularAccessToken: []
      responses:
        '201':
          $ref: '#/components/responses/EmptySuccess'
        '401':
          $ref: '#/components/responses/responses-Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden2FABypassGAT'
    delete:
      tags:
      - Team
      summary: Remove a user from a team
      description: 'Remove a user from a team.


        Granular Access Tokens with `bypass_2fa: true` are not permitted to

        call this endpoint and receive `403 Forbidden`. This operation must

        be performed via an interactive 2FA challenge.'
      operationId: deleteTeamMembership
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  type: string
                  description: The username of the user to remove from the team
              example:
                user: npm-cli-bot
      security:
      - npmSessionToken: []
      - npmAccessToken: []
      - granularAccessToken: []
      responses:
        '204':
          $ref: '#/components/responses/EmptySuccess'
        '401':
          $ref: '#/components/responses/responses-Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden2FABypassGAT'
    servers:
    - url: https://registry.npmjs.org
components:
  parameters:
    OrgName:
      name: orgName
      in: path
      required: true
      schema:
        type: string
      description: Name of an org
    RequiredBearerToken:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
        pattern: ^Bearer .+
      description: 'Bearer token for authentication. Must be an npm access token.


        **Format:** `Bearer <token>`


        **Accepted token types:**

        - npm access token (traditional user token created via `npm login`)

        '
    TeamName:
      name: teamName
      in: path
      required: true
      schema:
        type: string
      description: Name of a team
  responses:
    Forbidden2FABypassGAT:
      description: 'Forbidden: bypass-2FA GAT not permitted for account or governance writes'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Error message
          example:
            error: 'Granular access tokens that bypass two-factor authentication may not perform this action. For more info, visit: https://gh.io/npm-gat-bypass2fa-deprecation'
    TeamUsers:
      description: The users in a team
      content:
        application/json:
          schema:
            type: array
            items:
              type: string
              description: A username of a user in the team
            example:
            - npm
            - npm-cli-bot
    responses-Unauthorized:
      description: Unauthorized
      headers:
        www-authenticate:
          description: Authentication challenge (e.g., "OTP" when OTP is required)
          schema:
            type: string
        npm-notice:
          description: Additional notice information
          schema:
            type: string
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Error message
          example:
            error: Missing "Bearer" header.
    EmptySuccess:
      description: Success
      content:
        '*/*':
          schema:
            not: {}
  securitySchemes:
    oidcIdToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'OIDC id_token from a supported Identity Provider (IdP) such as GitHub Actions, GitLab CI, or CircleCI.

        The `aud` (audience) claim must be set to `npm:registry.npmjs.org`.


        **Supported Identity Providers:**

        - GitHub Actions

        - GitLab CI

        - CircleCI

        '
    npmSessionToken:
      type: http
      scheme: bearer
      description: 'Traditional npm session token created via `npm login`.

        These tokens are tied to a user account and inherit the user''s permissions.

        '
    npmAccessToken:
      type: http
      scheme: bearer
      description: 'Granular Access Token (GAT) with fine-grained permissions.

        These tokens can be scoped to specific packages and operations.


        GATs created with `bypass_2fa: true` cannot perform account,

        token, or org/team/package governance write operations — those

        requests are rejected with `403 Forbidden`. See the Authentication

        section above for the full list.

        '
    granularAccessToken:
      type: http
      scheme: bearer
      description: 'Granular Access Token (GAT) with fine-grained permissions.

        These tokens can be scoped to specific packages and operations.

        (Alias for npmAccessToken)


        GATs created with `bypass_2fa: true` cannot perform account,

        token, or org/team/package governance write operations — those

        requests are rejected with `403 Forbidden`.

        '
    oidcExchangeToken:
      type: http
      scheme: bearer
      description: 'Short-lived npm registry token obtained by exchanging an OIDC id_token

        via the `/oidc/token/exchange` endpoint. These tokens are package-scoped

        and have limited lifetime (typically 1 hour).

        '
x-refined-from:
- npm-registry-reference-openapi.json
- npm-registry-reference-openapi.yml