> ## 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.

# Enable Project Key Agentic

> Toggle agentic use ON for a Project Key (the agentic toggle).

Atomic: rotates the API client credential, encrypts the new credential file
blob with KMS, stores it on the PK row, sets ``agentic_enabled=True``.
Idempotent on already-enabled PKs (no double rotation).

Rate limit: 5/min/tenant (each call burns one Frontegg credential rotation).
Returns 429 with ``Retry-After`` on bucket exhaustion.

Audit-logged with action=enable / enable_noop, actor email + sub, old/new
state, tenant_id, project_key_id, timestamp.



## OpenAPI

````yaml /openapi/openapi.json post /project-keys/{project_key_id}/enable-agentic
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: Agents
    description: Create, deploy, and manage Flink-based AI agents.
  - name: Agents Observability
    description: >-
      Read-only views over the MCP audit log: agent rollup, sessions, spans,
      histograms, external-agent verify.
  - 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/{project_key_id}/enable-agentic:
    post:
      tags:
        - Project Keys
      summary: Enable Project Key Agentic
      description: >-
        Toggle agentic use ON for a Project Key (the agentic toggle).


        Atomic: rotates the API client credential, encrypts the new credential
        file

        blob with KMS, stores it on the PK row, sets ``agentic_enabled=True``.

        Idempotent on already-enabled PKs (no double rotation).


        Rate limit: 5/min/tenant (each call burns one Frontegg credential
        rotation).

        Returns 429 with ``Retry-After`` on bucket exhaustion.


        Audit-logged with action=enable / enable_noop, actor email + sub,
        old/new

        state, tenant_id, project_key_id, timestamp.
      operationId: enableProjectKeyAgentic
      parameters:
        - name: project_key_id
          in: path
          required: true
          schema:
            type: string
            title: Project Key Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectKeySummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    ProjectKeySummary:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        created_by_user:
          anyOf:
            - $ref: '#/components/schemas/User'
            - type: 'null'
        api_client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Client Id
        api_client_id_masked_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Client Id Masked Secret
        kafka_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Kafka Username
        service_id:
          type: string
          title: Service Id
        roles:
          items:
            $ref: '#/components/schemas/Role'
          type: array
          title: Roles
        status:
          type: string
          title: Status
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        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
        agentic_enabled:
          type: boolean
          title: Agentic Enabled
          description: >-
            Whether this Project Key is wired up as the auth blob behind the
            Streamkap MCP. Toggled via POST /project-keys/{id}/enable-agentic
            and disable-agentic. When true, the encrypted credential lives on
            the PK row (server-side only); the agent picker on the FE filters to
            PKs where this is true.
          default: false
        agentic_secret_blob:
          anyOf:
            - type: string
            - type: 'null'
          title: Agentic Secret Blob
          description: >-
            Always masked to '********' on responses when agentic_enabled is
            true; null otherwise. Server-derived only - PUT/PATCH bodies that
            include this field are rejected with 422.
      additionalProperties: true
      type: object
      required:
        - id
        - name
        - service_id
        - status
      title: ProjectKeySummary
      description: Summary response for listing Project Keys (no secrets).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    User:
      properties:
        id:
          type: string
          title: Id
        email:
          type: string
          title: Email
        name:
          type: string
          title: Name
        profile_picture_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Picture Url
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
        tenant_id:
          type: string
          title: Tenant Id
        created_at:
          anyOf:
            - type: string
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        last_login:
          anyOf:
            - type: string
            - type: string
              format: date-time
            - type: 'null'
          title: Last Login
      type: object
      required:
        - id
        - email
        - name
        - tenant_id
      title: User
    Role:
      properties:
        id:
          type: string
          title: Id
        key:
          type: string
          title: Key
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          anyOf:
            - type: string
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        permissions:
          items:
            type: string
          type: array
          title: Permissions
      type: object
      required:
        - id
        - key
        - name
        - description
      title: Role
    ToolProfile:
      type: string
      enum:
        - full
        - read-only
        - agent-operator
        - infra-admin
      title: ToolProfile
    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
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````