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

# Create a management key

> Creates a management key with the `manage:read` and/or `manage:write` scopes, so an automated system can manage the organization without a person in the loop. The `manage:mint` scope cannot be granted here; keys with that scope are created from the dashboard. The response includes the key's `secret` exactly once. Returns 409 if the name is already used by an active management key and 403 if the organization's management-key limit is reached. Requires the `manage:mint` scope.



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/management_api/openapi.json post /v3/manage/auth-keys/
openapi: 3.0.3
info:
  title: Organization Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run
security: []
paths:
  /v3/manage/auth-keys/:
    post:
      tags:
        - Management Keys
      summary: Create a management key
      description: >-
        Creates a management key with the `manage:read` and/or `manage:write`
        scopes, so an automated system can manage the organization without a
        person in the loop. The `manage:mint` scope cannot be granted here; keys
        with that scope are created from the dashboard. The response includes
        the key's `secret` exactly once. Returns 409 if the name is already used
        by an active management key and 403 if the organization's management-key
        limit is reached. Requires the `manage:mint` scope.
      operationId: manage_auth_keys_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagementKeyMintRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ManagementKeyMintRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ManagementKeyMintRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuedManagementKey'
          description: ''
      security:
        - ManagementKeyAuth: []
components:
  schemas:
    ManagementKeyMintRequest:
      type: object
      description: >-
        Settings for a new management key: a display `name`, the `scopes` it
        grants, and an optional

        `expire_time` (omit it for a key that does not expire). `manage:read`
        and `manage:write` can be

        combined; `manage:mint` is exclusive and can only be granted from the
        dashboard.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/ScopesEnum'
        expire_time:
          type: string
          format: date-time
          nullable: true
      required:
        - name
        - scopes
    IssuedManagementKey:
      type: object
      description: >-
        A freshly created management key. `secret` is the full key value, shown
        only in this

        response; store it securely.
      properties:
        key_id:
          type: string
          format: uuid
        name:
          type: string
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/ScopesEnum'
        secret:
          type: string
        masked:
          type: string
        expires_at:
          type: string
          format: date-time
          nullable: true
      required:
        - expires_at
        - key_id
        - masked
        - name
        - scopes
        - secret
    ScopesEnum:
      enum:
        - manage:read
        - manage:write
        - manage:mint
      type: string
      description: |-
        * `manage:read` - Read organization members, keys and usage
        * `manage:write` - Create, update and revoke keys and members
        * `manage:mint` - Issue new worker management keys (issuer key)
  securitySchemes:
    ManagementKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        A management key (created from the organization dashboard or with `POST
        /v3/manage/auth-keys`), sent as `Authorization: Bearer
        <management_key>`. Inference API keys (`sk-eden...`) are not accepted on
        these endpoints.

````