Togai · Capability

Togai Apis — Entitlements

Togai Apis — Entitlements. 8 operations. Lead operation: Get Entitlements for a Account. Self-contained Naftiko capability covering one Togai business surface.

Run with Naftiko TogaiEntitlements

What You Can Do

GET
Getentitlements — Get Entitlements for a Account
/v1/accounts/{account-id}/entitlements
GET
Getentitlementvalue — Get Entitlement Value for a Account
/v1/accounts/{account-id}/entitlements/{feature-id}
POST
Validateentitlementvalue — Check Entitlement Value for a Account
/v1/accounts/{account-id}/entitlements/{feature-id}
GET
Getfeaturecredits — Get Feature Credits Balance
/v1/accounts/{account-id}/features/{feature-id}
GET
Listfeaturecreditentries — List Feature Credits Entries of a Feature for an Account
/v1/accounts/{account-id}/features/{feature-id}/entries
PATCH
Updatefeaturecreditentry — Update a Feature Credits Entry
/v1/accounts/{account-id}/features/{feature-id}/entries/{entry-id}
POST
Voidfeaturecreditentry — Void a Feature Credits Entry of a Feature for an Account
/v1/accounts/{account-id}/features/{feature-id}/entries/{entry-id}/void
POST
Ingestentitledevent — Ingest Event if a User is Entitled to a Feature
/v1/entitled

MCP Tools

get-entitlements-account

Get Entitlements for a Account

read-only idempotent
get-entitlement-value-account

Get Entitlement Value for a Account

read-only idempotent
check-entitlement-value-account

Check Entitlement Value for a Account

read-only
get-feature-credits-balance

Get Feature Credits Balance

read-only idempotent
list-feature-credits-entries-feature

List Feature Credits Entries of a Feature for an Account

read-only idempotent
update-feature-credits-entry

Update a Feature Credits Entry

idempotent
void-feature-credits-entry-feature

Void a Feature Credits Entry of a Feature for an Account

ingest-event-if-user-is

Ingest Event if a User is Entitled to a Feature

Capability Spec

