Skip to main content
POST
/
api
/
v1
/
management
/
action-classes
Create Action Class
curl --request POST \
  --url https://{baseurl}/api/v1/management/action-classes \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "description": "From API Docs (optional)",
  "environmentId": "{{environmentId}}",
  "key": "my-action",
  "name": "My Action from Postman",
  "type": "code"
}'
{
  "data": {
    "createdAt": "2024-04-23T08:58:47.507Z",
    "description": null,
    "environmentId": "clurwouax000azffxt7n5unn3",
    "id": "clvc5m82c000z494jkvnw1gh0",
    "name": "My Action from Postman",
    "noCodeConfig": null,
    "type": "code",
    "updatedAt": "2024-04-23T08:58:47.507Z"
  }
}

Headers

x-api-key
string
required

Body

application/json
environmentId
string
required

The environment ID where the action class will be created

name
string
required

Name of the action class

Minimum length: 1
type
enum<string>
required

Type of action class

Available options:
code,
noCode
description
string

Optional description of the action class

key
string

Required when type is 'code'. A unique identifier for the action. Not needed for 'noCode' type.

Minimum length: 1
noCodeConfig
object | null

Configuration object required when type is 'noCode'. Defines the conditions for triggering the action. Not needed for 'code' type.

Response

OK

The response is of type object.