APIs for tabs and links
Add tab
http
POST /api/workflow/{workspace_id}/workflow/{workflow_id}/tabsRequest Body
ts
type Tab = {
name: string;
content: string;
};Response Body
ts
type TabResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
tab_id: string;
document_id: string;
name: string;
content: string;
parent_tab_id: null;
created_at: Date;
};Get tabs
http
GET /api/workflow/{workflow_id}/workflow/{workflow_id}/tabsRequest Body
No body required
Response
ts
type TabResponse = {
success: boolean;
message: string;
data: Data[];
};
type Data = {
tab_id: string;
document_id: string;
name: string;
content: string;
parent_tab_id: null | string;
created_at: Date;
rank: number;
};Update tab
http
PUT /api/workflow/{workspace_id}/workflow/{workflow_id}/tabs/{tab_id}Request Body
ts
type Tab = {
name?: string;
content?: string;
parent_tab_id?: string;
};Response Body
ts
type TabResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
tab_id: string;
document_id: string;
name: string;
content: string;
parent_tab_id: null;
created_at: Date;
};Delete tab
http
DELETE /api/workflow/{workspace_id}/workflow/{workflow_id}/tabs/{tab_id}No body required
Response Body
ts
type TabResponse = {
success: boolean;
message: string;
};Re-order tabs
http
PUT /api/workflow/{workflow_id}/{tab_id}/re-orderRequest Body
ts
type reorderTabs = {
fromIndex: number;
toIndex: number;
};Response
ts
type TabReorderResponse = {
success: boolean;
message: string;
};Links
Create Link
http
POST /api/workflow/{workspace_id}/workflow/{workflow_id}/tabs/{tab_id}/linksRequest Body
ts
type Link = {
targetType: ["tab", "document"];
targetId: string;
displayName: string;
};Response
ts
type LinkResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
link_id: string;
tab_id: string;
target_type: string;
target_id: string;
display_name: string;
created_at: Date;
};Get Links
http
GET /api/workflow/{workspace_id}/workflow/{workflow_id}/tabs/{tab_id}/linksNo body required
Response
ts
type LinkResponse = {
success: boolean;
message: string;
data: Data[];
};
type Data = {
link_id: string;
tab_id: string;
target_type: string;
target_id: string;
display_name: string;
created_at: Date;
};Get Redirect to Links
http
GET /api/workflow/{workspace_id}/workflow/{workflow_id}/{link_id}/link-redirectNo body required
Response
ts
type RedirectResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
tab_id: string;
document_id: string;
name: string;
content: string;
parent_tab_id: null;
created_at: Date;
};Update Link
http
PUT /api/workflow/{workspace_id}/workflow/{workflow_id}/links/{link_id}Request Body
ts
type UpdateLink = {
targetType: string;
targetId: string;
displayName: string;
};Response
ts
type UpdateResponse = {
success: boolean;
message: string;
data: Data;
};
type Data = {
link_id: string;
tab_id: string;
target_type: string;
target_id: string;
display_name: string;
created_at: Date;
};Delete Link
http
DELETE /api/workflow/{workspace_id}/workflow/{workflow_id}/links/{link_id}No Body Required
Response
ts
type UpdateResponse = {
success: boolean;
message: string;
};