GrowthBook · Capability

GrowthBook REST API — namespaces

GrowthBook REST API — namespaces. 7 operations. Lead operation: Get all namespaces. Self-contained Naftiko capability covering one Growthbook business surface.

Run with Naftiko Growthbooknamespaces

What You Can Do

GET
Listnamespaces — Get all namespaces
/v1/v1/namespaces
POST
Postnamespace — Create a namespace
/v1/v1/namespaces
GET
Getnamespace — Get a single namespace
/v1/v1/namespaces/{id}
PUT
Putnamespace — Update a namespace
/v1/v1/namespaces/{id}
DELETE
Deletenamespace — Delete a namespace
/v1/v1/namespaces/{id}
GET
Getnamespacememberships — Get namespace membership
/v1/v1/namespaces/{id}/memberships
POST
Postnamespacerotateseed — Rotate namespace seed
/v1/v1/namespaces/{id}/rotateseed

MCP Tools

get-all-namespaces

Get all namespaces

read-only idempotent
create-namespace

Create a namespace

get-single-namespace

Get a single namespace

read-only idempotent
update-namespace

Update a namespace

idempotent
delete-namespace

Delete a namespace

idempotent
get-namespace-membership

Get namespace membership

read-only idempotent
rotate-namespace-seed

Rotate namespace seed

Capability Spec

growthbook-namespaces.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GrowthBook REST API — namespaces
  description: 'GrowthBook REST API — namespaces. 7 operations. Lead operation: Get all namespaces. Self-contained Naftiko
    capability covering one Growthbook business surface.'
  tags:
  - Growthbook
  - namespaces
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GROWTHBOOK_API_KEY: GROWTHBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: growthbook-namespaces
    baseUri: https://api.growthbook.io/api
    description: GrowthBook REST API — namespaces business capability. Self-contained, no shared references.
    resources:
    - name: v1-namespaces
      path: /v1/namespaces
      operations:
      - name: listnamespaces
        method: GET
        description: Get all namespaces
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: postnamespace
        method: POST
        description: Create a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-namespaces-id
      path: /v1/namespaces/{id}
      operations:
      - name: getnamespace
        method: GET
        description: Get a single namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique id of the namespace
          required: true
      - name: putnamespace
        method: PUT
        description: Update a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique id of the namespace
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletenamespace
        method: DELETE
        description: Delete a namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique id of the namespace
          required: true
    - name: v1-namespaces-id-memberships
      path: /v1/namespaces/{id}/memberships
      operations:
      - name: getnamespacememberships
        method: GET
        description: Get namespace membership
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique id of the namespace
          required: true
    - name: v1-namespaces-id-rotateSeed
      path: /v1/namespaces/{id}/rotateSeed
      operations:
      - name: postnamespacerotateseed
        method: POST
        description: Rotate namespace seed
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The unique id of the namespace
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.GROWTHBOOK_API_KEY}}'
  exposes:
  - type: rest
    namespace: growthbook-namespaces-rest
    port: 8080
    description: REST adapter for GrowthBook REST API — namespaces. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1/namespaces
      name: v1-namespaces
      description: REST surface for v1-namespaces.
      operations:
      - method: GET
        name: listnamespaces
        description: Get all namespaces
        call: growthbook-namespaces.listnamespaces
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postnamespace
        description: Create a namespace
        call: growthbook-namespaces.postnamespace
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/namespaces/{id}
      name: v1-namespaces-id
      description: REST surface for v1-namespaces-id.
      operations:
      - method: GET
        name: getnamespace
        description: Get a single namespace
        call: growthbook-namespaces.getnamespace
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putnamespace
        description: Update a namespace
        call: growthbook-namespaces.putnamespace
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletenamespace
        description: Delete a namespace
        call: growthbook-namespaces.deletenamespace
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/namespaces/{id}/memberships
      name: v1-namespaces-id-memberships
      description: REST surface for v1-namespaces-id-memberships.
      operations:
      - method: GET
        name: getnamespacememberships
        description: Get namespace membership
        call: growthbook-namespaces.getnamespacememberships
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/namespaces/{id}/rotateseed
      name: v1-namespaces-id-rotateseed
      description: REST surface for v1-namespaces-id-rotateSeed.
      operations:
      - method: POST
        name: postnamespacerotateseed
        description: Rotate namespace seed
        call: growthbook-namespaces.postnamespacerotateseed
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: growthbook-namespaces-mcp
    port: 9090
    transport: http
    description: MCP adapter for GrowthBook REST API — namespaces. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-all-namespaces
      description: Get all namespaces
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-namespaces.listnamespaces
      outputParameters:
      - type: object
        mapping: $.
    - name: create-namespace
      description: Create a namespace
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: growthbook-namespaces.postnamespace
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-namespace
      description: Get a single namespace
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-namespaces.getnamespace
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-namespace
      description: Update a namespace
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: growthbook-namespaces.putnamespace
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-namespace
      description: Delete a namespace
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: growthbook-namespaces.deletenamespace
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-namespace-membership
      description: Get namespace membership
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-namespaces.getnamespacememberships
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: rotate-namespace-seed
      description: Rotate namespace seed
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: growthbook-namespaces.postnamespacerotateseed
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.