PostHog · Capability

PostHog API — legal_documents

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

Run with Naftiko Posthoglegal_documents

What You Can Do

GET
Legaldocumentslist — legaldocumentslist
/v1/api/organizations/{organization-id}/legal-documents
POST
Legaldocumentscreate — legaldocumentscreate
/v1/api/organizations/{organization-id}/legal-documents
GET
Legaldocumentsretrieve — legaldocumentsretrieve
/v1/api/organizations/{organization-id}/legal-documents/{id}
GET
Legaldocumentsdownloadretrieve — Short-lived redirect to the signed PDF in object storage. 404 while the
/v1/api/organizations/{organization-id}/legal-documents/{id}/download

MCP Tools

legaldocumentslist

legaldocumentslist

read-only idempotent
legaldocumentscreate

legaldocumentscreate

legaldocumentsretrieve

legaldocumentsretrieve

read-only idempotent
short-lived-redirect-signed-pdf

Short-lived redirect to the signed PDF in object storage. 404 while the

read-only idempotent

Capability Spec

posthog-legal-documents.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PostHog API — legal_documents
  description: 'PostHog API — legal_documents. 4 operations. Lead operation: legal_documents. Self-contained Naftiko capability
    covering one Posthog business surface.'
  tags:
  - Posthog
  - legal_documents
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTHOG_API_KEY: POSTHOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: posthog-legal-documents
    baseUri: ''
    description: PostHog API — legal_documents business capability. Self-contained, no shared references.
    resources:
    - name: api-organizations-organization_id-legal_documents
      path: /api/organizations/{organization_id}/legal_documents/
      operations:
      - name: legaldocumentslist
        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: legaldocumentscreate
        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-organizations-organization_id-legal_documents-id
      path: /api/organizations/{organization_id}/legal_documents/{id}/
      operations:
      - name: legaldocumentsretrieve
        method: GET
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    - name: api-organizations-organization_id-legal_documents-id-download
      path: /api/organizations/{organization_id}/legal_documents/{id}/download/
      operations:
      - name: legaldocumentsdownloadretrieve
        method: GET
        description: Short-lived redirect to the signed PDF in object storage. 404 while the
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.POSTHOG_API_KEY}}'
  exposes:
  - type: rest
    namespace: posthog-legal-documents-rest
    port: 8080
    description: REST adapter for PostHog API — legal_documents. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/organizations/{organization-id}/legal-documents
      name: api-organizations-organization-id-legal-documents
      description: REST surface for api-organizations-organization_id-legal_documents.
      operations:
      - method: GET
        name: legaldocumentslist
        description: legaldocumentslist
        call: posthog-legal-documents.legaldocumentslist
        with:
          limit: rest.limit
          offset: rest.offset
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: legaldocumentscreate
        description: legaldocumentscreate
        call: posthog-legal-documents.legaldocumentscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/organizations/{organization-id}/legal-documents/{id}
      name: api-organizations-organization-id-legal-documents-id
      description: REST surface for api-organizations-organization_id-legal_documents-id.
      operations:
      - method: GET
        name: legaldocumentsretrieve
        description: legaldocumentsretrieve
        call: posthog-legal-documents.legaldocumentsretrieve
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/organizations/{organization-id}/legal-documents/{id}/download
      name: api-organizations-organization-id-legal-documents-id-download
      description: REST surface for api-organizations-organization_id-legal_documents-id-download.
      operations:
      - method: GET
        name: legaldocumentsdownloadretrieve
        description: Short-lived redirect to the signed PDF in object storage. 404 while the
        call: posthog-legal-documents.legaldocumentsdownloadretrieve
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: posthog-legal-documents-mcp
    port: 9090
    transport: http
    description: MCP adapter for PostHog API — legal_documents. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: legaldocumentslist
      description: legaldocumentslist
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-legal-documents.legaldocumentslist
      with:
        limit: tools.limit
        offset: tools.offset
      outputParameters:
      - type: object
        mapping: $.
    - name: legaldocumentscreate
      description: legaldocumentscreate
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: posthog-legal-documents.legaldocumentscreate
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: legaldocumentsretrieve
      description: legaldocumentsretrieve
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-legal-documents.legaldocumentsretrieve
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: short-lived-redirect-signed-pdf
      description: Short-lived redirect to the signed PDF in object storage. 404 while the
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-legal-documents.legaldocumentsdownloadretrieve
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.