PostHog · Capability

PostHog API — web_experiments

PostHog API — web_experiments. 6 operations. Lead operation: web_experiments. Self-contained Naftiko capability covering one Posthog business surface.

Run with Naftiko Posthogweb_experiments

What You Can Do

GET
Webexperimentslist — webexperimentslist
/v1/api/projects/{project-id}/web-experiments
POST
Webexperimentscreate — webexperimentscreate
/v1/api/projects/{project-id}/web-experiments
GET
Webexperimentsretrieve — webexperimentsretrieve
/v1/api/projects/{project-id}/web-experiments/{id}
PUT
Webexperimentsupdate — webexperimentsupdate
/v1/api/projects/{project-id}/web-experiments/{id}
PATCH
Webexperimentspartialupdate — webexperimentspartialupdate
/v1/api/projects/{project-id}/web-experiments/{id}
DELETE
Webexperimentsdestroy — webexperimentsdestroy
/v1/api/projects/{project-id}/web-experiments/{id}

MCP Tools

webexperimentslist

webexperimentslist

read-only idempotent
webexperimentscreate

webexperimentscreate

webexperimentsretrieve

webexperimentsretrieve

read-only idempotent
webexperimentsupdate

webexperimentsupdate

idempotent
webexperimentspartialupdate

webexperimentspartialupdate

idempotent
webexperimentsdestroy

webexperimentsdestroy

idempotent

Capability Spec

posthog-web-experiments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PostHog API — web_experiments
  description: 'PostHog API — web_experiments. 6 operations. Lead operation: web_experiments. Self-contained Naftiko capability
    covering one Posthog business surface.'
  tags:
  - Posthog
  - web_experiments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTHOG_API_KEY: POSTHOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: posthog-web-experiments
    baseUri: ''
    description: PostHog API — web_experiments business capability. Self-contained, no shared references.
    resources:
    - name: api-projects-project_id-web_experiments
      path: /api/projects/{project_id}/web_experiments/
      operations:
      - name: webexperimentslist
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
      - name: webexperimentscreate
        method: POST
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-web_experiments-id
      path: /api/projects/{project_id}/web_experiments/{id}/
      operations:
      - name: webexperimentsretrieve
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this web experiment.
          required: true
      - name: webexperimentsupdate
        method: PUT
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this web experiment.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: webexperimentspartialupdate
        method: PATCH
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this web experiment.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: webexperimentsdestroy
        method: DELETE
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: A unique integer value identifying this web experiment.
          required: true
    authentication:
      type: bearer
      token: '{{env.POSTHOG_API_KEY}}'
  exposes:
  - type: rest
    namespace: posthog-web-experiments-rest
    port: 8080
    description: REST adapter for PostHog API — web_experiments. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/projects/{project-id}/web-experiments
      name: api-projects-project-id-web-experiments
      description: REST surface for api-projects-project_id-web_experiments.
      operations:
      - method: GET
        name: webexperimentslist
        description: webexperimentslist
        call: posthog-web-experiments.webexperimentslist
        with:
          limit: rest.limit
          offset: rest.offset
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: webexperimentscreate
        description: webexperimentscreate
        call: posthog-web-experiments.webexperimentscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/projects/{project-id}/web-experiments/{id}
      name: api-projects-project-id-web-experiments-id
      description: REST surface for api-projects-project_id-web_experiments-id.
      operations:
      - method: GET
        name: webexperimentsretrieve
        description: webexperimentsretrieve
        call: posthog-web-experiments.webexperimentsretrieve
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: webexperimentsupdate
        description: webexperimentsupdate
        call: posthog-web-experiments.webexperimentsupdate
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: webexperimentspartialupdate
        description: webexperimentspartialupdate
        call: posthog-web-experiments.webexperimentspartialupdate
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: webexperimentsdestroy
        description: webexperimentsdestroy
        call: posthog-web-experiments.webexperimentsdestroy
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: posthog-web-experiments-mcp
    port: 9090
    transport: http
    description: MCP adapter for PostHog API — web_experiments. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: webexperimentslist
      description: webexperimentslist
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-web-experiments.webexperimentslist
      with:
        limit: tools.limit
        offset: tools.offset
      outputParameters:
      - type: object
        mapping: $.
    - name: webexperimentscreate
      description: webexperimentscreate
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: posthog-web-experiments.webexperimentscreate
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: webexperimentsretrieve
      description: webexperimentsretrieve
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-web-experiments.webexperimentsretrieve
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: webexperimentsupdate
      description: webexperimentsupdate
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: posthog-web-experiments.webexperimentsupdate
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: webexperimentspartialupdate
      description: webexperimentspartialupdate
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: posthog-web-experiments.webexperimentspartialupdate
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: webexperimentsdestroy
      description: webexperimentsdestroy
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: posthog-web-experiments.webexperimentsdestroy
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.