Salesforce Flow · Capability

Salesforce Flow REST API — Flow Definitions

Salesforce Flow REST API — Flow Definitions. 4 operations. Lead operation: Query Flows with SOQL. Self-contained Naftiko capability covering one Salesforce Flow business surface.

Run with Naftiko Salesforce FlowFlow Definitions

What You Can Do

GET
Queryflows — Query Flows with SOQL
/v1/query
GET
Listflows — List Flow Definitions
/v1/sobjects/flow
GET
Getflow — Get Flow Definition
/v1/sobjects/flow/{flowid}
PATCH
Updateflow — Update Flow Definition
/v1/sobjects/flow/{flowid}

MCP Tools

query-flows-soql

Query Flows with SOQL

read-only idempotent
list-flow-definitions

List Flow Definitions

read-only idempotent
get-flow-definition

Get Flow Definition

read-only idempotent
update-flow-definition

Update Flow Definition

idempotent

Capability Spec

rest-flow-definitions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Salesforce Flow REST API — Flow Definitions
  description: 'Salesforce Flow REST API — Flow Definitions. 4 operations. Lead operation: Query Flows with SOQL. Self-contained
    Naftiko capability covering one Salesforce Flow business surface.'
  tags:
  - Salesforce Flow
  - Flow Definitions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SALESFORCE_FLOW_API_KEY: SALESFORCE_FLOW_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-flow-definitions
    baseUri: https://{instance}.salesforce.com/services/data/v59.0
    description: Salesforce Flow REST API — Flow Definitions business capability. Self-contained, no shared references.
    resources:
    - name: query
      path: /query
      operations:
      - name: queryflows
        method: GET
        description: Query Flows with SOQL
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: q
          in: query
          type: string
          description: SOQL query string (e.g. SELECT Id, ApiName, Status FROM Flow)
          required: true
    - name: sobjects-Flow
      path: /sobjects/Flow
      operations:
      - name: listflows
        method: GET
        description: List Flow Definitions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: q
          in: query
          type: string
          description: SOQL query string to filter flows
    - name: sobjects-Flow-flowId
      path: /sobjects/Flow/{flowId}
      operations:
      - name: getflow
        method: GET
        description: Get Flow Definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: flowId
          in: path
          type: string
          description: The unique Salesforce ID of the Flow record
          required: true
      - name: updateflow
        method: PATCH
        description: Update Flow Definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: flowId
          in: path
          type: string
          description: The unique Salesforce ID of the Flow record
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.SALESFORCE_FLOW_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-flow-definitions-rest
    port: 8080
    description: REST adapter for Salesforce Flow REST API — Flow Definitions. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/query
      name: query
      description: REST surface for query.
      operations:
      - method: GET
        name: queryflows
        description: Query Flows with SOQL
        call: rest-flow-definitions.queryflows
        with:
          q: rest.q
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sobjects/flow
      name: sobjects-flow
      description: REST surface for sobjects-Flow.
      operations:
      - method: GET
        name: listflows
        description: List Flow Definitions
        call: rest-flow-definitions.listflows
        with:
          q: rest.q
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sobjects/flow/{flowid}
      name: sobjects-flow-flowid
      description: REST surface for sobjects-Flow-flowId.
      operations:
      - method: GET
        name: getflow
        description: Get Flow Definition
        call: rest-flow-definitions.getflow
        with:
          flowId: rest.flowId
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateflow
        description: Update Flow Definition
        call: rest-flow-definitions.updateflow
        with:
          flowId: rest.flowId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-flow-definitions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Salesforce Flow REST API — Flow Definitions. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: query-flows-soql
      description: Query Flows with SOQL
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-flow-definitions.queryflows
      with:
        q: tools.q
      outputParameters:
      - type: object
        mapping: $.
    - name: list-flow-definitions
      description: List Flow Definitions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-flow-definitions.listflows
      with:
        q: tools.q
      outputParameters:
      - type: object
        mapping: $.
    - name: get-flow-definition
      description: Get Flow Definition
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-flow-definitions.getflow
      with:
        flowId: tools.flowId
      outputParameters:
      - type: object
        mapping: $.
    - name: update-flow-definition
      description: Update Flow Definition
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-flow-definitions.updateflow
      with:
        flowId: tools.flowId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.