🌐
Recrubo API
  • Getting Started
    • Introduction
    • Sandbox
    • Async requests
    • Authentication
    • Webhooks
    • Filtering, sorting, pagination and including resources
  • Guides
    • Setting up webhooks
    • Generating flows
    • Editing flows
    • Triggering flows
    • Embedding the Inbox
    • Sending messages
  • Resources
    • API Resource Reference
      • Candidate
      • Conversation
      • Flow
      • FlowRun
      • FlowGeneration
      • Message
      • MessageTemplate
      • MessageThread
      • NodeAction
      • NodeTransition
      • Node
      • VacancyAnalysis
      • Vacancy
      • User
      • WebhookPayload
    • Embeddables
      • Inbox
      • BotStudio
      • GenerateFlow
      • Whatsapp connect button
      • Schedule Form
      • Schedule Table
    • Flow types
      • vacancy_application_flow
  • Management
    • Organizations
Powered by GitBook
On this page
  1. Resources
  2. API Resource Reference

NodeAction

PreviousMessageThreadNextNodeTransition

Last updated 9 months ago

Single action to perform when the candidate enters a . This has many different variations like say-text, say-contact, ask-text, say-location, say-list, etc..

Endpoints

  • GET /node-actions - Retrieve all node actions (of all flows and nodes)

  • GET /node-actions/{id} - Retrieve a single node action by ID

  • POST /node-actions - Create a new node action

  • PATCH /node-actions/{id} - Update a node action by ID

  • DELETE /node-actions/{id} - Delete a node action by ID

Attributes

Field
Type
Description

actionType

String

Type of action (can be either 'ask' or 'say')

value

Object

A json-object containing the data required to perform the action

variableName

String

Where to store the user answer in the session (only for type 'ask')

index

Integer

Position within the node, index 0 is the first action

subType

String

Type of the content to be delivered: 'text', 'contact', 'location', 'list', 'appointment', 'image', 'video', 'audio', 'document', 'set-variable'

HTTP methods

Field
GET
POST
PATCH

actionType

X

X

X

value

X

X

X

variableName

X

X

X

index

X

X

X

subType

X

X

X

Example bodies

Post

{
    "data": {
        "type": "nodeActions",
        "attributes": {
            "actionType": "ask",
            "subType": "text",
            "value": {
                "text": "What is your name?"
            },
            "index": 0,
            "variableName": "name",
        },
        "relationships": {
            "node": {
                "data": {
                    "type": "nodes",
                    "id": "owning-node-id",
                }
            }
        }
    }
}

variableName is only required when actionType is set to ask.

Patch

{
    "data": {
        "id": "your-node-action-id",
        "type": "nodeActions",
        "attributes": {
            "value": {
                "text": "What is your name?"
            },
        }
    }
}

OpenAPI

Node

Get a NodeActions

get
Authorizations
Path parameters
idstringRequired
Responses
200
NodeActions found
application/vnd.api+json
get
GET /public/v2/node-actions/{id} HTTP/1.1
Host: {defaulthost}
Authorization: YOUR_API_KEY
Accept: */*
200

NodeActions found

{
  "data": {
    "id": "5bd83604-b871-460d-9d62-ba885364b8ab",
    "type": "nodeActions",
    "attributes": {
      "createdAt": "2024-08-20T10:45:10+00:00",
      "updatedAt": "2024-08-20T10:45:10+00:00",
      "actionType": "say",
      "variableName": null,
      "index": 5,
      "subType": "text",
      "attachmentData": null,
      "value": {
        "text": "value"
      }
    },
    "relationships": {
      "node": {
        "links": {
          "related": "/public/v2/nodes/280b920d-d3f0-4f5b-8007-132279a3eaa1"
        }
      }
    }
  },
  "meta": {}
}
  • Endpoints
  • Attributes
  • HTTP methods
  • Example bodies
  • Post
  • Patch
  • OpenAPI
  • GETGet a NodeActions
  • PATCHPatch a NodeAction

Patch a NodeAction

patch
Authorizations
Path parameters
idstringRequired
Body
Responses
200
NodeTransition updated
application/vnd.api+json
patch
PATCH /public/v2/node-actions/{id} HTTP/1.1
Host: {defaulthost}
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 151

{
  "data": {
    "id": "text",
    "type": "text",
    "attributes": {
      "actionType": "text",
      "variableName": "text",
      "index": 1,
      "subType": "text",
      "attachmentData": {},
      "value": {}
    }
  }
}
200

NodeTransition updated

{
  "data": {
    "id": "fb43f2e6-d090-4084-903f-a0d7e680f7cc",
    "type": "nodeActions",
    "attributes": {
      "createdAt": "2024-08-20T10:45:10+00:00",
      "updatedAt": "2024-08-20T10:45:10+00:00",
      "actionType": "say",
      "variableName": null,
      "index": 10,
      "subType": "contact",
      "attachmentData": null,
      "value": {
        "text": "hi this works",
        "id": "e6ecc47d-e22a-47b9-98df-ec3ecd36e2d9",
        "name": "David Blane",
        "time_frame_message": "What day would be most convenient for you?",
        "time_slot_message": "Which time on that day would suit your schedule best?",
        "calendar_type": "user"
      }
    },
    "relationships": {
      "node": {
        "links": {
          "related": "/public/v2/nodes/f2075e50-8519-4ca9-8b84-4fb67c3d7bec"
        }
      }
    }
  },
  "meta": {}
}