Skip to main content
PUT
/
actions
/
{name}
Update an action
curl --request PUT \
  --url https://api.flowent.chat/api/v1/gateway/actions/{name} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "Updated: Send an email to a specified recipient",
  "webhook_url": "https://your-server.com/v2/actions/send_email",
  "json_schema": {
    "type": "object",
    "properties": {
      "recipient": {
        "type": "string",
        "description": "Email address of the recipient"
      },
      "subject": {
        "type": "string",
        "description": "Email subject line"
      },
      "body": {
        "type": "string",
        "description": "Email body content"
      },
      "priority": {
        "type": "string",
        "enum": [
          "low",
          "normal",
          "high"
        ],
        "description": "Email priority level"
      }
    },
    "required": [
      "recipient",
      "subject",
      "body"
    ]
  }
}
'
{
  "action": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "tenant_id": "123e4567-e89b-12d3-a456-426614174001",
    "name": "send_email",
    "description": "Send an email to a specified recipient",
    "json_schema": {
      "type": "object",
      "properties": {
        "recipient": {
          "type": "string",
          "description": "Email address of the recipient"
        },
        "subject": {
          "type": "string",
          "description": "Email subject line"
        },
        "body": {
          "type": "string",
          "description": "Email body content"
        }
      },
      "required": [
        "recipient",
        "subject",
        "body"
      ]
    },
    "webhook_url": "https://your-server.com/actions/send_email",
    "created_at": "2023-01-01T12:00:00Z",
    "updated_at": "2023-01-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

JWT token obtained from token exchange

Path Parameters

name
string
required

Action name

Example:

"send_email"

Body

application/json
description
string

Human-readable description of the action

Required string length: 1 - 500
Example:

"Updated: Send an email to a specified recipient"

webhook_url
string<uri>

URL where the action will be executed

Example:

"https://your-server.com/v2/actions/send_email"

json_schema
object

JSON Schema defining the action's parameters

Example:
{
"type": "object",
"properties": {
"recipient": {
"type": "string",
"description": "Email address of the recipient"
},
"subject": {
"type": "string",
"description": "Email subject line"
},
"body": {
"type": "string",
"description": "Email body content"
},
"priority": {
"type": "string",
"enum": ["low", "normal", "high"],
"description": "Email priority level"
}
},
"required": ["recipient", "subject", "body"]
}

Response

Action updated successfully

action
object