GrowthBook · Capability

GrowthBook REST API — CustomFields

GrowthBook REST API — CustomFields. 5 operations. Lead operation: Create a single customField. Self-contained Naftiko capability covering one Growthbook business surface.

Run with Naftiko GrowthbookCustomFields

What You Can Do

POST
Createcustomfield — Create a single customField
/v1/v1/custom-fields
GET
Listcustomfields — Get all custom fields
/v1/v1/custom-fields
DELETE
Deletecustomfield — Delete a single customField
/v1/v1/custom-fields/{id}
GET
Getcustomfield — Get a single customField
/v1/v1/custom-fields/{id}
PUT
Updatecustomfield — Update a single customField
/v1/v1/custom-fields/{id}

MCP Tools

create-single-customfield

Create a single customField

get-all-custom-fields

Get all custom fields

read-only idempotent
delete-single-customfield

Delete a single customField

idempotent
get-single-customfield

Get a single customField

read-only idempotent
update-single-customfield

Update a single customField

idempotent

Capability Spec

growthbook-customfields.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GrowthBook REST API — CustomFields
  description: 'GrowthBook REST API — CustomFields. 5 operations. Lead operation: Create a single customField. Self-contained
    Naftiko capability covering one Growthbook business surface.'
  tags:
  - Growthbook
  - CustomFields
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GROWTHBOOK_API_KEY: GROWTHBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: growthbook-customfields
    baseUri: https://api.growthbook.io/api
    description: GrowthBook REST API — CustomFields business capability. Self-contained, no shared references.
    resources:
    - name: v1-custom-fields
      path: /v1/custom-fields
      operations:
      - name: createcustomfield
        method: POST
        description: Create a single customField
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: listcustomfields
        method: GET
        description: Get all custom fields
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: projectId
          in: query
          type: string
    - name: v1-custom-fields-id
      path: /v1/custom-fields/{id}
      operations:
      - name: deletecustomfield
        method: DELETE
        description: Delete a single customField
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
      - name: getcustomfield
        method: GET
        description: Get a single customField
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
      - name: updatecustomfield
        method: PUT
        description: Update a single customField
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          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-customfields-rest
    port: 8080
    description: REST adapter for GrowthBook REST API — CustomFields. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1/custom-fields
      name: v1-custom-fields
      description: REST surface for v1-custom-fields.
      operations:
      - method: POST
        name: createcustomfield
        description: Create a single customField
        call: growthbook-customfields.createcustomfield
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listcustomfields
        description: Get all custom fields
        call: growthbook-customfields.listcustomfields
        with:
          projectId: rest.projectId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/custom-fields/{id}
      name: v1-custom-fields-id
      description: REST surface for v1-custom-fields-id.
      operations:
      - method: DELETE
        name: deletecustomfield
        description: Delete a single customField
        call: growthbook-customfields.deletecustomfield
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getcustomfield
        description: Get a single customField
        call: growthbook-customfields.getcustomfield
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatecustomfield
        description: Update a single customField
        call: growthbook-customfields.updatecustomfield
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: growthbook-customfields-mcp
    port: 9090
    transport: http
    description: MCP adapter for GrowthBook REST API — CustomFields. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-single-customfield
      description: Create a single customField
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: growthbook-customfields.createcustomfield
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-custom-fields
      description: Get all custom fields
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-customfields.listcustomfields
      with:
        projectId: tools.projectId
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-single-customfield
      description: Delete a single customField
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: growthbook-customfields.deletecustomfield
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-single-customfield
      description: Get a single customField
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: growthbook-customfields.getcustomfield
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-single-customfield
      description: Update a single customField
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: growthbook-customfields.updatecustomfield
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.