togai-entitlements.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Togai Apis — Entitlements
  description: 'Togai Apis — Entitlements. 8 operations. Lead operation: Get Entitlements for a Account. Self-contained Naftiko
    capability covering one Togai business surface.'
  tags:
  - Togai
  - Entitlements
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TOGAI_API_KEY: TOGAI_API_KEY
capability:
  consumes:
  - type: http
    namespace: togai-entitlements
    baseUri: https://api.togai.com
    description: Togai Apis — Entitlements business capability. Self-contained, no shared references.
    resources:
    - name: accounts-account_id-entitlements
      path: /accounts/{account_id}/entitlements
      operations:
      - name: getentitlements
        method: GET
        description: Get Entitlements for a Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: accounts-account_id-entitlements-feature_id
      path: /accounts/{account_id}/entitlements/{feature_id}
      operations:
      - name: getentitlementvalue
        method: GET
        description: Get Entitlement Value for a Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: validateentitlementvalue
        method: POST
        description: Check Entitlement Value for a Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: accounts-account_id-features-feature_id
      path: /accounts/{account_id}/features/{feature_id}
      operations:
      - name: getfeaturecredits
        method: GET
        description: Get Feature Credits Balance
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: accounts-account_id-features-feature_id-entries
      path: /accounts/{account_id}/features/{feature_id}/entries
      operations:
      - name: listfeaturecreditentries
        method: GET
        description: List Feature Credits Entries of a Feature for an Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: accounts-account_id-features-feature_id-entries-entry_id
      path: /accounts/{account_id}/features/{feature_id}/entries/{entry_id}
      operations:
      - name: updatefeaturecreditentry
        method: PATCH
        description: Update a Feature Credits Entry
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: accounts-account_id-features-feature_id-entries-entry_id-void
      path: /accounts/{account_id}/features/{feature_id}/entries/{entry_id}/void
      operations:
      - name: voidfeaturecreditentry
        method: POST
        description: Void a Feature Credits Entry of a Feature for an Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: entitled
      path: /entitled
      operations:
      - name: ingestentitledevent
        method: POST
        description: Ingest Event if a User is Entitled to a Feature
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.TOGAI_API_KEY}}'
  exposes:
  - type: rest
    namespace: togai-entitlements-rest
    port: 8080
    description: REST adapter for Togai Apis — Entitlements. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/accounts/{account-id}/entitlements
      name: accounts-account-id-entitlements
      description: REST surface for accounts-account_id-entitlements.
      operations:
      - method: GET
        name: getentitlements
        description: Get Entitlements for a Account
        call: togai-entitlements.getentitlements
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{account-id}/entitlements/{feature-id}
      name: accounts-account-id-entitlements-feature-id
      description: REST surface for accounts-account_id-entitlements-feature_id.
      operations:
      - method: GET
        name: getentitlementvalue
        description: Get Entitlement Value for a Account
        call: togai-entitlements.getentitlementvalue
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: validateentitlementvalue
        description: Check Entitlement Value for a Account
        call: togai-entitlements.validateentitlementvalue
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{account-id}/features/{feature-id}
      name: accounts-account-id-features-feature-id
      description: REST surface for accounts-account_id-features-feature_id.
      operations:
      - method: GET
        name: getfeaturecredits
        description: Get Feature Credits Balance
        call: togai-entitlements.getfeaturecredits
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{account-id}/features/{feature-id}/entries
      name: accounts-account-id-features-feature-id-entries
      description: REST surface for accounts-account_id-features-feature_id-entries.
      operations:
      - method: GET
        name: listfeaturecreditentries
        description: List Feature Credits Entries of a Feature for an Account
        call: togai-entitlements.listfeaturecreditentries
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{account-id}/features/{feature-id}/entries/{entry-id}
      name: accounts-account-id-features-feature-id-entries-entry-id
      description: REST surface for accounts-account_id-features-feature_id-entries-entry_id.
      operations:
      - method: PATCH
        name: updatefeaturecreditentry
        description: Update a Feature Credits Entry
        call: togai-entitlements.updatefeaturecreditentry
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{account-id}/features/{feature-id}/entries/{entry-id}/void
      name: accounts-account-id-features-feature-id-entries-entry-id-void
      description: REST surface for accounts-account_id-features-feature_id-entries-entry_id-void.
      operations:
      - method: POST
        name: voidfeaturecreditentry
        description: Void a Feature Credits Entry of a Feature for an Account
        call: togai-entitlements.voidfeaturecreditentry
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/entitled
      name: entitled
      description: REST surface for entitled.
      operations:
      - method: POST
        name: ingestentitledevent
        description: Ingest Event if a User is Entitled to a Feature
        call: togai-entitlements.ingestentitledevent
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: togai-entitlements-mcp
    port: 9090
    transport: http
    description: MCP adapter for Togai Apis — Entitlements. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-entitlements-account
      description: Get Entitlements for a Account
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: togai-entitlements.getentitlements
      outputParameters:
      - type: object
        mapping: $.
    - name: get-entitlement-value-account
      description: Get Entitlement Value for a Account
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: togai-entitlements.getentitlementvalue
      outputParameters:
      - type: object
        mapping: $.
    - name: check-entitlement-value-account
      description: Check Entitlement Value for a Account
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: togai-entitlements.validateentitlementvalue
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-feature-credits-balance
      description: Get Feature Credits Balance
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: togai-entitlements.getfeaturecredits
      outputParameters:
      - type: object
        mapping: $.
    - name: list-feature-credits-entries-feature
      description: List Feature Credits Entries of a Feature for an Account
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: togai-entitlements.listfeaturecreditentries
      outputParameters:
      - type: object
        mapping: $.
    - name: update-feature-credits-entry
      description: Update a Feature Credits Entry
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: togai-entitlements.updatefeaturecreditentry
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: void-feature-credits-entry-feature
      description: Void a Feature Credits Entry of a Feature for an Account
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: togai-entitlements.voidfeaturecreditentry
      outputParameters:
      - type: object
        mapping: $.
    - name: ingest-event-if-user-is
      description: Ingest Event if a User is Entitled to a Feature
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: togai-entitlements.ingestentitledevent
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.