Integrations API

REST API endpoints for the Unified Integrations API. Access CRM, storage, communication, and productivity data from multiple providers through a single interface.

Base URL

base-url
https://api.stack0.dev/v1

Connectors

GET/integrations/connectors

List all available connectors.

QUERY PARAMETERS

ParameterTypeDescription
categorystringFilter by category: crm, storage, communication, productivity
Response
{
"data": [
{
"slug": "hubspot",
"name": "HubSpot",
"category": "crm",
"description": "CRM and marketing platform",
"features": ["contacts", "companies", "deals", "notes"],
"authType": "oauth2"
}
]
}
GET/integrations/connectors/{slug}

Get a specific connector by slug.

Connections

GET/integrations/connections

List all connections for your project.

QUERY PARAMETERS

ParameterTypeDescription
connectorIdstringFilter by connector slug
statusstringFilter by status: connected, error, expired
Response
{
"data": [
{
"id": "conn_abc123",
"connectorSlug": "hubspot",
"status": "connected",
"externalAccountId": "12345",
"externalAccountName": "john@example.com",
"endUserId": "user_xyz",
"createdAt": "2024-01-15T10:30:00Z",
"lastUsedAt": "2024-01-20T14:22:00Z"
}
]
}
POST/integrations/connections

Create a new connection (initiates OAuth flow).

REQUEST BODY

FieldTypeRequiredDescription
connectorSlugstringrequiredThe connector to connect (e.g., hubspot, google-drive)
endUserIdstringrequiredYour user's ID in your system
redirectUrlstringoptionalURL to redirect after OAuth completes
Response
{
"connectionId": "conn_abc123",
"authorizationUrl": "https://app.hubspot.com/oauth/authorize?..."
}
GET/integrations/connections/{id}

Get a specific connection.

DELETE/integrations/connections/{id}

Delete/revoke a connection.

POST/integrations/connections/{id}/test

Test if a connection's credentials are still valid.

Response
// Success
{ "success": true }
// Failure
{ "success": false, "error": "Token expired" }

CRM - Contacts

GET/integrations/crm/contacts

List contacts from the connected CRM.

QUERY PARAMETERS

ParameterTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
cursorstringoptionalPagination cursor
limitnumberoptionalMax results (default: 50)
Response
{
"data": [
{
"id": "contact_123",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+1234567890",
"title": "CEO",
"companyId": "company_456",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:22:00Z",
"rawData": { ... }
}
],
"nextCursor": "eyJwYWdlIjoy..."
}
POST/integrations/crm/contacts

Create a new contact.

REQUEST BODY

FieldTypeDescription
firstNamestringContact's first name
lastNamestringContact's last name
emailstringEmail address
phonestringPhone number
GET/integrations/crm/contacts/{id}

Get a specific contact.

PATCH/integrations/crm/contacts/{id}

Update a contact.

DELETE/integrations/crm/contacts/{id}

Delete a contact.

CRM - Companies

GET/integrations/crm/companies

List companies from the connected CRM.

POST/integrations/crm/companies

Create a new company.

REQUEST BODY

FieldTypeRequiredDescription
namestringrequiredCompany name
domainstringoptionalCompany domain
industrystringoptionalIndustry

CRM - Deals

GET/integrations/crm/deals

List deals from the connected CRM.

POST/integrations/crm/deals

Create a new deal.

REQUEST BODY

FieldTypeRequiredDescription
namestringrequiredDeal name
amountnumberoptionalDeal amount
stagestringoptionalDeal stage

Storage - Files

GET/integrations/storage/files

List files from the connected storage.

QUERY PARAMETERS

ParameterTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
folderIdstringoptionalParent folder ID (root if omitted)
POST/integrations/storage/files

Upload a file.

REQUEST BODY

FieldTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
namestringrequiredFile name
mimeTypestringrequiredMIME type
datastringrequiredBase64-encoded file content
folderIdstringoptionalParent folder ID
GET/integrations/storage/files/{id}/download

Download a file.

Response
{
"data": "base64-encoded-content...",
"mimeType": "application/pdf",
"filename": "document.pdf"
}
DELETE/integrations/storage/files/{id}

Delete a file.

Storage - Folders

GET/integrations/storage/folders

List folders.

POST/integrations/storage/folders

Create a folder.

REQUEST BODY

FieldTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
namestringrequiredFolder name
parentIdstringoptionalParent folder ID

Communication

GET/integrations/communication/channels

List channels.

GET/integrations/communication/messages

List messages in a channel.

QUERY PARAMETERS

ParameterTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
channelIdstringrequiredChannel ID
POST/integrations/communication/messages

Send a message.

REQUEST BODY

FieldTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
channelIdstringrequiredChannel to send to
contentstringrequiredMessage content
GET/integrations/communication/users

List users in the workspace.

Productivity

GET/integrations/productivity/documents

List documents/pages.

POST/integrations/productivity/documents

Create a document.

REQUEST BODY

FieldTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
titlestringrequiredDocument title
contentstringoptionalDocument content
GET/integrations/productivity/tables

List tables/databases.

GET/integrations/productivity/tables/{tableId}/rows

List rows in a table.

POST/integrations/productivity/tables/{tableId}/rows

Create a row.

REQUEST BODY

FieldTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
fieldsobjectrequiredField values for the row

Passthrough

POST/integrations/passthrough

Make a raw API call to the underlying provider.

REQUEST BODY

FieldTypeRequiredDescription
connectionIdstringrequiredThe connection ID to use
methodstringrequiredHTTP method (GET, POST, PUT, PATCH, DELETE)
pathstringrequiredAPI path (relative to provider's base URL)
queryobjectoptionalQuery parameters
bodyobjectoptionalRequest body
headersobjectoptionalAdditional headers
Example Request
curl -X POST "https://api.stack0.dev/v1/integrations/passthrough" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"connectionId": "conn_abc123",
"method": "GET",
"path": "/crm/v3/objects/contacts",
"query": { "limit": "10" }
}'