{
"openapi": "3.0.0",
"info": {
"title": "Counso API",
"version": "1.0.2",
"description": "API reference for Counso workspaces, Agents, conversations and data sources.",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
}
},
"servers": [
{
"url": "https://app.counso.ai",
"description": "Counso"
}
],
"paths": {
"/api/v1/w/{wId}/triggers/hooks/{webhookSourceId}/{webhookSourceUrlSecret}": {
"post": {
"summary": "Receive external webhook to trigger flows",
"description": "Accepts a JSON event at the source-specific webhook URL, which contains a secret. When signature verification is enabled for that source, the request must carry a valid signature over the raw request body.",
"tags": [
"Triggers"
],
"security": [],
"parameters": [
{
"in": "path",
"name": "wId",
"required": true,
"description": "Workspace ID",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "webhookSourceId",
"required": true,
"description": "Webhook source ID",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "webhookSourceUrlSecret",
"required": true,
"description": "Secret included in the generated webhook URL",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Webhook received",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
}
}
}
}
}
},
"400": {
"description": "Invalid request"
},
"404": {
"description": "Workspace or webhook source not found"
},
"401": {
"description": "Invalid webhook URL secret"
}
},
"x-counso-auth": "webhook"
}
}
},
"components": {
"securitySchemes": {
"WorkspaceApiKey": {
"type": "http",
"scheme": "bearer",
"description": "A workspace API key issued by this Counso deployment. Permissions and resource access are checked for each operation."
},
"UserAccessToken": {
"type": "http",
"scheme": "bearer",
"description": "A user OAuth access token issued for this Counso deployment. A workspace API key is not a substitute for a user token."
},
"BrowserSession": {
"type": "apiKey",
"in": "cookie",
"name": "workos_session",
"description": "The signed-in Counso browser session. External clients should use a user access token."
}
}
}
}