Connections
Connections store the information needed to connect a StackAI flow to an external provider, like Slack or Google Drive. Some connection providers also can be used as an information source, meaning we can read the files and folders in the connection and index them in a knowledge base to be used in a flow.
List all available connections that can be configured.
Returns a list of available connection types with their configuration parameters.
GET /connections/available HTTP/1.1
Host:
Accept: */*
Successful Response
[
{
"icon": "text",
"id": "text",
"name": "text",
"description": "text",
"labels": [
"text"
],
"params": [
{
"label": "text",
"type": "string",
"placeholder": "text",
"default": 1,
"help": "text",
"url": "text",
"required": true,
"name": "text"
}
],
"minimum_plan": "text",
"is_marketing_stunt": false,
"connection_type": "credentials"
}
]
List all available connections for the user in his current organization.
100
0
GET /connections HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"name": "Unnamed connection",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "text",
"share_with_org": false,
"created_at": "2025-07-14T13:09:58.138555+00:00",
"updated_at": "2025-07-14T13:09:58.138644+00:00",
"connection_provider": "text",
"connection_provider_data": {
"can_be_knowledge_base": true
},
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
}
}
]
Create a new connection. The connection will be created in the user's current organization.
Request model for creating/updating a connection.
Unnamed connection
Base data model for all connections.
POST /connections HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"name": "Unnamed connection",
"connection_provider": "text",
"connection_provider_data": {}
}
{
"name": "Unnamed connection",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "text",
"share_with_org": false,
"created_at": "2025-07-14T13:09:58.138555+00:00",
"updated_at": "2025-07-14T13:09:58.138644+00:00",
"connection_provider": "text",
"connection_provider_data": {
"can_be_knowledge_base": true
},
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
}
}
Retrieve a connection by its ID.
false
GET /connections/{connection_id} HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"name": "Unnamed connection",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "text",
"share_with_org": false,
"created_at": "2025-07-14T13:09:58.138555+00:00",
"updated_at": "2025-07-14T13:09:58.138644+00:00",
"connection_provider": "text",
"connection_provider_data": {
"can_be_knowledge_base": true
}
}
Update the connection with the given id.
Request model for creating/updating a connection.
Unnamed connection
Base data model for all connections.
PUT /connections/{connection_id} HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"name": "Unnamed connection",
"connection_provider": "text",
"connection_provider_data": {}
}
{
"name": "Unnamed connection",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "text",
"share_with_org": false,
"created_at": "2025-07-14T13:09:58.138555+00:00",
"updated_at": "2025-07-14T13:09:58.138644+00:00",
"connection_provider": "text",
"connection_provider_data": {
"can_be_knowledge_base": true
},
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
}
}
Delete a connection given its ID.
DELETE /connections/{connection_id} HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Check the health of a connection.
false
GET /connections/{connection_id}/health HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{}
Share the connection with the current organization.
false
PATCH /connections/{connection_id}/share-with-current-org?share=true HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"name": "Unnamed connection",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "text",
"share_with_org": false,
"created_at": "2025-07-14T13:09:58.138555+00:00",
"updated_at": "2025-07-14T13:09:58.138644+00:00",
"connection_provider": "text",
"connection_provider_data": {
"can_be_knowledge_base": true
}
}
Return the OAuth URL for a connection provider.
Request model for creating/updating a connection.
Unnamed connection
Base data model for all connections.
POST /connections/oauth/start HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"name": "Unnamed connection",
"connection_provider": "text",
"connection_provider_data": {}
}
text
Create a new connection from an OAuth callback.
This endpoint is used to create a new connection for providers that use the OAuth protocol. The OAuth flow is initialized by the stack frontend, where the user is redirected to the provider's authorization page. Once the user authorizes the application, they are redirected back to the stack frontend with a code parameter. This code is then sent to this endpoint, which uses it to create a new connection for said provider completing the OAuth flow.
Request model for creating/updating a connection.
Unnamed connection
Base data model for all connections.
POST /connections/oauth/callback?code=text HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 88
{
"name": "Unnamed connection",
"connection_provider": "text",
"connection_provider_data": {}
}
{
"name": "Unnamed connection",
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"org_id": "text",
"share_with_org": false,
"created_at": "2025-07-14T13:09:58.138555+00:00",
"updated_at": "2025-07-14T13:09:58.138644+00:00",
"connection_provider": "text",
"connection_provider_data": {
"can_be_knowledge_base": true
},
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
}
}
Get the resources associated with a connection.
This endpoint returns the information for the selected resource in the connection.
false
GET /connections/{connection_id}/resources HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": {
"knowledge_base_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-07-26T01:52:49.182Z",
"modified_at": "2025-07-26T01:52:49.182Z",
"indexed_at": "2025-07-26T01:52:49.182Z",
"inode_type": "file",
"resource_id": "text",
"inode_path": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"dataloader_metadata": {
"^[^\\t\\n\\r\\f\\v]+$": null
},
"user_metadata": {
"^[^\\t\\n\\r\\f\\v]+$": null
},
"inode_id": "123e4567-e89b-12d3-a456-426614174000",
"content_hash": "text",
"content_mime": "text",
"size": 1,
"status": "resource"
}
}
Get the children of a resource associated with a connection.
This endpoint can be used to navigate the resources in the connection. If no resource_id is provided, it will return the list of resources at the root of the connection. If a resource_id is provided, it will return the children of that resource. If the resource_id corresponds to a file, an empty list will be returned.
Optional identifier for the page that should be returned. If it is not provided, the first page will be returned.
ZXhhbXBsZV9jdXJzb3I=
Number of items to be returned in the page.
50
false
GET /connections/{connection_id}/resources/children HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{}
Search for resources in the connection that match the query.
Search query string
Optional identifier for the page that should be returned. If it is not provided, the first page will be returned.
ZXhhbXBsZV9jdXJzb3I=
Number of items to be returned in the page.
50
false
GET /connections/{connection_id}/resources/search?query=text HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{}
Was this helpful?