Management API

Action Classes API

This set of API can be used to

You will need an API Key to interact with these APIs.

GET/api/v1/management/action-classes

Get all Action Classes

Get all the existing action classes in your environment.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Request

GET
/api/v1/management/action-classes
curl --location \
'https://dashboard.typeflowai.com/api/v1/management/action-classes' \
--header \
'x-api-key: <your-api-key>'

Response

{
  "data": [
    {
        "id": "cln8k0t47000gz87nw4ibwv35",
        "createdAt": "2023-10-02T07:13:19.207Z",
        "updatedAt": "2023-10-02T07:13:19.207Z",
        "name": "New Session",
        "description": "Gets fired when a new session is created",
        "type": "automatic",
        "noCodeConfig": null,
        "environmentId": "cln8k0t47000fz87njmmu2bck"
    },
    {
        "id": "cln8k0t55000uz87noerwdooj",
        "createdAt": "2023-10-02T07:13:19.241Z",
        "updatedAt": "2023-10-02T07:13:19.241Z",
        "name": "Invited Team Member",
        "description": "Person invited a team member",
        "type": "noCode",
        "noCodeConfig": {
            "type": "innerHtml",
            "innerHtml": {
                "value": "Add Team Member"
            }
        },
        "environmentId": "cln8k0t47000fz87njmmu2bck"
    },
    ]
}

GET/api/v1/management/action-classes/<action-class-id>

Get Action Class by ID

Fetch an action class by its ID.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Request

GET
/api/v1/management/action-classes/<action-class-id>
curl --location \
'https://dashboard.typeflowai.com/api/v1/management/action-classes/<action-class-id>' \
--header \
'x-api-key: <your-api-key>'

Response

{
  "data": {
    "id": "cln8k0t55000uz87noerwdooj",
    "createdAt": "2023-10-02T07:13:19.241Z",
    "updatedAt": "2023-10-02T07:13:19.241Z",
    "name": "Invited Team Member",
    "description": "Person invited a team member",
    "type": "noCode",
    "noCodeConfig": {
        "type": "innerHtml",
        "innerHtml": {
            "value": "Add Team Member"
        }
    },
    "environmentId": "cln8k0t47000fz87njmmu2bck"
    }
}

POST/api/v1/management/action-classes/

Create Action Class

Create an action class.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Body

Request Body

{
    "environmentId": "cln8k0t47000fz87njmmu2bck",
    "name": "My Action from API",
    "type": "code"
}

Request

POST
/api/v1/management/action-classes/
curl -X POST https://dashboard.typeflowai.com/api/v1/management/action-classes/ \
 --header 'Content-Type: application/json' \
 --header 'x-api-key: <your-api-key>' \
 -d '{"environmentId": "cln8k0t47000fz87njmmu2bck", "name": "My Action from API", "type": "code"}'

Response

{
"data": {
    "id": "cln9w1cno0008z8zu79nk5w0c",
    "createdAt": "2023-10-03T05:37:26.100Z",
    "updatedAt": "2023-10-03T05:37:26.100Z",
    "name": "My Action from API",
    "description": null,
    "type": "code",
    "noCodeConfig": null,
    "environmentId": "cln8k0t47000fz87njmmu2bck"
    }
}

DELETE/api/v1/management/action-classes/<action-class-id>

Delete Action Class

Delete an action class by its ID.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Request

DELETE
/api/v1/management/action-classes/<action-class-id>
curl -X DELETE https://dashboard.typeflowai.com/api/v1/management/action-classes/<action-class-id> \
 --header 'x-api-key: <your-api-key>'

Response

{
"data": {
    "id": "cln9w1cno0008z8zu79nk5w0c",
    "createdAt": "2023-10-03T05:37:26.100Z",
    "updatedAt": "2023-10-03T05:37:26.100Z",
    "name": "My Action from API",
    "description": null,
    "type": "code",
    "noCodeConfig": null,
    "environmentId": "cln8k0t47000fz87njmmu2bck"
    }
}

Was this page helpful?