Connections
List all available connections that can be configured.
Returns a list of available connection types with their configuration parameters.
Successful Response
GET /connections/available HTTP/1.1
Host: api.stack-ai.com
Accept: */*
Successful Response
[
{
"connection_type_id": "text",
"provider_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",
"color": "#A3A3A3",
"is_marketing_stunt": false,
"connection_type": "credentials"
}
]List all available connections for the user in his current organization.
10000Successful Response
Validation Error
GET /connections HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]Create a new connection. The connection will be created in the user's current organization.
Request model for creating/updating a connection.
Unnamed connectionBase data model for all connections.
Successful Response
Validation Error
POST /connections HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"name": "Unnamed connection",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {}
}{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}falseSuccessful Response
Validation Error
GET /connections/{connection_id} HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Update the connection with the given id.
Request model for creating/updating a connection.
Unnamed connectionBase data model for all connections.
Successful Response
Validation Error
PUT /connections/{connection_id} HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"name": "Unnamed connection",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {}
}{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Delete a connection given its ID.
Successful Response
Validation Error
DELETE /connections/{connection_id} HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Patch a connection to update specific fields like name.
Request model for partially updating a connection (e.g., renaming).
New name for the connection
Successful Response
Validation Error
PATCH /connections/{connection_id} HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Check the health of a connection.
Successful Response
Validation Error
GET /connections/{connection_id}/health HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}Return the OAuth URL for a connection provider.
Request model for creating/updating a connection.
Unnamed connectionBase data model for all connections.
Successful Response
Validation Error
POST /connections/oauth/start HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"name": "Unnamed connection",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {}
}textCreate 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 connectionBase data model for all connections.
Successful Response
Validation Error
POST /connections/oauth/callback?code=text HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"name": "Unnamed connection",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {}
}{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Update an existing connection from an OAuth callback.
Mirrors the creation flow but updates the specified connection with new OAuth credentials. Path chosen for consistency with POST /oauth/callback and REST semantics.
Request model for creating/updating a connection.
Unnamed connectionBase data model for all connections.
Successful Response
Validation Error
PUT /connections/oauth/callback/{connection_id}?code=text HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"name": "Unnamed connection",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {}
}{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Get the resources associated with a connection.
This endpoint returns the information for the selected resource in the connection.
falseSuccessful Response
Validation Error
GET /connections/{connection_id}/resources HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": {
"knowledge_base_id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-11-28T01:31:40.235Z",
"modified_at": "2025-11-28T01:31:40.235Z",
"indexed_at": "2025-11-28T01:31:40.235Z",
"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",
"supabase_signed_url": "text"
}
}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.
50falseSuccessful Response
Validation Error
GET /connections/{connection_id}/resources/children HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}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.
50falseSuccessful Response
Validation Error
GET /connections/{connection_id}/resources/search?query=text HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}List all available connections for the user in his current organization.
Supports dynamic field__operator filters.
100created_atPossible values: descPossible values: Successful Response
Validation Error
GET /api/v1/connections HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"status_code": 200,
"response_code": "text",
"meta": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"data": [
{
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"created_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"created_at": "2025-11-10T10:49:18.436394+00:00",
"updated_by": {
"avatar_url": "text",
"full_name": "text",
"has_completed_onboarding": true,
"last_signed_in": "text",
"updated_at": "text",
"id": "text",
"email": "text"
},
"updated_at": "2025-11-10T10:49:18.436438+00:00",
"name": "Unnamed connection",
"org_id": "text",
"provider_id": "text",
"connection_type_id": "text",
"connection_provider_data": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"offset": 0,
"limit": 50,
"total": 0
}Get the RBA info for a connection.
Successful Response
Validation Error
GET /api/v1/connections/{connection_id}/rbac HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"org_level_role": "text",
"user_roles": {
"ANY_ADDITIONAL_PROPERTY": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"group_roles": {
"ANY_ADDITIONAL_PROPERTY": [
"123e4567-e89b-12d3-a456-426614174000"
]
},
"current_user_effective_role": "text"
}Update the RBAC info for a connection.
RBAC subject types for access control.
Successful Response
Validation Error
PUT /api/v1/connections/{connection_id}/rbac HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 89
{
"subject_type": "user",
"role": "text",
"subject_id": "123e4567-e89b-12d3-a456-426614174000"
}No content
Delete RBA info for the connection.
RBAC subject types for access control.
Successful Response
Validation Error
DELETE /api/v1/connections/{connection_id}/rbac?subject_type=user&subject_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Update the organization-level role for a connection.
Request model for updating connection organization-level role.
Organization-level role for the connection. Set to null to remove org-level access.
Successful Response
Validation Error
PATCH /api/v1/connections/{connection_id}/organization-role HTTP/1.1
Host: api.stack-ai.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"role": "text"
}No content
Last updated
Was this helpful?

