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

# Create Project Key

> Create a Project Key with API credentials and optional Kafka access.

Returns a credential file (JSON) with plaintext secrets. This is a one-time delivery —
secrets are masked in all subsequent responses. Optionally creates a Kafka user with
SCRAM credentials, K8s proxy, and ACLs.



## OpenAPI

````yaml /openapi/openapi.json post /project-keys
openapi: 3.1.0
info:
  title: Streamkap REST API
  description: >-
    The Streamkap REST API allows you to programmatically manage your CDC
    pipelines, sources, destinations, transforms, and more.


    Authenticate using a bearer token obtained from the [Access
    Token](/api-reference/auth/access-token) endpoint with your API client
    credentials.
  contact:
    name: Streamkap Support
    url: https://streamkap.com/
    email: support@streamkap.com
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api.streamkap.com
    description: Production
security: []
tags:
  - name: Alerts
    description: Manage alert subscribers, preferences, and notification credentials.
  - name: Authentication
    description: Obtain and refresh access tokens, manage client credentials and roles.
  - name: Billing
    description: Retrieve usage metrics, summaries, and export billing data.
  - name: Consumer Groups
    description: List, inspect, and reset Kafka consumer group offsets.
  - name: Dashboard
    description: Retrieve organisation-level statistics and overview data.
  - name: Destinations
    description: Create, configure, and manage data destinations and their lifecycle.
  - name: Kafka Access
    description: Manage Kafka users and their access permissions.
  - name: Logs
    description: Query and summarise system logs.
  - name: Pipelines
    description: Create, configure, and manage CDC pipelines and their lifecycle.
  - name: Project Keys
    description: Manage project keys that bundle API credentials and optional Kafka access.
  - name: Schema Registry
    description: Browse schema subjects, versions, and retrieve schema definitions.
  - name: Services
    description: View and switch service metadata.
  - name: Sources
    description: >-
      Create, configure, and manage data sources, snapshots, and their
      lifecycle.
  - name: Tags
    description: Create, update, and manage resource tags for organisation.
  - name: Topics
    description: Browse topic details, statistics, configurations, metrics, and messages.
  - name: Transforms
    description: >-
      Create, deploy, and manage data transforms, unit tests, and implementation
      details.
paths:
  /project-keys:
    post:
      tags:
        - Project Keys
      summary: Create Project Key
      description: >-
        Create a Project Key with API credentials and optional Kafka access.


        Returns a credential file (JSON) with plaintext secrets. This is a
        one-time delivery —

        secrets are masked in all subsequent responses. Optionally creates a
        Kafka user with

        SCRAM credentials, K8s proxy, and ACLs.
      operationId: createProjectKey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectKeyCreateRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectKeyCredentialFile'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    ProjectKeyCreateRequest:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: Human-readable name for this Project Key
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description (HTML sanitized)
        role_ids:
          anyOf:
            - items:
                type: string
              type: array
              minItems: 1
            - type: 'null'
          title: Role Ids
          description: Role IDs to assign. Mutually exclusive with permission_ids.
        permission_ids:
          anyOf:
            - items:
                type: string
              type: array
              minItems: 1
            - type: 'null'
          title: Permission Ids
          description: Permission IDs to assign directly. Mutually exclusive with role_ids.
        kafka_config:
          anyOf:
            - $ref: '#/components/schemas/ProjectKeyKafkaConfig'
            - type: 'null'
          description: Kafka credentials and ACL config. Omit for API-only key.
        tool_profile:
          anyOf:
            - $ref: '#/components/schemas/ToolProfile'
            - type: 'null'
          description: MCP tool profile (full, read-only, agent-operator, infra-admin)
        allowed_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Tools
          description: MCP tool whitelist. If set, overrides profile and block list.
        blocked_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Blocked Tools
          description: MCP tool blacklist. Removes tools even if profile allows them.
      additionalProperties: true
      type: object
      required:
        - name
      title: ProjectKeyCreateRequest
      description: Request body for creating a Project Key.
    ProjectKeyCredentialFile:
      properties:
        type:
          type: string
          title: Type
          default: streamkap_project_key
        project_key_id:
          type: string
          title: Project Key Id
        project:
          additionalProperties: true
          type: object
          title: Project
        api:
          anyOf:
            - $ref: '#/components/schemas/ProjectKeyApiCredentials'
            - type: 'null'
        kafka:
          anyOf:
            - $ref: '#/components/schemas/ProjectKeyKafkaCredentials'
            - type: 'null'
        kafka_acls:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Kafka Acls
        tool_profile:
          anyOf:
            - $ref: '#/components/schemas/ToolProfile'
            - type: 'null'
        allowed_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Tools
        blocked_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Blocked Tools
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
      additionalProperties: true
      type: object
      required:
        - project_key_id
        - project
        - created_at
      title: ProjectKeyCredentialFile
      description: The downloadable .json credential file returned at creation time.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProjectKeyKafkaConfig:
      properties:
        username:
          type: string
          maxLength: 24
          minLength: 3
          pattern: ^[a-zA-Z0-9-]+$
          title: Username
          description: Kafka username (alphanumeric + hyphens, 3-24 chars)
        password:
          type: string
          maxLength: 128
          minLength: 12
          title: Password
          description: Kafka SASL password (12-128 chars)
        whitelist_ips:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Whitelist Ips
          description: Comma-separated IP addresses or CIDR ranges
        kafka_acls:
          items:
            $ref: '#/components/schemas/KafkaAclModel'
          type: array
          title: Kafka Acls
          description: Kafka ACL rules for topic/group access control
        is_create_schema_registry:
          type: boolean
          title: Is Create Schema Registry
          description: Whether to create a Schema Registry proxy
          default: false
      additionalProperties: true
      type: object
      required:
        - username
        - password
      title: ProjectKeyKafkaConfig
      description: Kafka user configuration for a Project Key.
    ToolProfile:
      type: string
      enum:
        - full
        - read-only
        - agent-operator
        - infra-admin
      title: ToolProfile
    ProjectKeyApiCredentials:
      properties:
        client_id:
          type: string
          title: Client Id
        client_secret:
          type: string
          title: Client Secret
        token_endpoint:
          type: string
          title: Token Endpoint
        api_url:
          type: string
          title: Api Url
        roles:
          items:
            type: string
          type: array
          title: Roles
      additionalProperties: true
      type: object
      required:
        - client_id
        - client_secret
        - token_endpoint
        - api_url
      title: ProjectKeyApiCredentials
      description: API credential section of the credential file.
    ProjectKeyKafkaCredentials:
      properties:
        username:
          type: string
          title: Username
        password:
          type: string
          title: Password
        bootstrap_servers:
          type: string
          title: Bootstrap Servers
        security_protocol:
          type: string
          title: Security Protocol
          default: SASL_SSL
        sasl_mechanism:
          type: string
          title: Sasl Mechanism
          default: PLAIN
        schema_registry_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Schema Registry Url
      additionalProperties: true
      type: object
      required:
        - username
        - password
        - bootstrap_servers
      title: ProjectKeyKafkaCredentials
      description: Kafka credential section of the credential file.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    KafkaAclModel:
      properties:
        topic_name:
          type: string
          title: Topic Name
        operation:
          type: string
          title: Operation
        resource_pattern_type:
          type: string
          title: Resource Pattern Type
        resource:
          type: string
          title: Resource
          default: TOPIC
      additionalProperties: true
      type: object
      required:
        - topic_name
        - operation
        - resource_pattern_type
      title: KafkaAclModel
      description: Basic kafka user details.
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````