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

# Create a team API key

> Creates an API key owned by the organization. Requires admin role.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/smithery/openapi.documented.yml post /organizations/{orgId}/api-keys
openapi: 3.1.0
info:
  title: Smithery Platform API
  description: >-
    API for the Smithery platform — discover, deploy, and manage MCP (Model
    Context Protocol) servers. Provides endpoints for browsing the server
    registry, managing deployments, creating scoped access tokens, and
    connecting to MCP servers.
  version: 1.0.0
servers:
  - url: https://api.smithery.ai
security:
  - bearerAuth: []
tags:
  - name: servers
    description: >-
      Browse the MCP server registry, manage server configuration, and handle
      deployments
  - name: skills
    description: Discover and search reusable prompt-based skills for MCP servers
  - name: tools
    description: Search for MCP tools across all registered servers
paths:
  /organizations/{orgId}/api-keys:
    post:
      tags:
        - organizations
      summary: Create a team API key
      description: Creates an API key owned by the organization. Requires admin role.
      operationId: postOrganizations:orgIdApi-keys
      parameters:
        - schema:
            type: string
          in: path
          name: orgId
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTeamApiKeyBody'
      responses:
        '201':
          description: API key created (key value only shown on creation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamApiKeyCreated'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                id: OrganizationError
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                id: OrganizationError
        '403':
          description: Forbidden — user is not an admin
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                id: OrganizationError
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Smithery from '@smithery/api';


            const client = new Smithery({
              apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
            });


            const apiKey = await client.organizations.apiKeys.create('orgId', {
            name: 'x' });


            console.log(apiKey.id);
components:
  schemas:
    CreateTeamApiKeyBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 256
          description: Name for the team API key
      required:
        - name
      additionalProperties: false
    TeamApiKeyCreated:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        key:
          type: string
        createdAt:
          type: string
      required:
        - id
        - name
        - key
        - createdAt
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Smithery API key as Bearer token

````