メインコンテンツまでスキップ

Blocks

Retrieve the list of available blocks on your account, along with their capabilities and status.

Endpoint

GET /v1/blocks

Authentication

Requires a valid API key via the X-API-Key header.

Parameters

This endpoint takes no parameters.

Request Example

curl

curl -X GET "https://api.convotic.com/v1/blocks" \
-H "X-API-Key: your-api-key-here"

Response Example

{
"blocks": [
{
"id": "blk_inbox",
"name": "inbox",
"displayName": "Inbox",
"description": "Unified inbox for managing conversations across all platforms.",
"capabilities": ["read_messages", "send_messages", "assign_agents"],
"enabled": true
},
{
"id": "blk_crm",
"name": "crm",
"displayName": "CRM",
"description": "Customer relationship management with contact profiles and tags.",
"capabilities": ["manage_contacts", "tags", "custom_fields"],
"enabled": true
},
{
"id": "blk_broadcast",
"name": "broadcast",
"displayName": "Broadcast",
"description": "Send bulk messages to segmented audiences.",
"capabilities": ["create_campaigns", "audience_segments", "scheduling"],
"enabled": true
},
{
"id": "blk_workflows",
"name": "workflows",
"displayName": "Workflows",
"description": "Automate actions with visual workflow builder.",
"capabilities": ["triggers", "conditions", "actions", "templates"],
"enabled": true
},
{
"id": "blk_analytics",
"name": "analytics",
"displayName": "Analytics",
"description": "Dashboards and reports for conversation and agent performance.",
"capabilities": ["dashboards", "reports", "export"],
"enabled": false
}
]
}

Response Fields

FieldTypeDescription
blocksBlock[]Array of block objects available on your account.

Block Object

FieldTypeDescription
idstringUnique block identifier.
namestringMachine-readable block name.
displayNamestringHuman-readable block name.
descriptionstringShort description of what the block does.
capabilitiesstring[]List of capabilities this block provides.
enabledbooleanWhether the block is currently enabled on your account.

TypeScript Example

interface Block {
id: string;
name: string;
displayName: string;
description: string;
capabilities: string[];
enabled: boolean;
}

interface BlocksResponse {
blocks: Block[];
}

const response = await fetch("https://api.convotic.com/v1/blocks", {
headers: {
"X-API-Key": "your-api-key-here",
},
});

const data: BlocksResponse = await response.json();

const enabledBlocks = data.blocks.filter((b) => b.enabled);
console.log(`Enabled blocks: ${enabledBlocks.map((b) => b.displayName).join(", ")}`);