Portkey · Capability

Portkey API — PromptPartials

Portkey API — PromptPartials. 7 operations. Lead operation: Create a new prompt partial. Self-contained Naftiko capability covering one Portkey business surface.

Run with Naftiko PortkeyPromptPartials

What You Can Do

POST
Createpromptpartial — Create a new prompt partial
/v1/prompts/partials
GET
Listpromptpartials — List prompt partials
/v1/prompts/partials
GET
Getpromptpartial — Get a prompt partial by ID or slug
/v1/prompts/partials/{promptpartialid}
PUT
Updatepromptpartial — Update a prompt partial
/v1/prompts/partials/{promptpartialid}
DELETE
Deletepromptpartial — Delete a prompt partial
/v1/prompts/partials/{promptpartialid}
PUT
Updatepromptpartialdefault — Set a version as the default for a prompt partial
/v1/prompts/partials/{promptpartialid}/makedefault
GET
Getpromptpartialversions — Get all versions of a prompt partial
/v1/prompts/partials/{promptpartialid}/versions

MCP Tools

create-new-prompt-partial

Create a new prompt partial

list-prompt-partials

List prompt partials

read-only idempotent
get-prompt-partial-id-slug

Get a prompt partial by ID or slug

read-only idempotent
update-prompt-partial

Update a prompt partial

idempotent
delete-prompt-partial

Delete a prompt partial

idempotent
set-version-default-prompt-partial

Set a version as the default for a prompt partial

idempotent
get-all-versions-prompt-partial

Get all versions of a prompt partial

read-only idempotent

Capability Spec

portkey-promptpartials.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Portkey API — PromptPartials
  description: 'Portkey API — PromptPartials. 7 operations. Lead operation: Create a new prompt partial. Self-contained Naftiko
    capability covering one Portkey business surface.'
  tags:
  - Portkey
  - PromptPartials
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PORTKEY_API_KEY: PORTKEY_API_KEY
capability:
  consumes:
  - type: http
    namespace: portkey-promptpartials
    baseUri: https://api.portkey.ai/v1
    description: Portkey API — PromptPartials business capability. Self-contained, no shared references.
    resources:
    - name: prompts-partials
      path: /prompts/partials
      operations:
      - name: createpromptpartial
        method: POST
        description: Create a new prompt partial
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: listpromptpartials
        method: GET
        description: List prompt partials
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: collection_id
          in: query
          type: string
    - name: prompts-partials-promptPartialId
      path: /prompts/partials/{promptPartialId}
      operations:
      - name: getpromptpartial
        method: GET
        description: Get a prompt partial by ID or slug
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: promptPartialId
          in: path
          type: string
          required: true
      - name: updatepromptpartial
        method: PUT
        description: Update a prompt partial
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: promptPartialId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletepromptpartial
        method: DELETE
        description: Delete a prompt partial
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: promptPartialId
          in: path
          type: string
          required: true
    - name: prompts-partials-promptPartialId-makeDefault
      path: /prompts/partials/{promptPartialId}/makeDefault
      operations:
      - name: updatepromptpartialdefault
        method: PUT
        description: Set a version as the default for a prompt partial
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: promptPartialId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: prompts-partials-promptPartialId-versions
      path: /prompts/partials/{promptPartialId}/versions
      operations:
      - name: getpromptpartialversions
        method: GET
        description: Get all versions of a prompt partial
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: promptPartialId
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.PORTKEY_API_KEY}}'
  exposes:
  - type: rest
    namespace: portkey-promptpartials-rest
    port: 8080
    description: REST adapter for Portkey API — PromptPartials. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/prompts/partials
      name: prompts-partials
      description: REST surface for prompts-partials.
      operations:
      - method: POST
        name: createpromptpartial
        description: Create a new prompt partial
        call: portkey-promptpartials.createpromptpartial
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listpromptpartials
        description: List prompt partials
        call: portkey-promptpartials.listpromptpartials
        with:
          collection_id: rest.collection_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/prompts/partials/{promptpartialid}
      name: prompts-partials-promptpartialid
      description: REST surface for prompts-partials-promptPartialId.
      operations:
      - method: GET
        name: getpromptpartial
        description: Get a prompt partial by ID or slug
        call: portkey-promptpartials.getpromptpartial
        with:
          promptPartialId: rest.promptPartialId
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatepromptpartial
        description: Update a prompt partial
        call: portkey-promptpartials.updatepromptpartial
        with:
          promptPartialId: rest.promptPartialId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletepromptpartial
        description: Delete a prompt partial
        call: portkey-promptpartials.deletepromptpartial
        with:
          promptPartialId: rest.promptPartialId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/prompts/partials/{promptpartialid}/makedefault
      name: prompts-partials-promptpartialid-makedefault
      description: REST surface for prompts-partials-promptPartialId-makeDefault.
      operations:
      - method: PUT
        name: updatepromptpartialdefault
        description: Set a version as the default for a prompt partial
        call: portkey-promptpartials.updatepromptpartialdefault
        with:
          promptPartialId: rest.promptPartialId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/prompts/partials/{promptpartialid}/versions
      name: prompts-partials-promptpartialid-versions
      description: REST surface for prompts-partials-promptPartialId-versions.
      operations:
      - method: GET
        name: getpromptpartialversions
        description: Get all versions of a prompt partial
        call: portkey-promptpartials.getpromptpartialversions
        with:
          promptPartialId: rest.promptPartialId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: portkey-promptpartials-mcp
    port: 9090
    transport: http
    description: MCP adapter for Portkey API — PromptPartials. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: create-new-prompt-partial
      description: Create a new prompt partial
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portkey-promptpartials.createpromptpartial
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-prompt-partials
      description: List prompt partials
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-promptpartials.listpromptpartials
      with:
        collection_id: tools.collection_id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-prompt-partial-id-slug
      description: Get a prompt partial by ID or slug
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-promptpartials.getpromptpartial
      with:
        promptPartialId: tools.promptPartialId
      outputParameters:
      - type: object
        mapping: $.
    - name: update-prompt-partial
      description: Update a prompt partial
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: portkey-promptpartials.updatepromptpartial
      with:
        promptPartialId: tools.promptPartialId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-prompt-partial
      description: Delete a prompt partial
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: portkey-promptpartials.deletepromptpartial
      with:
        promptPartialId: tools.promptPartialId
      outputParameters:
      - type: object
        mapping: $.
    - name: set-version-default-prompt-partial
      description: Set a version as the default for a prompt partial
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: portkey-promptpartials.updatepromptpartialdefault
      with:
        promptPartialId: tools.promptPartialId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-versions-prompt-partial
      description: Get all versions of a prompt partial
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portkey-promptpartials.getpromptpartialversions
      with:
        promptPartialId: tools.promptPartialId
      outputParameters:
      - type: object
        mapping: $.