Client API

Displays API

The Public Client API is designed for the JavaScript SDK and does not require authentication. It's primarily used for creating persons, sessions, and responses within the TypeflowAI platform. This API is ideal for client-side interactions, as it doesn't expose sensitive information.

This set of API can be used to


POST/api/v1/client/<environment-id>/diplays

Create Display

Create Display of workflow for a user

Mandatory Request Body JSON Keys

  • Name
    workflowId
    Type
    string
    Description

    Workflow ID to mark as viewed for a person

Optional Request Body JSON Keys

  • Name
    userId
    Type
    string
    Description

    Already existing user's ID to mark as viewed for a workflow

  • Name
    responseId
    Type
    string
    Description

    Already existing response's ID to link with this new Display

Request

POST
/api/v1/client/<environment-id>/displays
curl -X POST \
'https://dashboard.typeflowai.com/api/v1/client/displays' \
-H 'Content-Type: application/json' \
-d '{
    "workflowId":"<workflow-id>",
    "userId":"<user-id>"
  }'

Response

{
  "data": {
    "id": "clphzz6oo00083zdmc7e0nwzi"
  }
}

PUT/api/v1/client/<environment-id>/diplays/<display-id>

Update Display

Update a display by it's ID

Optional Request Body JSON Keys

  • Name
    userId
    Type
    string
    Description

    Already existing user's ID to mark as viewed for a workflow

  • Name
    responseId
    Type
    string
    Description

    Already existing response's ID to link with this new Display

Request

PUT
/api/v1/client/<environment-id>/displays/<display-id>
curl -X POST \
'https://dashboard.typeflowai.com/api/v1/client/<environment-id>/displays/<display-id>' \
-H 'Content-Type: application/json' \
-d '{
    "userId":"<user-id>"
  }'

Response

{
  "data": {}
}

Was this page helpful?