naftiko: 1.0.0-alpha2 info: label: Flagsmith Admin API — Segments description: 'Flagsmith Admin API — Segments. 5 operations. Lead operation: List segments for a project. Self-contained Naftiko capability covering one Flagsmith business surface.' tags: - Flagsmith - Segments created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: FLAGSMITH_API_KEY: FLAGSMITH_API_KEY capability: consumes: - type: http namespace: admin-segments baseUri: https://api.flagsmith.com/api/v1 description: Flagsmith Admin API — Segments business capability. Self-contained, no shared references. resources: - name: projects-project_id-segments path: /projects/{project_id}/segments/ operations: - name: listsegments method: GET description: List segments for a project outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createsegment method: POST description: Create a segment outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: projects-project_id-segments-segment_id path: /projects/{project_id}/segments/{segment_id}/ operations: - name: getsegment method: GET description: Get a segment outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updatesegment method: PUT description: Update a segment outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: deletesegment method: DELETE description: Delete a segment outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: apikey key: Authorization value: '{{env.FLAGSMITH_API_KEY}}' placement: header exposes: - type: rest namespace: admin-segments-rest port: 8080 description: REST adapter for Flagsmith Admin API — Segments. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/projects/{project-id}/segments name: projects-project-id-segments description: REST surface for projects-project_id-segments. operations: - method: GET name: listsegments description: List segments for a project call: admin-segments.listsegments outputParameters: - type: object mapping: $. - method: POST name: createsegment description: Create a segment call: admin-segments.createsegment with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/projects/{project-id}/segments/{segment-id} name: projects-project-id-segments-segment-id description: REST surface for projects-project_id-segments-segment_id. operations: - method: GET name: getsegment description: Get a segment call: admin-segments.getsegment outputParameters: - type: object mapping: $. - method: PUT name: updatesegment description: Update a segment call: admin-segments.updatesegment with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletesegment description: Delete a segment call: admin-segments.deletesegment outputParameters: - type: object mapping: $. - type: mcp namespace: admin-segments-mcp port: 9090 transport: http description: MCP adapter for Flagsmith Admin API — Segments. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-segments-project description: List segments for a project hints: readOnly: true destructive: false idempotent: true call: admin-segments.listsegments outputParameters: - type: object mapping: $. - name: create-segment description: Create a segment hints: readOnly: false destructive: false idempotent: false call: admin-segments.createsegment with: body: tools.body outputParameters: - type: object mapping: $. - name: get-segment description: Get a segment hints: readOnly: true destructive: false idempotent: true call: admin-segments.getsegment outputParameters: - type: object mapping: $. - name: update-segment description: Update a segment hints: readOnly: false destructive: false idempotent: true call: admin-segments.updatesegment with: body: tools.body outputParameters: - type: object mapping: $. - name: delete-segment description: Delete a segment hints: readOnly: false destructive: true idempotent: true call: admin-segments.deletesegment outputParameters: - type: object mapping: $.