Management API

Attribute 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/attribute-classes

Get all Attribute Classes

Get all the existing attribute classes in your environment.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Request

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

Response

{
  "data": [
    {
        "id": "cln8k0t47000kz87n3lh23zf0",
        "createdAt": "2023-10-02T07:13:19.207Z",
        "updatedAt": "2023-10-02T07:13:19.207Z",
        "name": "email",
        "description": "The email of the person",
        "archived": false,
        "type": "automatic",
        "environmentId": "cln8k0t47000fz87njmmu2bck"
    },
    {
        "id": "cln8k0t55000xz87nrtwbo7sf",
        "createdAt": "2023-10-02T07:13:19.241Z",
        "updatedAt": "2023-10-02T07:13:19.241Z",
        "name": "Name",
        "description": "Full Name of the Person",
        "archived": false,
        "type": "code",
        "environmentId": "cln8k0t47000fz87njmmu2bck"
    },
    ]
}

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

Get Attribute Class by ID

Fetch an Attribute class by its ID.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Request

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

Response

{
 "data": {
    "id": "cln8k0t47000jz87nfwcey6mh",
    "createdAt": "2023-10-02T07:13:19.207Z",
    "updatedAt": "2023-10-02T07:13:19.207Z",
    "name": "userId",
    "description": "The internal ID of the person",
    "archived": false,
    "type": "automatic",
    "environmentId": "cln8k0t47000fz87njmmu2bck"
  }
}

POST/api/v1/management/attribute-classes/

Create Attribute Class

Create an Attribute class.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Body

Request Body

{
    "environmentId": "clmlmwdqq0003196ufewo6ibg",
    "name": "My Attribute from API",
    "type": "code",
    "description": "My description"
}

Request

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

Response

{
"data": {
    "id": "clna0hd7z0009z8zue2z3a7wy",
    "createdAt": "2023-10-03T07:41:51.792Z",
    "updatedAt": "2023-10-03T07:41:51.792Z",
    "name": "My Attribute from API",
    "description": null,
    "archived": false,
    "type": "code",
    "environmentId": "cln8k0t47000fz87njmmu2bck"
  }
}

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

Delete Attribute Class

Delete an Attribute class by its ID.

Mandatory Headers

  • Name
    x-api-Key
    Type
    string
    Description

    Your TypeflowAI API key.

Request

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

Response

{
"data": {
    "id": "clna0hd7z0009z8zue2z3a7wy",
    "createdAt": "2023-10-03T07:41:51.792Z",
    "updatedAt": "2023-10-03T07:41:51.792Z",
    "name": "My Attribute from API",
    "description": null,
    "archived": false,
    "type": "code",
    "environmentId": "cln8k0t47000fz87njmmu2bck"
  }
}

Was this page helpful?