curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/connections/{kind} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "cal_live_3f9a1c…"
}
'{
"kind": "calcom",
"name": "Cal.com",
"signIn": "key",
"available": true,
"connected": true,
"account": {
"email": "frontdesk@sunrisedental.in",
"name": "Sunrise Dental"
},
"timezone": "Asia/Kolkata",
"lastError": null,
"tools": [
{
"id": "calcom_list_event_types",
"title": "See what can be booked",
"summary": "See what can be booked.",
"writes": false,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_check_availability",
"title": "Check when you are free",
"summary": "Check when you are free.",
"writes": false,
"enabled": false,
"phrases": {
"before": "Let me look at the calendar.",
"after": null
}
},
{
"id": "calcom_hold_slot",
"title": "Hold a slot while you talk",
"summary": "Hold a slot while you talk.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_book_meeting",
"title": "Book the meeting",
"summary": "Book the meeting.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_find_booking",
"title": "Find their existing booking",
"summary": "Find their existing booking.",
"writes": false,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_reschedule_booking",
"title": "Move a booking",
"summary": "Move a booking.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_cancel_booking",
"title": "Cancel a booking",
"summary": "Cancel a booking.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
}
],
"toolsInUse": 0,
"maxTools": 500,
"message": "Connected."
}Connect Account
Connect (or re-key) an account. Every key, token and secret is sealed and never returned. Connecting grants nothing: tools start off and are switched with PATCH tools. googlesheets, zoho, zoho_bigin, hubspot and calendly sign in on the provider’s own consent screen — connect them once in the console (this answers 409), then configure them here. A helpdesk connect opens one test ticket or case and answers with inbound once; a records connect that makes the first link answers with link.passcode once. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/agents/{id}/connections/{kind} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "cal_live_3f9a1c…"
}
'{
"kind": "calcom",
"name": "Cal.com",
"signIn": "key",
"available": true,
"connected": true,
"account": {
"email": "frontdesk@sunrisedental.in",
"name": "Sunrise Dental"
},
"timezone": "Asia/Kolkata",
"lastError": null,
"tools": [
{
"id": "calcom_list_event_types",
"title": "See what can be booked",
"summary": "See what can be booked.",
"writes": false,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_check_availability",
"title": "Check when you are free",
"summary": "Check when you are free.",
"writes": false,
"enabled": false,
"phrases": {
"before": "Let me look at the calendar.",
"after": null
}
},
{
"id": "calcom_hold_slot",
"title": "Hold a slot while you talk",
"summary": "Hold a slot while you talk.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_book_meeting",
"title": "Book the meeting",
"summary": "Book the meeting.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_find_booking",
"title": "Find their existing booking",
"summary": "Find their existing booking.",
"writes": false,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_reschedule_booking",
"title": "Move a booking",
"summary": "Move a booking.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
},
{
"id": "calcom_cancel_booking",
"title": "Cancel a booking",
"summary": "Cancel a booking.",
"writes": true,
"enabled": false,
"phrases": {
"before": null,
"after": null
}
}
],
"toolsInUse": 0,
"maxTools": 500,
"message": "Connected."
}Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
The connection: calcom or calendly (calendars), grist or googlesheets (spreadsheets), zoho, zoho_bigin or hubspot (CRMs), records (kept here), zendesk or salesforce (helpdesks).
calcom, grist, googlesheets, zoho, zoho_bigin, hubspot, calendly, records, zendesk, salesforce Body
- calcom
- grist
- records
- zendesk
- salesforce
The body depends on {kind}. googlesheets, zoho, zoho_bigin, hubspot and calendly take no body here: they sign in through a browser in the console, and this answers 409.
Response
Connected. inbound (helpdesks) and link.passcode (a new records link) appear only here.
One account an agent can work in. Fields beyond the first few depend on the kind: a calendar has timezone; spreadsheets and CRMs have target, match and variableColumns; records has fields, recordCount and link; a helpdesk has only account and enabled. Credentials never appear.