Composio API Keys API

API key management

OpenAPI Specification

composio-api-keys-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 3.0.0
  title: Composio Platform Account Management API Keys API
  description: API key management
  contact:
    name: Composio Support
    url: https://composio.dev/support
    email: support@composio.dev
  license:
    name: Proprietary
    url: https://composio.dev/terms
servers:
- url: https://backend.composio.dev
  description: PRODUCTION API
tags:
- name: API Keys
  description: API key management
paths:
  /api/v3/org/owner/project/{nano_id}/regenerate_api_key:
    post:
      summary: Delete and generate new API key for project
      description: Generates a new API key for the specified project, invalidating any existing API keys for that project. This operation creates a fresh API key with a new random name and key value. All existing API keys for this project will be marked as deleted.
      tags:
      - API Keys
      operationId: postOrgOwnerProjectByNanoIdRegenerateApiKey
      security:
      - OrgApiKeyAuth: []
      parameters:
      - schema:
          type: string
          format: projectId
          description: Unique identifier (Nano ID) of the project to regenerate API key for
          example: pr_1a2b3c4d5e6f
        required: true
        description: Unique identifier (Nano ID) of the project to regenerate API key for
        name: nano_id
        in: path
      responses:
        '200':
          description: API key regenerated successfully. Returns the new API key details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique identifier for the API key
                        example: 01H4DKRF5SMP7NQCA3BWT0JYB6
                      name:
                        type: string
                        description: Name of the API key
                        example: epic_avatar
                      key:
                        type: string
                        description: The newly generated API key value
                        example: ak_a1b2c3d4e5f6g7h8i9j0
                      created_at:
                        type: string
                        description: ISO timestamp when the API key was created
                        example: '2023-05-16T14:30:00.000Z'
                    required:
                    - id
                    - name
                    - key
                    - created_at
                    description: The newly generated API key for this project
                  message:
                    type: string
                    description: Success message
                    example: API key regenerated successfully
                required:
                - api_key
                - message
        '400':
          description: Bad request. The project ID may be invalid or in an incorrect format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized. Authentication is required or the provided credentials are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found. The specified project does not exist or you do not have access to it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error. An unexpected error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: number
            slug:
              type: string
            status:
              type: number
            request_id:
              type: string
            suggested_fix:
              type: string
            errors:
              type: array
              items:
                type: string
          required:
          - message
          - code
          - slug
          - status
      required:
      - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Project API key authentication
    UserApiKeyAuth:
      type: apiKey
      in: header
      name: x-user-api-key
      description: User API key authentication
    CookieAuth:
      type: apiKey
      in: cookie
      name: authToken
      description: Cookie-based session authentication
    OrgApiKeyAuth:
      type: apiKey
      in: header
      name: x-org-api-key
      description: Organization API key authentication