Moesif · Capability
Management API — Cohorts
Management API — Cohorts. 6 operations. Lead operation: Create New Cohort. Self-contained Naftiko capability covering one Moesif business surface.
What You Can Do
POST
Createcohort
— Create New Cohort
/v1//cohorts
GET
Getcohorts
— Get Cohorts
/v1//cohorts
POST
Updatecohort
— Update a Cohort
/v1//cohorts/{cohortid}
GET
Getcohort
— Get Cohort
/v1//cohorts/{cohortid}
DELETE
Deletecohort
— Delete Cohort
/v1//cohorts/{cohortid}
DELETE
Deletecohortsamplerate
— Delete Sample Rate for a Cohort
/v1//cohorts/{cohortid}/sample-rate
MCP Tools
create-new-cohort
Create New Cohort
get-cohorts
Get Cohorts
read-only
idempotent
update-cohort
Update a Cohort
get-cohort
Get Cohort
read-only
idempotent
delete-cohort
Delete Cohort
idempotent
delete-sample-rate-cohort
Delete Sample Rate for a Cohort
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Management API — Cohorts
description: 'Management API — Cohorts. 6 operations. Lead operation: Create New Cohort. Self-contained Naftiko capability
covering one Moesif business surface.'
tags:
- Moesif
- Cohorts
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
MOESIF_API_KEY: MOESIF_API_KEY
capability:
consumes:
- type: http
namespace: moesif-cohorts
baseUri: https://api.moesif.com/v1
description: Management API — Cohorts business capability. Self-contained, no shared references.
resources:
- name: ~-cohorts
path: /~/cohorts
operations:
- name: createcohort
method: POST
description: Create New Cohort
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: orgId
in: path
type: string
required: true
- name: app_id
in: query
type: string
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: getcohorts
method: GET
description: Get Cohorts
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: orgId
in: path
type: string
required: true
- name: app_id
in: query
type: string
- name: cohort_type
in: query
type: string
required: true
- name: ~-cohorts-cohortId
path: /~/cohorts/{cohortId}
operations:
- name: updatecohort
method: POST
description: Update a Cohort
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: orgId
in: path
type: string
required: true
- name: app_id
in: query
type: string
- name: cohortId
in: path
type: string
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: getcohort
method: GET
description: Get Cohort
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: orgId
in: path
type: string
required: true
- name: app_id
in: query
type: string
- name: cohort_type
in: query
type: string
required: true
- name: cohortId
in: path
type: string
required: true
- name: deletecohort
method: DELETE
description: Delete Cohort
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: orgId
in: path
type: string
required: true
- name: app_id
in: query
type: string
- name: cohortId
in: path
type: string
required: true
- name: ~-cohorts-cohortId-sample_rate
path: /~/cohorts/{cohortId}/sample_rate
operations:
- name: deletecohortsamplerate
method: DELETE
description: Delete Sample Rate for a Cohort
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: orgId
in: path
type: string
required: true
- name: app_id
in: query
type: string
- name: cohortId
in: path
type: string
required: true
authentication:
type: bearer
token: '{{env.MOESIF_API_KEY}}'
exposes:
- type: rest
namespace: moesif-cohorts-rest
port: 8080
description: REST adapter for Management API — Cohorts. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1//cohorts
name: cohorts
description: REST surface for ~-cohorts.
operations:
- method: POST
name: createcohort
description: Create New Cohort
call: moesif-cohorts.createcohort
with:
orgId: rest.orgId
app_id: rest.app_id
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: GET
name: getcohorts
description: Get Cohorts
call: moesif-cohorts.getcohorts
with:
orgId: rest.orgId
app_id: rest.app_id
cohort_type: rest.cohort_type
outputParameters:
- type: object
mapping: $.
- path: /v1//cohorts/{cohortid}
name: cohorts-cohortid
description: REST surface for ~-cohorts-cohortId.
operations:
- method: POST
name: updatecohort
description: Update a Cohort
call: moesif-cohorts.updatecohort
with:
orgId: rest.orgId
app_id: rest.app_id
cohortId: rest.cohortId
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: GET
name: getcohort
description: Get Cohort
call: moesif-cohorts.getcohort
with:
orgId: rest.orgId
app_id: rest.app_id
cohort_type: rest.cohort_type
cohortId: rest.cohortId
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: deletecohort
description: Delete Cohort
call: moesif-cohorts.deletecohort
with:
orgId: rest.orgId
app_id: rest.app_id
cohortId: rest.cohortId
outputParameters:
- type: object
mapping: $.
- path: /v1//cohorts/{cohortid}/sample-rate
name: cohorts-cohortid-sample-rate
description: REST surface for ~-cohorts-cohortId-sample_rate.
operations:
- method: DELETE
name: deletecohortsamplerate
description: Delete Sample Rate for a Cohort
call: moesif-cohorts.deletecohortsamplerate
with:
orgId: rest.orgId
app_id: rest.app_id
cohortId: rest.cohortId
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: moesif-cohorts-mcp
port: 9090
transport: http
description: MCP adapter for Management API — Cohorts. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: create-new-cohort
description: Create New Cohort
hints:
readOnly: false
destructive: false
idempotent: false
call: moesif-cohorts.createcohort
with:
orgId: tools.orgId
app_id: tools.app_id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: get-cohorts
description: Get Cohorts
hints:
readOnly: true
destructive: false
idempotent: true
call: moesif-cohorts.getcohorts
with:
orgId: tools.orgId
app_id: tools.app_id
cohort_type: tools.cohort_type
outputParameters:
- type: object
mapping: $.
- name: update-cohort
description: Update a Cohort
hints:
readOnly: false
destructive: false
idempotent: false
call: moesif-cohorts.updatecohort
with:
orgId: tools.orgId
app_id: tools.app_id
cohortId: tools.cohortId
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: get-cohort
description: Get Cohort
hints:
readOnly: true
destructive: false
idempotent: true
call: moesif-cohorts.getcohort
with:
orgId: tools.orgId
app_id: tools.app_id
cohort_type: tools.cohort_type
cohortId: tools.cohortId
outputParameters:
- type: object
mapping: $.
- name: delete-cohort
description: Delete Cohort
hints:
readOnly: false
destructive: true
idempotent: true
call: moesif-cohorts.deletecohort
with:
orgId: tools.orgId
app_id: tools.app_id
cohortId: tools.cohortId
outputParameters:
- type: object
mapping: $.
- name: delete-sample-rate-cohort
description: Delete Sample Rate for a Cohort
hints:
readOnly: false
destructive: true
idempotent: true
call: moesif-cohorts.deletecohortsamplerate
with:
orgId: tools.orgId
app_id: tools.app_id
cohortId: tools.cohortId
outputParameters:
- type: object
mapping: $.