@devries-cameron20 / composio-1 / commits / b14810b3a
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

docs: dual API version reference (v3.1 + v3.0) (#3179)

Sushmitha Mallesh committed Apr 11, 2026 at 15:26 UTC b14810b3a4f440e8df7c0c0b262ac88388b2da41
71 files changed +28433 -8057
.github/workflows/docs-update-data.yml
+7 -5
@@ -60,14 +60,14 @@ jobs:
60 id: changes
61 run: |
62 cd ..
63 - git add -N docs/public/data/ docs/public/openapi.json docs/content/reference/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null || true
64 - if git diff --quiet docs/public/data/ docs/public/openapi.json docs/content/reference/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null; then
63 + git add -N docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null || true
64 + if git diff --quiet docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null; then
65 echo "has_changes=false" >> $GITHUB_OUTPUT
66 echo "No changes detected"
67 else
68 echo "has_changes=true" >> $GITHUB_OUTPUT
69 echo "Changes detected:"
70 - git diff --stat docs/public/data/ docs/public/openapi.json docs/content/reference/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null || true
70 + git diff --stat docs/public/data/ docs/public/openapi.json docs/public/openapi-v3.json docs/content/reference/api-reference/ docs/content/reference/v3/api-reference/ docs/content/reference/meta-tools/ 2>/dev/null || true
71 fi
72
73 - name: Create Pull Request
@@ -83,15 +83,17 @@ jobs:
83
84 ## What changed
85 - **Toolkit catalog** (`docs/public/data/toolkits.json`, `toolkits-list.json`) — refreshed list of available toolkits, auth schemes, and tools from the backend API
86 - - **OpenAPI spec** (`docs/public/openapi.json`) — latest API specification fetched from production
87 - - **API reference pages** (`docs/content/reference/api-reference/*.mdx`) — regenerated index pages from the updated OpenAPI spec
86 + - **OpenAPI specs** (`docs/public/openapi.json`, `docs/public/openapi-v3.json`) — latest v3.1 and v3.0 API specifications fetched from production
87 + - **API reference pages** (`docs/content/reference/api-reference/`, `docs/content/reference/v3/api-reference/`) — regenerated index pages for both API versions
88 - **Meta tools reference** (`docs/public/data/meta-tools.json`, `docs/content/reference/meta-tools/*.mdx`) — updated meta tool schemas and reference docs
89 branch: docs/auto-update-data
90 base: next
91 add-paths: |
92 docs/public/data/
93 docs/public/openapi.json
94 + docs/public/openapi-v3.json
95 docs/content/reference/api-reference/
96 + docs/content/reference/v3/api-reference/
97 docs/content/reference/meta-tools/
98
99 - name: Request review from trigger actor
docs/.claude/context/api-reference.md
+59 -5
@@ -7,7 +7,8 @@ The API reference is auto-generated from `public/openapi.json` using [fumadocs-o
7 ## Architecture
8
9 ```
10 -public/openapi.json ← Auto-fetched from backend (don't edit manually)
10 +public/openapi.json ← v3.1 spec (auto-fetched, don't edit manually)
11 +public/openapi-v3.json ← v3.0 spec (auto-fetched, don't edit manually)
12 components/api-page.tsx ← createAPIPage config, schema render hook
13 components/api-page.client.tsx ← Client-side playground config
14 components/schema-generator.tsx ← Server-side: walks OpenAPI schema → SchemaUIGeneratedData
@@ -49,12 +50,65 @@ All in `app/global.css` under the "OpenAPI Reference" section. These target fuma
50 | `div.border.rounded-lg:not(:has(*))` | Hide empty schema wrapper divs (when Error schema returns null) | Wrapper div rendered outside `schemaUI.render` hook |
51 | `p.text-fd-muted-foreground.not-prose:has(> code.text-xs)` | Hide `application/json` content type labels | No hook to control content type display |
52
53 +## API Versioning (v3.0 / v3.1)
54 +
55 +Two API versions are served side-by-side with a Stripe-style version selector in the top nav bar.
56 +
57 +### URL structure
58 +- **v3.1 (default):** `/reference/...` — e.g. `/reference/api-reference/tools/getTools`
59 +- **v3.0:** `/reference/v3/...` — e.g. `/reference/v3/api-reference/tools/getTools`
60 +- All existing v3.1 URLs are unchanged — no breaking changes.
61 +
62 +### How it works
63 +
64 +```
65 +lib/openapi.ts ← Creates two OpenAPI instances (v3.1 + v3.0)
66 +lib/source.ts ← Combined source: v3.1 at api-reference/, v3.0 at v3/api-reference/
67 +lib/api-version.ts ← Shared detectApiVersion() utility (single source of truth)
68 +lib/use-api-version.ts ← Client hook wrapping detectApiVersion for React components
69 +lib/filter-api-version.ts ← Tree filter: hides V3 folder for v3.1, lifts V3 children for v3.0
70 +app/(home)/reference/(v31)/layout.tsx ← v3.1 layout: hardcodes version, renders DocsLayout with filtered tree
71 +app/(home)/reference/v3/layout.tsx ← v3.0 layout: hardcodes version, renders DocsLayout with filtered tree
72 +components/version-selector.tsx ← Dropdown in top nav, navigates between /reference/ ↔ /reference/v3/
73 +components/api-base-url.tsx ← Dynamic base URL: v3.1 or v3 based on current path
74 +components/api-endpoints-table.tsx ← Endpoint tables in index pages, shows versioned paths
75 +components/version-badge.tsx ← Badge on endpoint pages showing API version
76 +```
77 +
78 +### Content structure
79 +
80 +v3.0 has its own complete page tree under `content/reference/v3/`:
81 +- `v3/index.mdx` — Overview (with v3 links and base URL)
82 +- `v3/authentication.mdx` — Auth docs (with v3 curl examples)
83 +- `v3/rate-limits.mdx`, `v3/errors.mdx` — Duplicated non-API pages
84 +- `v3/api-reference/` — Auto-generated index pages + OpenAPI endpoint pages
85 +- `v3/meta.json` — Sidebar ordering
86 +
87 +SDK Reference and Meta Tools are version-independent and shared across both trees.
88 +
89 +### Version selector behavior
90 +- On an API page: swaps `/reference/` ↔ `/reference/v3/` (stays on same endpoint/category)
91 +- On overview (`/reference`): navigates to `/reference/v3` (v3 has its own overview)
92 +- Full page reload on every version switch (server re-renders layout with filtered tree)
93 +
94 +### Auto-generation pipeline (`docs-update-data.yml`)
95 +1. `fetch-openapi.mjs` — fetches both v3.1 and v3.0 specs from backend
96 +2. `generate-api-index.ts` — generates index pages for both `api-reference/` and `v3/api-reference/`
97 +3. CI tracks: `openapi.json`, `openapi-v3.json`, `api-reference/`, `v3/api-reference/`
98 +
99 +### Adding/modifying v3 content
100 +- API endpoint pages are auto-generated from the OpenAPI spec — no manual work needed
101 +- Index pages are auto-generated by `bun run generate:api-index`
102 +- Non-API pages (`v3/index.mdx`, `v3/authentication.mdx`, etc.) are manual copies — update both versions when content changes
103 +- `v3/meta.json` and `v3/api-reference/meta.json` control sidebar ordering
104 +
105 ## OpenAPI Spec Notes
106
54 -- Spec is OAS 3.0.0 with 60 endpoints
55 -- All error responses (400, 401, 403, 404, 500, etc.) use identical `#/components/schemas/Error` schema
56 -- Error descriptions vary per endpoint and are useful (e.g., 410 means different things on different endpoints)
107 +- v3.1 spec is OAS 3.0.0 format
108 +- v3.0 spec is also OAS 3.0.0 format with the same tag structure
109 +- All error responses use identical `#/components/schemas/Error` schema
110 +- Error descriptions vary per endpoint and are useful
111 - `info.description` is empty (backend issue)
58 -- 0/60 endpoints have response examples (backend issue)
112 +- No response examples (backend issue)
113 - `nullable: true` (OAS 3.0) is converted by fumadocs-openapi's dereferencer
114 - Some properties named `deprecated` are required fields (spec issue, not the OpenAPI deprecated flag)
docs/.claude/context/pipelines.md
+1 -1
@@ -6,7 +6,7 @@ Reference for all GitHub Actions workflows related to docs.
6
7 | Workflow | File | Trigger | What it does |
8 |---|---|---|---|
9 -| **Update Data** | `docs-update-data.yml` | Cron (every 5h), `repository_dispatch` (Apollo deploy), manual | Fetches toolkits data, OpenAPI spec, API index pages, and meta tools reference. Creates PR via `peter-evans/create-pull-request` targeting `next`. |
9 +| **Update Data** | `docs-update-data.yml` | Cron (every 5h), `repository_dispatch` (Apollo deploy), manual | Fetches toolkits data, both OpenAPI specs (v3.1 + v3.0), generates API index pages for both versions, and meta tools reference. Creates PR via `peter-evans/create-pull-request` targeting `next`. Tracks: `openapi.json`, `openapi-v3.json`, `api-reference/`, `v3/api-reference/`. |
10 | **Sync Connect Clients** | `docs.sync-connect-clients.yml` | Cron (daily 8 AM UTC), manual | Claude Code action syncs client definitions from `ComposioHQ/composio_dashboard` to `composio-connect.mdx`. Creates PR targeting `next`. Agent instructions: `docs/.claude/agents/connect-clients-sync.md`. |
11 | **Changelog → Docs** | `docs.changelog-to-docs.yml` | Push to `next` (changelog files) | Codex action reads new changelog entries and updates docs pages. Creates PR targeting `next`. Agent instructions: `docs/.claude/agents/changelog-docs-updater.md`. |
12 | **Check Links** | `docs-check-links.yml` | PR changes to `docs/` | Runs `bun run scripts/validate-links.ts` to catch broken internal links. |
docs/CLAUDE.md
+13
@@ -81,6 +81,19 @@ Detailed documentation for Claude is organized in `.claude/`:
81
82 `content/docs/glossary.mdx` defines key Composio terms (auth config, session, toolkit, etc.) using `<Glossary>` and `<GlossaryTerm name="...">` components (`components/glossary.tsx`). The component renders a filterable two-column table. The markdown converter in `lib/source.ts` converts `<GlossaryTerm>` tags to `### Term` headings for LLM-friendly output. When adding new Composio concepts, add a `<GlossaryTerm>` entry and update the `keywords` frontmatter array.
83
84 +## API Versioning
85 +
86 +The API reference supports v3.1 (latest, default) and v3.0 side-by-side:
87 +- **v3.1:** `/reference/api-reference/...` (default, all existing URLs unchanged)
88 +- **v3.0:** `/reference/v3/api-reference/...`
89 +
90 +Version selector in the top nav switches between them. See [api-reference.md](.claude/context/api-reference.md) for full architecture.
91 +
92 +Key maintenance notes:
93 +- Non-API pages under `content/reference/v3/` (overview, authentication, errors, rate-limits) are manual copies — update both when content changes
94 +- API index pages and OpenAPI specs are auto-generated by CI (`docs-update-data.yml`)
95 +- SDK Reference and Meta Tools are shared across both versions (not duplicated)
96 +
97 ## Code Review Guidelines
98
99 **`docs/examples/` is tutorial code.** Review for correctness and clarity, not production-readiness. Skip accessibility (aria attributes, focus management), error boundaries, i18n, comprehensive error handling, and similar concerns that add noise to a teaching example. The goal is to teach Composio integration with minimal code.
docs/app/(home)/reference/(v31)/[[...slug]]/page.tsx renamed
+17 -9
@@ -1,4 +1,3 @@
1 -import type { ComponentType } from 'react';
1 import { getReferenceSource, getOgImageUrl } from '@/lib/source';
2 import { APIPage } from '@/components/api-page';
3 import {
@@ -12,6 +11,7 @@ import type { Metadata } from 'next';
11 import { createRelativeLink } from 'fumadocs-ui/mdx';
12 import type { ApiPageProps } from 'fumadocs-openapi/ui';
13 import { PageActions } from '@/components/page-actions';
14 +import { VersionBadge, extractVersionFromPath } from '@/components/version-badge';
15
16 interface OpenAPIPageData {
17 title: string;
@@ -29,21 +29,30 @@ export default async function Page({
29 const page = referenceSource.getPage(slug);
30 if (!page) notFound();
31
32 - // Check if this is an OpenAPI page (has getAPIPageProps method)
32 if ('getAPIPageProps' in page.data) {
33 const pageData = page.data as OpenAPIPageData;
34 + const apiProps = pageData.getAPIPageProps();
35 + const detectedVersion = apiProps.operations?.[0]?.path
36 + ? extractVersionFromPath(apiProps.operations[0].path)
37 + : null;
38 return (
39 <DocsPage full footer={{ enabled: false }} tableOfContentPopover={{ enabled: false }}>
37 - <h1 className="text-2xl font-semibold mb-4">{pageData.title}</h1>
40 + <h1 className="text-2xl font-semibold mb-4">
41 + {pageData.title}
42 + {detectedVersion && (
43 + <span className="ml-2 align-middle">
44 + <VersionBadge version={detectedVersion} />
45 + </span>
46 + )}
47 + </h1>
48 <PageActions path={page.url} />
49 <DocsBody>
40 - <APIPage {...pageData.getAPIPageProps()} />
50 + <APIPage {...apiProps} />
51 </DocsBody>
52 </DocsPage>
53 );
54 }
55
46 - // Regular MDX page - cast to any to avoid complex type issues
56 // eslint-disable-next-line @typescript-eslint/no-explicit-any
57 const mdxData = page.data as any;
58 const MDX = mdxData.body;
@@ -66,7 +75,9 @@ export default async function Page({
75
76 export async function generateStaticParams() {
77 const referenceSource = await getReferenceSource();
69 - return referenceSource.generateParams();
78 + const allParams: { slug: string[] }[] = referenceSource.generateParams();
79 + // Exclude v3 pages — those are handled by the /reference/v3/ route
80 + return allParams.filter((p) => p.slug[0] !== 'v3');
81 }
82
83 export async function generateMetadata({
@@ -76,7 +87,6 @@ export async function generateMetadata({
87 }): Promise<Metadata> {
88 const { slug } = await params;
89
79 - // Index page - show custom metadata
90 if (!slug || slug.length === 0) {
91 const ogImage = getOgImageUrl('reference', [], 'API Reference', 'REST API and SDK reference for Composio');
92 return {
@@ -92,8 +102,6 @@ export async function generateMetadata({
102 const page = referenceSource.getPage(slug);
103 if (!page) notFound();
104
95 - // Use description if available, otherwise fall back to title for SEO
96 - // This handles OpenAPI pages where description may be null in the spec
105 const description = page.data.description || page.data.title;
106 const ogImage = getOgImageUrl('reference', page.slugs, page.data.title, description);
107
docs/app/(home)/reference/(v31)/layout.tsx new
+21
@@ -0,0 +1,21 @@
1 +import { getReferenceSource } from '@/lib/source';
2 +import { DocsLayout } from 'fumadocs-ui/layouts/docs';
3 +import type { ReactNode } from 'react';
4 +import { prepareTree } from '@/lib/filter-api-version';
5 +
6 +export default async function Layout({ children }: { children: ReactNode }) {
7 + const source = await getReferenceSource();
8 + const tree = prepareTree(source.pageTree, '3.1');
9 +
10 + return (
11 + <DocsLayout
12 + tree={tree}
13 + nav={{ enabled: true, title: null }}
14 + searchToggle={{ enabled: false }}
15 + sidebar={{ collapsible: false, footer: null, tabs: false }}
16 + themeSwitch={{ enabled: false }}
17 + >
18 + {children}
19 + </DocsLayout>
20 + );
21 +}
docs/app/(home)/reference/layout.tsx
+2 -15
@@ -1,18 +1,5 @@
1 -import { getReferenceSource } from '@/lib/source';
2 -import { DocsLayout } from 'fumadocs-ui/layouts/docs';
1 import type { ReactNode } from 'react';
2
5 -export default async function Layout({ children }: { children: ReactNode }) {
6 - const source = await getReferenceSource();
7 - return (
8 - <DocsLayout
9 - tree={source.pageTree}
10 - nav={{ enabled: true, title: null }}
11 - searchToggle={{ enabled: false }}
12 - sidebar={{ collapsible: false, footer: null, tabs: false }}
13 - themeSwitch={{ enabled: false }}
14 - >
15 - {children}
16 - </DocsLayout>
17 - );
3 +export default function Layout({ children }: { children: ReactNode }) {
4 + return children;
5 }
docs/app/(home)/reference/v3/[[...slug]]/page.tsx new
+126
@@ -0,0 +1,126 @@
1 +import { getReferenceSource, getOgImageUrl } from '@/lib/source';
2 +import { APIPage } from '@/components/api-page';
3 +import {
4 + DocsBody,
5 + DocsPage,
6 + DocsTitle,
7 +} from 'fumadocs-ui/layouts/docs/page';
8 +import { notFound } from 'next/navigation';
9 +import { getMDXComponents } from '@/mdx-components';
10 +import type { Metadata } from 'next';
11 +import { createRelativeLink } from 'fumadocs-ui/mdx';
12 +import type { ApiPageProps } from 'fumadocs-openapi/ui';
13 +import { PageActions } from '@/components/page-actions';
14 +import { VersionBadge, extractVersionFromPath } from '@/components/version-badge';
15 +
16 +interface OpenAPIPageData {
17 + title: string;
18 + description?: string;
19 + getAPIPageProps: () => ApiPageProps;
20 +}
21 +
22 +/**
23 + * Prepend 'v3' to the slug array since Next.js strips the /v3/ route segment
24 + * but the source has pages registered under v3/...
25 + */
26 +function toSourceSlug(slug?: string[]): string[] {
27 + return ['v3', ...(slug || [])];
28 +}
29 +
30 +export default async function Page({
31 + params,
32 +}: {
33 + params: Promise<{ slug?: string[] }>;
34 +}) {
35 + const { slug } = await params;
36 + const referenceSource = await getReferenceSource();
37 + const page = referenceSource.getPage(toSourceSlug(slug));
38 + if (!page) notFound();
39 +
40 + if ('getAPIPageProps' in page.data) {
41 + const pageData = page.data as OpenAPIPageData;
42 + const apiProps = pageData.getAPIPageProps();
43 + const detectedVersion = apiProps.operations?.[0]?.path
44 + ? extractVersionFromPath(apiProps.operations[0].path)
45 + : null;
46 + return (
47 + <DocsPage full footer={{ enabled: false }} tableOfContentPopover={{ enabled: false }}>
48 + <h1 className="text-2xl font-semibold mb-4">
49 + {pageData.title}
50 + {detectedVersion && (
51 + <span className="ml-2 align-middle">
52 + <VersionBadge version={detectedVersion} />
53 + </span>
54 + )}
55 + </h1>
56 + <PageActions path={page.url} />
57 + <DocsBody>
58 + <APIPage {...apiProps} />
59 + </DocsBody>
60 + </DocsPage>
61 + );
62 + }
63 +
64 + // eslint-disable-next-line @typescript-eslint/no-explicit-any
65 + const mdxData = page.data as any;
66 + const MDX = mdxData.body;
67 +
68 + return (
69 + <DocsPage toc={mdxData.toc} full={mdxData.full} footer={{ enabled: false }} tableOfContentPopover={{ enabled: false }}>
70 + <DocsTitle>{mdxData.title}</DocsTitle>
71 + <PageActions path={page.url} />
72 + <DocsBody>
73 + <MDX
74 + components={getMDXComponents({
75 + // eslint-disable-next-line @typescript-eslint/no-explicit-any
76 + a: createRelativeLink(referenceSource as any, page),
77 + })}
78 + />
79 + </DocsBody>
80 + </DocsPage>
81 + );
82 +}
83 +
84 +export async function generateStaticParams() {
85 + const referenceSource = await getReferenceSource();
86 + const allParams: { slug: string[] }[] = referenceSource.generateParams();
87 + // Only return params that start with 'v3', with the prefix stripped
88 + return allParams
89 + .filter((p) => p.slug[0] === 'v3')
90 + .map((p) => ({ slug: p.slug.slice(1) }));
91 +}
92 +
93 +export async function generateMetadata({
94 + params,
95 +}: {
96 + params: Promise<{ slug?: string[] }>;
97 +}): Promise<Metadata> {
98 + const { slug } = await params;
99 + const sourceSlug = toSourceSlug(slug);
100 +
101 + if (!slug || slug.length === 0) {
102 + const ogImage = getOgImageUrl('reference', [], 'API Reference (v3)', 'REST API reference for Composio v3');
103 + return {
104 + title: 'API Reference (v3)',
105 + description: 'REST API reference for Composio v3',
106 + alternates: { canonical: '/reference/v3' },
107 + openGraph: { images: [ogImage] },
108 + twitter: { card: 'summary_large_image', images: [ogImage] },
109 + };
110 + }
111 +
112 + const referenceSource = await getReferenceSource();
113 + const page = referenceSource.getPage(sourceSlug);
114 + if (!page) notFound();
115 +
116 + const description = page.data.description || page.data.title;
117 + const ogImage = getOgImageUrl('reference', page.slugs, page.data.title, description);
118 +
119 + return {
120 + title: page.data.title,
121 + description,
122 + alternates: { canonical: page.url },
123 + openGraph: { images: [ogImage] },
124 + twitter: { card: 'summary_large_image', images: [ogImage] },
125 + };
126 +}
docs/app/(home)/reference/v3/layout.tsx new
+21
@@ -0,0 +1,21 @@
1 +import { getReferenceSource } from '@/lib/source';
2 +import { DocsLayout } from 'fumadocs-ui/layouts/docs';
3 +import type { ReactNode } from 'react';
4 +import { prepareTree } from '@/lib/filter-api-version';
5 +
6 +export default async function Layout({ children }: { children: ReactNode }) {
7 + const source = await getReferenceSource();
8 + const tree = prepareTree(source.pageTree, '3.0');
9 +
10 + return (
11 + <DocsLayout
12 + tree={tree}
13 + nav={{ enabled: true, title: null }}
14 + searchToggle={{ enabled: false }}
15 + sidebar={{ collapsible: false, footer: null, tabs: false }}
16 + themeSwitch={{ enabled: false }}
17 + >
18 + {children}
19 + </DocsLayout>
20 + );
21 +}
docs/components/api-base-url.tsx new
+18
@@ -0,0 +1,18 @@
1 +'use client';
2 +
3 +import { useApiVersion } from '@/lib/use-api-version';
4 +
5 +const BASE_URLS: Record<string, string> = {
6 + '3.1': 'https://backend.composio.dev/api/v3.1',
7 + '3.0': 'https://backend.composio.dev/api/v3',
8 +};
9 +
10 +/**
11 + * Renders the API base URL for the currently selected version.
12 + * Detects version from URL path (/reference/v3/ = v3.0, otherwise v3.1).
13 + */
14 +export function ApiBaseUrl() {
15 + const version = useApiVersion();
16 + return <code>{BASE_URLS[version] ?? BASE_URLS['3.1']}</code>;
17 +}
18 +
docs/components/api-endpoints-table.tsx new
+41
@@ -0,0 +1,41 @@
1 +'use client';
2 +
3 +import { useApiVersion } from '@/lib/use-api-version';
4 +
5 +interface Endpoint {
6 + method: string;
7 + pathV31: string;
8 + pathV3: string;
9 + summary: string;
10 + href: string;
11 +}
12 +
13 +/**
14 + * Renders an endpoint table that updates based on the selected API version.
15 + * Used in auto-generated index pages.
16 + */
17 +export function ApiEndpointsTable({ endpoints }: { endpoints: Endpoint[] }) {
18 + const version = useApiVersion();
19 +
20 + return (
21 + <table>
22 + <thead>
23 + <tr>
24 + <th>Endpoint</th>
25 + <th>Quick Link</th>
26 + </tr>
27 + </thead>
28 + <tbody>
29 + {endpoints.map((ep, i) => {
30 + const path = version === '3.0' ? ep.pathV3 : ep.pathV31;
31 + return (
32 + <tr key={i}>
33 + <td><code>{ep.method} {path}</code></td>
34 + <td><a href={ep.href}>{ep.summary}</a></td>
35 + </tr>
36 + );
37 + })}
38 + </tbody>
39 + </table>
40 + );
41 +}
docs/components/version-badge.tsx new
+27
@@ -0,0 +1,27 @@
1 +/**
2 + * Badge component for displaying API version (v3.0, v3.1, etc.)
3 + */
4 +export function VersionBadge({ version }: { version: string }) {
5 + const isLatest = version === '3.1';
6 + return (
7 + <span
8 + className={`inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium ring-1 ring-inset ${
9 + isLatest
10 + ? 'bg-green-50 text-green-700 ring-green-600/20 dark:bg-green-500/10 dark:text-green-400 dark:ring-green-500/20'
11 + : 'bg-fd-muted text-fd-muted-foreground ring-fd-border'
12 + }`}
13 + >
14 + v{version}
15 + </span>
16 + );
17 +}
18 +
19 +/**
20 + * Extract API version from an endpoint path like /api/v3.1/tools/...
21 + * Returns normalized version string (e.g., "3.0", "3.1")
22 + */
23 +export function extractVersionFromPath(path: string): string | null {
24 + const match = path.match(/\/api\/v([\d.]+)\//);
25 + if (!match) return null;
26 + return match[1] === '3' ? '3.0' : match[1];
27 +}
docs/components/version-selector.tsx new
+146
@@ -0,0 +1,146 @@
1 +'use client';
2 +
3 +import { usePathname } from 'next/navigation';
4 +import { useState, useRef, useEffect } from 'react';
5 +import { useApiVersion } from '@/lib/use-api-version';
6 +
7 +const VERSIONS = [
8 + { value: '3.1', label: 'v3.1', badge: 'Latest' },
9 + { value: '3.0', label: 'v3.0' },
10 +] as const;
11 +
12 +export function NavVersionSelector() {
13 + const pathname = usePathname();
14 + const isReferencePage = pathname.startsWith('/reference');
15 + const version = useApiVersion();
16 + const [open, setOpen] = useState(false);
17 + const ref = useRef<HTMLDivElement>(null);
18 +
19 + useEffect(() => {
20 + const handler = (e: MouseEvent) => {
21 + if (ref.current && !ref.current.contains(e.target as Node)) {
22 + setOpen(false);
23 + }
24 + };
25 + document.addEventListener('mousedown', handler);
26 + return () => document.removeEventListener('mousedown', handler);
27 + }, []);
28 +
29 + if (!isReferencePage) return null;
30 +
31 + const navigate = (newVersion: string) => {
32 + setOpen(false);
33 + if (newVersion === version) return;
34 + const path = window.location.pathname;
35 +
36 + if (newVersion === '3.0') {
37 + // Shared pages — go to v3 overview
38 + if (path.includes('/sdk-reference') || path.includes('/meta-tools') || path === '/reference') {
39 + window.location.href = '/reference/v3';
40 + } else {
41 + window.location.href = path.replace('/reference/', '/reference/v3/');
42 + }
43 + } else if (newVersion === '3.1') {
44 + if (path === '/reference/v3') {
45 + window.location.href = '/reference';
46 + } else {
47 + window.location.href = path.replace('/reference/v3/', '/reference/');
48 + }
49 + }
50 + };
51 +
52 + const current = VERSIONS.find((v) => v.value === version)!;
53 +
54 + return (
55 + <div ref={ref} className="relative">
56 + <button
57 + onClick={(e) => {
58 + e.preventDefault();
59 + e.stopPropagation();
60 + setOpen(!open);
61 + }}
62 + onKeyDown={(e) => { if (e.key === 'Escape') setOpen(false); }}
63 + aria-haspopup="listbox"
64 + aria-expanded={open}
65 + aria-label={`API version: ${current.label}. Switch version`}
66 + className="inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-xs font-medium transition-colors hover:bg-fd-accent/50"
67 + style={{
68 + borderColor: 'color-mix(in srgb, var(--composio-orange, #f97316) 40%, transparent)',
69 + color: 'var(--composio-orange, #f97316)',
70 + }}
71 + >
72 + {current.label}
73 + <svg
74 + aria-hidden="true"
75 + width="10"
76 + height="10"
77 + viewBox="0 0 24 24"
78 + fill="none"
79 + stroke="currentColor"
80 + strokeWidth="2.5"
81 + strokeLinecap="round"
82 + strokeLinejoin="round"
83 + className={`transition-transform ${open ? 'rotate-180' : ''}`}
84 + >
85 + <path d="m6 9 6 6 6-6" />
86 + </svg>
87 + </button>
88 +
89 + {open && (
90 + <div
91 + role="listbox"
92 + aria-label="API version"
93 + className="absolute left-0 top-full z-50 mt-1.5 min-w-[120px] overflow-hidden rounded-lg border border-fd-border bg-fd-popover p-1 shadow-lg"
94 + onClick={(e) => e.stopPropagation()}
95 + >
96 + {VERSIONS.map((v) => (
97 + <button
98 + key={v.value}
99 + role="option"
100 + aria-selected={v.value === version}
101 + onClick={(e) => {
102 + e.preventDefault();
103 + e.stopPropagation();
104 + navigate(v.value);
105 + }}
106 + className={`flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-xs transition-colors ${
107 + v.value === version
108 + ? 'bg-fd-accent text-fd-accent-foreground font-medium'
109 + : 'text-fd-muted-foreground hover:bg-fd-accent/50 hover:text-fd-foreground'
110 + }`}
111 + >
112 + <span>{v.label}</span>
113 + {'badge' in v && v.badge && (
114 + <span
115 + className="rounded px-1 py-0.5 text-[10px] font-medium leading-none"
116 + style={{
117 + backgroundColor: 'color-mix(in srgb, var(--composio-orange, #f97316) 15%, transparent)',
118 + color: 'var(--composio-orange, #f97316)',
119 + }}
120 + >
121 + {v.badge}
122 + </span>
123 + )}
124 + {v.value === version && (
125 + <svg
126 + aria-hidden="true"
127 + width="12"
128 + height="12"
129 + viewBox="0 0 24 24"
130 + fill="none"
131 + stroke="currentColor"
132 + strokeWidth="3"
133 + strokeLinecap="round"
134 + strokeLinejoin="round"
135 + className="ml-auto"
136 + >
137 + <path d="M20 6 9 17l-5-5" />
138 + </svg>
139 + )}
140 + </button>
141 + ))}
142 + </div>
143 + )}
144 + </div>
145 + );
146 +}
docs/content/docs/auth-configuration/connected-accounts.mdx
+1 -1
@@ -245,7 +245,7 @@ If you need full credential values (e.g., to use tokens in your own API calls),
245 2. **API**:
246
247 ```bash
248 -curl -X PATCH https://backend.composio.dev/api/v3/org/project/config \
248 +curl -X PATCH https://backend.composio.dev/api/v3.1/org/project/config \
249 -H "x-api-key: YOUR_API_KEY" \
250 -H "Content-Type: application/json" \
251 -d '{"mask_secret_keys_in_connected_account": false}'
docs/content/docs/common-faq.mdx
+4 -4
@@ -95,12 +95,12 @@ This applies to direct tool execution only. Sessions with meta tools always use
95 </Accordion>
96
97 <Accordion title="Why does the API return fewer tools than the platform UI?">
98 -When calling the Get Tools API (`GET /api/v3/tools`) without specifying a `toolkit_versions` parameter, the API defaults to the base version (`00000000_00`), which only includes tools from the initial release. The platform UI shows tools from the latest version.
98 +When calling the Get Tools API (`GET /api/v3.1/tools`) without specifying a `toolkit_versions` parameter, the API defaults to the base version (`00000000_00`), which only includes tools from the initial release. The platform UI shows tools from the latest version.
99
100 To get all available tools, pass `toolkit_versions=latest`:
101
102 ```bash
103 -curl 'https://backend.composio.dev/api/v3/tools?toolkit_slug=googledrive&toolkit_versions=latest' \
103 +curl 'https://backend.composio.dev/api/v3.1/tools?toolkit_slug=googledrive&toolkit_versions=latest' \
104 -H 'x-api-key: YOUR_API_KEY'
105 ```
106
@@ -198,7 +198,7 @@ Use your own credentials when you're going to production and users will see OAut
198 Call the toolkits API and check the `composio_managed_auth_schemes` field:
199
200 ```bash
201 -curl 'https://backend.composio.dev/api/v3/toolkits/github' \
201 +curl 'https://backend.composio.dev/api/v3.1/toolkits/github' \
202 -H 'x-api-key: YOUR_API_KEY'
203 ```
204
@@ -207,7 +207,7 @@ If the array is empty, you'll need to provide your own credentials.
207 To fetch all toolkits and filter by managed auth availability, use the list endpoint:
208
209 ```bash
210 -curl 'https://backend.composio.dev/api/v3/toolkits' \
210 +curl 'https://backend.composio.dev/api/v3.1/toolkits' \
211 -H 'x-api-key: YOUR_API_KEY'
212 ```
213
docs/content/docs/custom-app-vs-managed-app.mdx
+1 -1
@@ -137,7 +137,7 @@ If your users already have connections through Composio managed auth, you can im
137 Some toolkits don't have Composio managed auth. For these, you must create a custom auth config with your own credentials. You can check whether a toolkit has managed auth by calling the API:
138
139 ```bash
140 -curl 'https://backend.composio.dev/api/v3/toolkits/posthog' \
140 +curl 'https://backend.composio.dev/api/v3.1/toolkits/posthog' \
141 -H 'x-api-key: YOUR_API_KEY'
142 ```
143
docs/content/docs/projects.mdx
+4 -4
@@ -34,7 +34,7 @@ Project management endpoints use the `x-org-api-key` header, not the regular `x-
34 ### Create a project
35
36 ```bash
37 -curl -X POST https://backend.composio.dev/api/v3/org/owner/project/new \
37 +curl -X POST https://backend.composio.dev/api/v3.1/org/owner/project/new \
38 -H "x-org-api-key: YOUR_ORG_API_KEY" \
39 -H "Content-Type: application/json" \
40 -d '{
@@ -56,7 +56,7 @@ The response includes the project ID and, if requested, an API key:
56 ### List projects
57
58 ```bash
59 -curl https://backend.composio.dev/api/v3/org/owner/project/list \
59 +curl https://backend.composio.dev/api/v3.1/org/owner/project/list \
60 -H "x-org-api-key: YOUR_ORG_API_KEY"
61 ```
62
@@ -65,7 +65,7 @@ Supports pagination with `limit` and `cursor` query parameters.
65 ### Get project details
66
67 ```bash
68 -curl https://backend.composio.dev/api/v3/org/owner/project/proj_abc123xyz456 \
68 +curl https://backend.composio.dev/api/v3.1/org/owner/project/proj_abc123xyz456 \
69 -H "x-org-api-key: YOUR_ORG_API_KEY"
70 ```
71
@@ -76,7 +76,7 @@ Returns the full project object including its API keys.
76 Each project has settings that control security, logging, and display behavior. These endpoints use your **project API key** (`x-api-key`), not the org key.
77
78 ```bash
79 -curl -X PATCH https://backend.composio.dev/api/v3/org/project/config \
79 +curl -X PATCH https://backend.composio.dev/api/v3.1/org/project/config \
80 -H "x-api-key: YOUR_API_KEY" \
81 -H "Content-Type: application/json" \
82 -d '{
docs/content/docs/setting-up-triggers/subscribing-to-events.mdx
+2 -2
@@ -16,7 +16,7 @@ Webhooks are the recommended way to receive trigger events in production. To sta
16 Set your webhook URL in the [dashboard settings](https://platform.composio.dev?next_page=/settings/webhook) or via the [Webhook Subscriptions API](/reference/api-reference/webhooks):
17
18 ```bash
19 -curl -X POST https://backend.composio.dev/api/v3/webhook_subscriptions \
19 +curl -X POST https://backend.composio.dev/api/v3.1/webhook_subscriptions \
20 -H "X-API-KEY: <your-composio-api-key>" \
21 -H "Content-Type: application/json" \
22 -d '{
@@ -197,7 +197,7 @@ ngrok http 8000
197 Then use the ngrok URL as your webhook endpoint:
198
199 ```bash
200 -curl -X POST https://backend.composio.dev/api/v3/webhook_subscriptions \
200 +curl -X POST https://backend.composio.dev/api/v3.1/webhook_subscriptions \
201 -H "X-API-KEY: <your-composio-api-key>" \
202 -H "Content-Type: application/json" \
203 -d '{
docs/content/docs/subscribing-to-connection-expiry-events.mdx
+1 -1
@@ -17,7 +17,7 @@ This event is only available with [V3 webhook payloads](/docs/webhook-verificati
17 Add `composio.connected_account.expired` to your webhook subscription's `enabled_events`:
18
19 ```bash
20 -curl -X POST https://backend.composio.dev/api/v3/webhook_subscriptions \
20 +curl -X POST https://backend.composio.dev/api/v3.1/webhook_subscriptions \
21 -H "X-API-KEY: <your-composio-api-key>" \
22 -H "Content-Type: application/json" \
23 -d '{
docs/content/docs/tools-direct/toolkit-versioning.mdx
+2 -2
@@ -31,11 +31,11 @@ This applies to both the SDK and direct REST API calls:
31
32 ```bash
33 # Without version — returns only tools from the base version
34 -curl 'https://backend.composio.dev/api/v3/tools?toolkit_slug=googledrive' \
34 +curl 'https://backend.composio.dev/api/v3.1/tools?toolkit_slug=googledrive' \
35 -H 'x-api-key: YOUR_API_KEY'
36
37 # With version=latest — returns all tools including newer ones
38 -curl 'https://backend.composio.dev/api/v3/tools?toolkit_slug=googledrive&toolkit_versions=latest' \
38 +curl 'https://backend.composio.dev/api/v3.1/tools?toolkit_slug=googledrive&toolkit_versions=latest' \
39 -H 'x-api-key: YOUR_API_KEY'
40 ```
41
docs/content/docs/troubleshooting/api.mdx
+1 -1
@@ -15,7 +15,7 @@ When reporting API issues to support, provide the following:
15 - **Request ID**: Add `x-request-id: <uuid>` header to your request and share the UUID (generate at [uuidgenerator.net](https://www.uuidgenerator.net/))
16
17 ```bash
18 - curl 'https://backend.composio.dev/api/v3/tools' \
18 + curl 'https://backend.composio.dev/api/v3.1/tools' \
19 -H 'x-api-key: YOUR_API_KEY' \
20 -H 'x-request-id: YOUR_UUID_HERE'
21 ```
docs/content/docs/troubleshooting/index.mdx
+1 -1
@@ -33,7 +33,7 @@ See [Troubleshooting MCP](/docs/troubleshooting/mcp#reporting-mcp-issues) for a
33 Add an `x-request-id` header with a UUID to your API request. This lets support trace your exact request in server logs.
34
35 ```bash
36 -curl 'https://backend.composio.dev/api/v3/tools' \
36 +curl 'https://backend.composio.dev/api/v3.1/tools' \
37 -H 'x-api-key: YOUR_API_KEY' \
38 -H 'x-request-id: YOUR_UUID_HERE'
39 ```
docs/content/docs/troubleshooting/tools.mdx
+2 -2
@@ -21,14 +21,14 @@ Verify the connected account has necessary permissions:
21
22 ## API returning fewer tools than expected
23
24 -If the Get Tools API (`GET /api/v3/tools`) returns fewer tools than what's shown on the [platform UI](https://platform.composio.dev), you likely need to specify a toolkit version.
24 +If the Get Tools API (`GET /api/v3.1/tools`) returns fewer tools than what's shown on the [platform UI](https://platform.composio.dev), you likely need to specify a toolkit version.
25
26 When `toolkit_versions` is not provided, the API defaults to the base version (`00000000_00`), which only includes tools from the initial release. Tools added in later versions won't appear.
27
28 To get all available tools, pass `toolkit_versions=latest`:
29
30 ```bash
31 -curl 'https://backend.composio.dev/api/v3/tools?toolkit_slug=googledrive&toolkit_versions=latest' \
31 +curl 'https://backend.composio.dev/api/v3.1/tools?toolkit_slug=googledrive&toolkit_versions=latest' \
32 -H 'x-api-key: YOUR_API_KEY'
33 ```
34
docs/content/reference/api-reference/auth-configs/index.mdx
+1 -8
@@ -9,11 +9,4 @@ Authentication configuration management
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `POST /api/v3/auth_configs` | [Create new authentication configuration](/reference/api-reference/auth-configs/postAuthConfigs) |
15 -| `GET /api/v3/auth_configs` | [List authentication configurations with optional filters](/reference/api-reference/auth-configs/getAuthConfigs) |
16 -| `GET /api/v3/auth_configs/{nanoid}` | [Get single authentication configuration by ID](/reference/api-reference/auth-configs/getAuthConfigsByNanoid) |
17 -| `PATCH /api/v3/auth_configs/{nanoid}` | [Update an authentication configuration](/reference/api-reference/auth-configs/patchAuthConfigsByNanoid) |
18 -| `DELETE /api/v3/auth_configs/{nanoid}` | [Delete an authentication configuration](/reference/api-reference/auth-configs/deleteAuthConfigsByNanoid) |
19 -| `PATCH /api/v3/auth_configs/{nanoid}/{status}` | [Enable or disable an authentication configuration](/reference/api-reference/auth-configs/patchAuthConfigsByNanoidByStatus) |
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/auth_configs","pathV3":"/api/v3/auth_configs","summary":"Create new authentication configuration","href":"/reference/api-reference/auth-configs/postAuthConfigs"},{"method":"GET","pathV31":"/api/v3.1/auth_configs","pathV3":"/api/v3/auth_configs","summary":"List authentication configurations with optional filters","href":"/reference/api-reference/auth-configs/getAuthConfigs"},{"method":"GET","pathV31":"/api/v3.1/auth_configs/{nanoid}","pathV3":"/api/v3/auth_configs/{nanoid}","summary":"Get single authentication configuration by ID","href":"/reference/api-reference/auth-configs/getAuthConfigsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/auth_configs/{nanoid}","pathV3":"/api/v3/auth_configs/{nanoid}","summary":"Update an authentication configuration","href":"/reference/api-reference/auth-configs/patchAuthConfigsByNanoid"},{"method":"DELETE","pathV31":"/api/v3.1/auth_configs/{nanoid}","pathV3":"/api/v3/auth_configs/{nanoid}","summary":"Delete an authentication configuration","href":"/reference/api-reference/auth-configs/deleteAuthConfigsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/auth_configs/{nanoid}/{status}","pathV3":"/api/v3/auth_configs/{nanoid}/{status}","summary":"Enable or disable an authentication configuration","href":"/reference/api-reference/auth-configs/patchAuthConfigsByNanoidByStatus"}]} />
docs/content/reference/api-reference/authentication/index.mdx
+1 -3
@@ -9,6 +9,4 @@ Authentication related endpoints
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/auth/session/info` | [Get current user session information](/reference/api-reference/authentication/getAuthSessionInfo) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/auth/session/info","pathV3":"/api/v3/auth/session/info","summary":"Get current user session information","href":"/reference/api-reference/authentication/getAuthSessionInfo"}]} />
docs/content/reference/api-reference/connected-accounts/index.mdx
+1 -10
@@ -9,13 +9,4 @@ Connected account management
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/connected_accounts` | [List connected accounts with optional filters](/reference/api-reference/connected-accounts/getConnectedAccounts) |
15 -| `POST /api/v3/connected_accounts` | [Create a new connected account](/reference/api-reference/connected-accounts/postConnectedAccounts) |
16 -| `GET /api/v3/connected_accounts/{nanoid}` | [Get connected account details by ID](/reference/api-reference/connected-accounts/getConnectedAccountsByNanoid) |
17 -| `DELETE /api/v3/connected_accounts/{nanoid}` | [Delete a connected account](/reference/api-reference/connected-accounts/deleteConnectedAccountsByNanoid) |
18 -| `PATCH /api/v3/connected_accounts/{nanoid}` | [Update a connected account](/reference/api-reference/connected-accounts/patchConnectedAccountsByNanoid) |
19 -| `PATCH /api/v3/connected_accounts/{nanoId}/status` | [Enable or disable a connected account](/reference/api-reference/connected-accounts/patchConnectedAccountsByNanoIdStatus) |
20 -| `POST /api/v3/connected_accounts/{nanoid}/refresh` | [Refresh authentication for a connected account](/reference/api-reference/connected-accounts/postConnectedAccountsByNanoidRefresh) |
21 -| `POST /api/v3/connected_accounts/link` | [Create a new auth link session](/reference/api-reference/connected-accounts/postConnectedAccountsLink) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/connected_accounts","pathV3":"/api/v3/connected_accounts","summary":"List connected accounts with optional filters","href":"/reference/api-reference/connected-accounts/getConnectedAccounts"},{"method":"POST","pathV31":"/api/v3.1/connected_accounts","pathV3":"/api/v3/connected_accounts","summary":"Create a new connected account","href":"/reference/api-reference/connected-accounts/postConnectedAccounts"},{"method":"GET","pathV31":"/api/v3.1/connected_accounts/{nanoid}","pathV3":"/api/v3/connected_accounts/{nanoid}","summary":"Get connected account details by ID","href":"/reference/api-reference/connected-accounts/getConnectedAccountsByNanoid"},{"method":"DELETE","pathV31":"/api/v3.1/connected_accounts/{nanoid}","pathV3":"/api/v3/connected_accounts/{nanoid}","summary":"Delete a connected account","href":"/reference/api-reference/connected-accounts/deleteConnectedAccountsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/connected_accounts/{nanoid}","pathV3":"/api/v3/connected_accounts/{nanoid}","summary":"Update a connected account","href":"/reference/api-reference/connected-accounts/patchConnectedAccountsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/connected_accounts/{nanoId}/status","pathV3":"/api/v3/connected_accounts/{nanoId}/status","summary":"Enable or disable a connected account","href":"/reference/api-reference/connected-accounts/patchConnectedAccountsByNanoIdStatus"},{"method":"POST","pathV31":"/api/v3.1/connected_accounts/{nanoid}/refresh","pathV3":"/api/v3/connected_accounts/{nanoid}/refresh","summary":"Refresh authentication for a connected account","href":"/reference/api-reference/connected-accounts/postConnectedAccountsByNanoidRefresh"},{"method":"POST","pathV31":"/api/v3.1/connected_accounts/link","pathV3":"/api/v3/connected_accounts/link","summary":"Create a new auth link session","href":"/reference/api-reference/connected-accounts/postConnectedAccountsLink"}]} />
docs/content/reference/api-reference/files/index.mdx
+1 -4
@@ -9,7 +9,4 @@ File management
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/files/list` | [List files with optional app and action filters](/reference/api-reference/files/getFilesList) |
15 -| `POST /api/v3/files/upload/request` | [Create presigned URL for request file upload to S3](/reference/api-reference/files/postFilesUploadRequest) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/files/list","pathV3":"/api/v3/files/list","summary":"List files with optional app and action filters","href":"/reference/api-reference/files/getFilesList"},{"method":"POST","pathV31":"/api/v3.1/files/upload/request","pathV3":"/api/v3/files/upload/request","summary":"Create presigned URL for request file upload to S3","href":"/reference/api-reference/files/postFilesUploadRequest"}]} />
docs/content/reference/api-reference/mcp/index.mdx
+1 -13
@@ -9,16 +9,4 @@ MCP server management
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/mcp/servers` | [List MCP servers with optional filters and pagination](/reference/api-reference/mcp/getMcpServers) |
15 -| `POST /api/v3/mcp/servers` | [Create a new MCP server](/reference/api-reference/mcp/postMcpServers) |
16 -| `POST /api/v3/mcp/servers/custom` | [Create a new custom MCP server with multiple apps](/reference/api-reference/mcp/postMcpServersCustom) |
17 -| `POST /api/v3/mcp/servers/generate` | [Generate MCP URL with custom parameters](/reference/api-reference/mcp/postMcpServersGenerate) |
18 -| `GET /api/v3/mcp/{id}` | [Get MCP server details by ID](/reference/api-reference/mcp/getMcpById) |
19 -| `PATCH /api/v3/mcp/{id}` | [Update MCP server configuration](/reference/api-reference/mcp/patchMcpById) |
20 -| `DELETE /api/v3/mcp/{id}` | [Delete an MCP server](/reference/api-reference/mcp/deleteMcpById) |
21 -| `GET /api/v3/mcp/app/{appKey}` | [List MCP servers for a specific app](/reference/api-reference/mcp/getMcpAppByAppKey) |
22 -| `GET /api/v3/mcp/servers/{serverId}/instances` | [List all instances for an MCP server](/reference/api-reference/mcp/getMcpServersByServerIdInstances) |
23 -| `POST /api/v3/mcp/servers/{serverId}/instances` | [Create a new MCP server instance](/reference/api-reference/mcp/postMcpServersByServerIdInstances) |
24 -| `DELETE /api/v3/mcp/servers/{serverId}/instances/{instanceId}` | [Delete an MCP server instance and associated connected accounts](/reference/api-reference/mcp/deleteMcpServersByServerIdInstancesByInstanceId) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/mcp/servers","pathV3":"/api/v3/mcp/servers","summary":"List MCP servers with optional filters and pagination","href":"/reference/api-reference/mcp/getMcpServers"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers","pathV3":"/api/v3/mcp/servers","summary":"Create a new MCP server","href":"/reference/api-reference/mcp/postMcpServers"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers/custom","pathV3":"/api/v3/mcp/servers/custom","summary":"Create a new custom MCP server with multiple apps","href":"/reference/api-reference/mcp/postMcpServersCustom"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers/generate","pathV3":"/api/v3/mcp/servers/generate","summary":"Generate MCP URL with custom parameters","href":"/reference/api-reference/mcp/postMcpServersGenerate"},{"method":"GET","pathV31":"/api/v3.1/mcp/{id}","pathV3":"/api/v3/mcp/{id}","summary":"Get MCP server details by ID","href":"/reference/api-reference/mcp/getMcpById"},{"method":"PATCH","pathV31":"/api/v3.1/mcp/{id}","pathV3":"/api/v3/mcp/{id}","summary":"Update MCP server configuration","href":"/reference/api-reference/mcp/patchMcpById"},{"method":"DELETE","pathV31":"/api/v3.1/mcp/{id}","pathV3":"/api/v3/mcp/{id}","summary":"Delete an MCP server","href":"/reference/api-reference/mcp/deleteMcpById"},{"method":"GET","pathV31":"/api/v3.1/mcp/app/{appKey}","pathV3":"/api/v3/mcp/app/{appKey}","summary":"List MCP servers for a specific app","href":"/reference/api-reference/mcp/getMcpAppByAppKey"},{"method":"GET","pathV31":"/api/v3.1/mcp/servers/{serverId}/instances","pathV3":"/api/v3/mcp/servers/{serverId}/instances","summary":"List all instances for an MCP server","href":"/reference/api-reference/mcp/getMcpServersByServerIdInstances"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers/{serverId}/instances","pathV3":"/api/v3/mcp/servers/{serverId}/instances","summary":"Create a new MCP server instance","href":"/reference/api-reference/mcp/postMcpServersByServerIdInstances"},{"method":"DELETE","pathV31":"/api/v3.1/mcp/servers/{serverId}/instances/{instanceId}","pathV3":"/api/v3/mcp/servers/{serverId}/instances/{instanceId}","summary":"Delete an MCP server instance and associated connected accounts","href":"/reference/api-reference/mcp/deleteMcpServersByServerIdInstancesByInstanceId"}]} />
docs/content/reference/api-reference/migration/index.mdx
+1 -3
@@ -9,6 +9,4 @@ Endpoints to help with migration from v1 to v3
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/migration/get-nanoid` | [Get NanoId from UUID](/reference/api-reference/migration/getMigrationGetNanoid) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/migration/get-nanoid","pathV3":"/api/v3/migration/get-nanoid","summary":"Get NanoId from UUID","href":"/reference/api-reference/migration/getMigrationGetNanoid"}]} />
docs/content/reference/api-reference/organization/index.mdx
+1 -3
@@ -9,6 +9,4 @@ Organization management
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/org/usage/summary` | [Org usage summary](/reference/api-reference/organization/getOrgUsageSummary) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/org/usage/summary","pathV3":"/api/v3/org/usage/summary","summary":"Org usage summary","href":"/reference/api-reference/organization/getOrgUsageSummary"}]} />
docs/content/reference/api-reference/projects/index.mdx
+1 -10
@@ -9,13 +9,4 @@ Projects API endpoints
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/org/project/config` | [Get project configuration](/reference/api-reference/projects/getOrgProjectConfig) |
15 -| `PATCH /api/v3/org/project/config` | [Update project configuration](/reference/api-reference/projects/patchOrgProjectConfig) |
16 -| `GET /api/v3/org/project/usage/summary` | [Project usage summary](/reference/api-reference/projects/getOrgProjectUsageSummary) |
17 -| `POST /api/v3/org/owner/project/new` | [Create a new project](/reference/api-reference/projects/postOrgOwnerProjectNew) |
18 -| `GET /api/v3/org/owner/project/list` | [List all projects](/reference/api-reference/projects/getOrgOwnerProjectList) |
19 -| `GET /api/v3/org/owner/project/{nano_id}` | [Get project details by ID With Org Api key](/reference/api-reference/projects/getOrgOwnerProjectByNanoId) |
20 -| `DELETE /api/v3/org/owner/project/{nano_id}` | [Delete a project](/reference/api-reference/projects/deleteOrgOwnerProjectByNanoId) |
21 -| `POST /api/v3/org/owner/project/{nano_id}/regenerate_api_key` | [Delete and generate new API key for project](/reference/api-reference/projects/postOrgOwnerProjectByNanoIdRegenerateApiKey) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/org/project/config","pathV3":"/api/v3/org/project/config","summary":"Get project configuration","href":"/reference/api-reference/projects/getOrgProjectConfig"},{"method":"PATCH","pathV31":"/api/v3.1/org/project/config","pathV3":"/api/v3/org/project/config","summary":"Update project configuration","href":"/reference/api-reference/projects/patchOrgProjectConfig"},{"method":"GET","pathV31":"/api/v3.1/org/project/usage/summary","pathV3":"/api/v3/org/project/usage/summary","summary":"Project usage summary","href":"/reference/api-reference/projects/getOrgProjectUsageSummary"},{"method":"POST","pathV31":"/api/v3.1/org/owner/project/new","pathV3":"/api/v3/org/owner/project/new","summary":"Create a new project","href":"/reference/api-reference/projects/postOrgOwnerProjectNew"},{"method":"GET","pathV31":"/api/v3.1/org/owner/project/list","pathV3":"/api/v3/org/owner/project/list","summary":"List all projects","href":"/reference/api-reference/projects/getOrgOwnerProjectList"},{"method":"GET","pathV31":"/api/v3.1/org/owner/project/{nano_id}","pathV3":"/api/v3/org/owner/project/{nano_id}","summary":"Get project details by ID With Org Api key","href":"/reference/api-reference/projects/getOrgOwnerProjectByNanoId"},{"method":"DELETE","pathV31":"/api/v3.1/org/owner/project/{nano_id}","pathV3":"/api/v3/org/owner/project/{nano_id}","summary":"Delete a project","href":"/reference/api-reference/projects/deleteOrgOwnerProjectByNanoId"},{"method":"POST","pathV31":"/api/v3.1/org/owner/project/{nano_id}/regenerate_api_key","pathV3":"/api/v3/org/owner/project/{nano_id}/regenerate_api_key","summary":"Delete and generate new API key for project","href":"/reference/api-reference/projects/postOrgOwnerProjectByNanoIdRegenerateApiKey"}]} />
docs/content/reference/api-reference/tool-router/index.mdx
+1 -15
@@ -9,18 +9,4 @@ description: "(Labs) Tool router endpoints"
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `POST /api/v3/tool_router/session` | [Create a new tool router session](/reference/api-reference/tool-router/postToolRouterSession) |
15 -| `POST /api/v3/tool_router/session/{session_id}/execute` | [Execute a tool within a tool router session](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdExecute) |
16 -| `POST /api/v3/tool_router/session/{session_id}/execute_meta` | [Execute a meta tool within a tool router session](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdExecuteMeta) |
17 -| `GET /api/v3/tool_router/session/{session_id}` | [Get a tool router session by ID](/reference/api-reference/tool-router/getToolRouterSessionBySessionId) |
18 -| `POST /api/v3/tool_router/session/{session_id}/link` | [Create a link session for a toolkit in a tool router session](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdLink) |
19 -| `POST /api/v3/tool_router/session/{session_id}/proxy_execute` | [Execute proxy request within a tool router session](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdProxyExecute) |
20 -| `GET /api/v3/tool_router/session/{session_id}/toolkits` | [Get toolkits for a tool router session](/reference/api-reference/tool-router/getToolRouterSessionBySessionIdToolkits) |
21 -| `GET /api/v3/tool_router/session/{session_id}/tools` | [List meta tools with schemas for a tool router session](/reference/api-reference/tool-router/getToolRouterSessionBySessionIdTools) |
22 -| `POST /api/v3/tool_router/session/{session_id}/search` | [Search for tools using a query](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdSearch) |
23 -| `GET /api/v3/tool_router/session/{session_id}/mounts/{mount_id}/items` | [List files in a session mount](/reference/api-reference/tool-router/getToolRouterSessionBySessionIdMountsByMountIdItems) |
24 -| `POST /api/v3/tool_router/session/{session_id}/mounts/{mount_id}/download_url` | [Create a presigned download URL for a mount file](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdDownloadUrl) |
25 -| `POST /api/v3/tool_router/session/{session_id}/mounts/{mount_id}/upload_url` | [Create a presigned upload URL for a mount file](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdUploadUrl) |
26 -| `POST /api/v3/tool_router/session/{session_id}/mounts/{mount_id}/delete` | [Delete a file from a session mount](/reference/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdDelete) |
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/tool_router/session","pathV3":"/api/v3/tool_router/session","summary":"Create a new tool router session","href":"/reference/api-reference/tool-router/postToolRouterSession"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/execute","pathV3":"/api/v3/tool_router/session/{session_id}/execute","summary":"Execute a tool within a tool router session","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdExecute"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/execute_meta","pathV3":"/api/v3/tool_router/session/{session_id}/execute_meta","summary":"Execute a meta tool within a tool router session","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdExecuteMeta"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}","pathV3":"/api/v3/tool_router/session/{session_id}","summary":"Get a tool router session by ID","href":"/reference/api-reference/tool-router/getToolRouterSessionBySessionId"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/link","pathV3":"/api/v3/tool_router/session/{session_id}/link","summary":"Create a link session for a toolkit in a tool router session","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdLink"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/proxy_execute","pathV3":"/api/v3/tool_router/session/{session_id}/proxy_execute","summary":"Execute proxy request within a tool router session","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdProxyExecute"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}/toolkits","pathV3":"/api/v3/tool_router/session/{session_id}/toolkits","summary":"Get toolkits for a tool router session","href":"/reference/api-reference/tool-router/getToolRouterSessionBySessionIdToolkits"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}/tools","pathV3":"/api/v3/tool_router/session/{session_id}/tools","summary":"List meta tools with schemas for a tool router session","href":"/reference/api-reference/tool-router/getToolRouterSessionBySessionIdTools"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/search","pathV3":"/api/v3/tool_router/session/{session_id}/search","summary":"Search for tools using a query","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdSearch"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/items","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/items","summary":"List files in a session mount","href":"/reference/api-reference/tool-router/getToolRouterSessionBySessionIdMountsByMountIdItems"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/download_url","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/download_url","summary":"Create a presigned download URL for a mount file","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdDownloadUrl"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/upload_url","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/upload_url","summary":"Create a presigned upload URL for a mount file","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdUploadUrl"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/delete","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/delete","summary":"Delete a file from a session mount","href":"/reference/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdDelete"}]} />
docs/content/reference/api-reference/toolkits/index.mdx
+1 -7
@@ -9,10 +9,4 @@ Toolkit and tool management
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/toolkits` | [List available toolkits](/reference/api-reference/toolkits/getToolkits) |
15 -| `GET /api/v3/toolkits/categories` | [List toolkit categories](/reference/api-reference/toolkits/getToolkitsCategories) |
16 -| `GET /api/v3/toolkits/{slug}` | [Get toolkit by slug](/reference/api-reference/toolkits/getToolkitsBySlug) |
17 -| `POST /api/v3/toolkits/multi` | [Fetch multiple toolkits](/reference/api-reference/toolkits/postToolkitsMulti) |
18 -| `GET /api/v3/toolkits/changelog` | [Get toolkits changelog](/reference/api-reference/toolkits/getToolkitsChangelog) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/toolkits","pathV3":"/api/v3/toolkits","summary":"List available toolkits","href":"/reference/api-reference/toolkits/getToolkits"},{"method":"GET","pathV31":"/api/v3.1/toolkits/categories","pathV3":"/api/v3/toolkits/categories","summary":"List toolkit categories","href":"/reference/api-reference/toolkits/getToolkitsCategories"},{"method":"GET","pathV31":"/api/v3.1/toolkits/{slug}","pathV3":"/api/v3/toolkits/{slug}","summary":"Get toolkit by slug","href":"/reference/api-reference/toolkits/getToolkitsBySlug"},{"method":"POST","pathV31":"/api/v3.1/toolkits/multi","pathV3":"/api/v3/toolkits/multi","summary":"Fetch multiple toolkits","href":"/reference/api-reference/toolkits/postToolkitsMulti"},{"method":"GET","pathV31":"/api/v3.1/toolkits/changelog","pathV3":"/api/v3/toolkits/changelog","summary":"Get toolkits changelog","href":"/reference/api-reference/toolkits/getToolkitsChangelog"}]} />
docs/content/reference/api-reference/tools/index.mdx
+1 -8
@@ -9,11 +9,4 @@ Tool execution endpoints
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `GET /api/v3/tools` | [List available tools](/reference/api-reference/tools/getTools) |
15 -| `GET /api/v3/tools/enum` | [Get tool enum list](/reference/api-reference/tools/getToolsEnum) |
16 -| `GET /api/v3/tools/{tool_slug}` | [Get tool by slug](/reference/api-reference/tools/getToolsByToolSlug) |
17 -| `POST /api/v3/tools/execute/{tool_slug}` | [Execute tool](/reference/api-reference/tools/postToolsExecuteByToolSlug) |
18 -| `POST /api/v3/tools/execute/{tool_slug}/input` | [Generate tool inputs from natural language](/reference/api-reference/tools/postToolsExecuteByToolSlugInput) |
19 -| `POST /api/v3/tools/execute/proxy` | [Execute proxy request](/reference/api-reference/tools/postToolsExecuteProxy) |
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/tools","pathV3":"/api/v3/tools","summary":"List available tools","href":"/reference/api-reference/tools/getTools"},{"method":"GET","pathV31":"/api/v3.1/tools/enum","pathV3":"/api/v3/tools/enum","summary":"Get tool enum list","href":"/reference/api-reference/tools/getToolsEnum"},{"method":"GET","pathV31":"/api/v3.1/tools/{tool_slug}","pathV3":"/api/v3/tools/{tool_slug}","summary":"Get tool by slug","href":"/reference/api-reference/tools/getToolsByToolSlug"},{"method":"POST","pathV31":"/api/v3.1/tools/execute/{tool_slug}","pathV3":"/api/v3/tools/execute/{tool_slug}","summary":"Execute tool","href":"/reference/api-reference/tools/postToolsExecuteByToolSlug"},{"method":"POST","pathV31":"/api/v3.1/tools/execute/{tool_slug}/input","pathV3":"/api/v3/tools/execute/{tool_slug}/input","summary":"Generate tool inputs from natural language","href":"/reference/api-reference/tools/postToolsExecuteByToolSlugInput"},{"method":"POST","pathV31":"/api/v3.1/tools/execute/proxy","pathV3":"/api/v3/tools/execute/proxy","summary":"Execute proxy request","href":"/reference/api-reference/tools/postToolsExecuteProxy"},{"method":"POST","pathV31":"/api/v3.1/tools/scopes/required","pathV3":"/api/v3/tools/scopes/required","summary":"Get required scopes for tools","href":"/reference/api-reference/tools/postToolsScopesRequired"}]} />
docs/content/reference/api-reference/triggers/index.mdx
+1 -9
@@ -9,12 +9,4 @@ Trigger management and execution
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `POST /api/v3/trigger_instances/{slug}/upsert` | [Create or update a trigger](/reference/api-reference/triggers/postTriggerInstancesBySlugUpsert) |
15 -| `GET /api/v3/trigger_instances/active` | [List active triggers](/reference/api-reference/triggers/getTriggerInstancesActive) |
16 -| `DELETE /api/v3/trigger_instances/manage/{triggerId}` | [Delete a trigger](/reference/api-reference/triggers/deleteTriggerInstancesManageByTriggerId) |
17 -| `PATCH /api/v3/trigger_instances/manage/{triggerId}` | [Enable or disable a trigger](/reference/api-reference/triggers/patchTriggerInstancesManageByTriggerId) |
18 -| `GET /api/v3/triggers_types/list/enum` | [List trigger type enums](/reference/api-reference/triggers/getTriggersTypesListEnum) |
19 -| `GET /api/v3/triggers_types/{slug}` | [Get trigger type by slug](/reference/api-reference/triggers/getTriggersTypesBySlug) |
20 -| `GET /api/v3/triggers_types` | [List trigger types](/reference/api-reference/triggers/getTriggersTypes) |
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/trigger_instances/{slug}/upsert","pathV3":"/api/v3/trigger_instances/{slug}/upsert","summary":"Create or update a trigger","href":"/reference/api-reference/triggers/postTriggerInstancesBySlugUpsert"},{"method":"GET","pathV31":"/api/v3.1/trigger_instances/active","pathV3":"/api/v3/trigger_instances/active","summary":"List active triggers","href":"/reference/api-reference/triggers/getTriggerInstancesActive"},{"method":"DELETE","pathV31":"/api/v3.1/trigger_instances/manage/{triggerId}","pathV3":"/api/v3/trigger_instances/manage/{triggerId}","summary":"Delete a trigger","href":"/reference/api-reference/triggers/deleteTriggerInstancesManageByTriggerId"},{"method":"PATCH","pathV31":"/api/v3.1/trigger_instances/manage/{triggerId}","pathV3":"/api/v3/trigger_instances/manage/{triggerId}","summary":"Enable or disable a trigger","href":"/reference/api-reference/triggers/patchTriggerInstancesManageByTriggerId"},{"method":"GET","pathV31":"/api/v3.1/triggers_types/list/enum","pathV3":"/api/v3/triggers_types/list/enum","summary":"List trigger type enums","href":"/reference/api-reference/triggers/getTriggersTypesListEnum"},{"method":"GET","pathV31":"/api/v3.1/triggers_types/{slug}","pathV3":"/api/v3/triggers_types/{slug}","summary":"Get trigger type by slug","href":"/reference/api-reference/triggers/getTriggersTypesBySlug"},{"method":"GET","pathV31":"/api/v3.1/triggers_types","pathV3":"/api/v3/triggers_types","summary":"List trigger types","href":"/reference/api-reference/triggers/getTriggersTypes"}]} />
docs/content/reference/api-reference/webhooks/index.mdx
+1 -9
@@ -9,12 +9,4 @@ Webhook configuration
9
10 ## Endpoints
11
12 -| Endpoint | Quick Link |
13 -|----------|------------|
14 -| `POST /api/v3/webhook_subscriptions` | [Create webhook subscription](/reference/api-reference/webhooks/postWebhookSubscriptions) |
15 -| `GET /api/v3/webhook_subscriptions` | [List webhook subscriptions](/reference/api-reference/webhooks/getWebhookSubscriptions) |
16 -| `GET /api/v3/webhook_subscriptions/{id}` | [Get webhook subscription](/reference/api-reference/webhooks/getWebhookSubscriptionsById) |
17 -| `PATCH /api/v3/webhook_subscriptions/{id}` | [Update webhook subscription](/reference/api-reference/webhooks/patchWebhookSubscriptionsById) |
18 -| `DELETE /api/v3/webhook_subscriptions/{id}` | [Delete webhook subscription](/reference/api-reference/webhooks/deleteWebhookSubscriptionsById) |
19 -| `POST /api/v3/webhook_subscriptions/{id}/rotate_secret` | [Rotate webhook secret](/reference/api-reference/webhooks/postWebhookSubscriptionsByIdRotateSecret) |
20 -| `GET /api/v3/webhook_subscriptions/event_types` | [List available event types](/reference/api-reference/webhooks/getWebhookSubscriptionsEventTypes) |
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/webhook_subscriptions","pathV3":"/api/v3/webhook_subscriptions","summary":"Create webhook subscription","href":"/reference/api-reference/webhooks/postWebhookSubscriptions"},{"method":"GET","pathV31":"/api/v3.1/webhook_subscriptions","pathV3":"/api/v3/webhook_subscriptions","summary":"List webhook subscriptions","href":"/reference/api-reference/webhooks/getWebhookSubscriptions"},{"method":"GET","pathV31":"/api/v3.1/webhook_subscriptions/{id}","pathV3":"/api/v3/webhook_subscriptions/{id}","summary":"Get webhook subscription","href":"/reference/api-reference/webhooks/getWebhookSubscriptionsById"},{"method":"PATCH","pathV31":"/api/v3.1/webhook_subscriptions/{id}","pathV3":"/api/v3/webhook_subscriptions/{id}","summary":"Update webhook subscription","href":"/reference/api-reference/webhooks/patchWebhookSubscriptionsById"},{"method":"DELETE","pathV31":"/api/v3.1/webhook_subscriptions/{id}","pathV3":"/api/v3/webhook_subscriptions/{id}","summary":"Delete webhook subscription","href":"/reference/api-reference/webhooks/deleteWebhookSubscriptionsById"},{"method":"POST","pathV31":"/api/v3.1/webhook_subscriptions/{id}/rotate_secret","pathV3":"/api/v3/webhook_subscriptions/{id}/rotate_secret","summary":"Rotate webhook secret","href":"/reference/api-reference/webhooks/postWebhookSubscriptionsByIdRotateSecret"},{"method":"GET","pathV31":"/api/v3.1/webhook_subscriptions/event_types","pathV3":"/api/v3/webhook_subscriptions/event_types","summary":"List available event types","href":"/reference/api-reference/webhooks/getWebhookSubscriptionsEventTypes"}]} />
docs/content/reference/authentication.mdx
+2 -2
@@ -35,14 +35,14 @@ For organization-level access across multiple projects, use the `x-org-api-key`
35 Include your API key in the request header:
36
37 ```bash
38 -curl https://backend.composio.dev/api/v3/tools \
38 +curl https://backend.composio.dev/api/v3.1/tools \
39 -H "x-api-key: $COMPOSIO_API_KEY"
40 ```
41
42 For organization-level endpoints:
43
44 ```bash
45 -curl https://backend.composio.dev/api/v3/org/projects \
45 +curl https://backend.composio.dev/api/v3.1/org/projects \
46 -H "x-org-api-key: $COMPOSIO_ORG_API_KEY"
47 ```
48
docs/content/reference/index.mdx
+1 -1
@@ -8,7 +8,7 @@ Composio powers tool discovery, execution, authentication, and context managemen
8
9 ## Quick Reference
10
11 -- **Base URL**: `https://backend.composio.dev/api/v3`
11 +- **Base URL**: <ApiBaseUrl />
12 - **[Authentication](/reference/authentication)**: `x-api-key` (project) or `x-org-api-key` (organization) header
13 - **[Rate Limits](/reference/rate-limits)**: 20K-100K requests per 10 minutes (plan-dependent)
14
docs/content/reference/meta.json
+1
@@ -6,6 +6,7 @@
6 "rate-limits",
7 "errors",
8 "api-reference",
9 + "v3",
10 "meta-tools",
11 "sdk-reference"
12 ]
docs/content/reference/v3/api-reference/auth-configs/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Auth Configs
3 +description: "Authentication configuration management"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Authentication configuration management
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/auth_configs","pathV3":"/api/v3/auth_configs","summary":"Create new authentication configuration","href":"/reference/v3/api-reference/auth-configs/postAuthConfigs"},{"method":"GET","pathV31":"/api/v3.1/auth_configs","pathV3":"/api/v3/auth_configs","summary":"List authentication configurations with optional filters","href":"/reference/v3/api-reference/auth-configs/getAuthConfigs"},{"method":"GET","pathV31":"/api/v3.1/auth_configs/{nanoid}","pathV3":"/api/v3/auth_configs/{nanoid}","summary":"Get single authentication configuration by ID","href":"/reference/v3/api-reference/auth-configs/getAuthConfigsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/auth_configs/{nanoid}","pathV3":"/api/v3/auth_configs/{nanoid}","summary":"Update an authentication configuration","href":"/reference/v3/api-reference/auth-configs/patchAuthConfigsByNanoid"},{"method":"DELETE","pathV31":"/api/v3.1/auth_configs/{nanoid}","pathV3":"/api/v3/auth_configs/{nanoid}","summary":"Delete an authentication configuration","href":"/reference/v3/api-reference/auth-configs/deleteAuthConfigsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/auth_configs/{nanoid}/{status}","pathV3":"/api/v3/auth_configs/{nanoid}/{status}","summary":"Enable or disable an authentication configuration","href":"/reference/v3/api-reference/auth-configs/patchAuthConfigsByNanoidByStatus"}]} />
docs/content/reference/v3/api-reference/authentication/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Authentication
3 +description: "Authentication related endpoints"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Authentication related endpoints
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/auth/session/info","pathV3":"/api/v3/auth/session/info","summary":"Get current user session information","href":"/reference/v3/api-reference/authentication/getAuthSessionInfo"}]} />
docs/content/reference/v3/api-reference/connected-accounts/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Connected Accounts
3 +description: "Connected account management"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Connected account management
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/connected_accounts","pathV3":"/api/v3/connected_accounts","summary":"List connected accounts with optional filters","href":"/reference/v3/api-reference/connected-accounts/getConnectedAccounts"},{"method":"POST","pathV31":"/api/v3.1/connected_accounts","pathV3":"/api/v3/connected_accounts","summary":"Create a new connected account","href":"/reference/v3/api-reference/connected-accounts/postConnectedAccounts"},{"method":"GET","pathV31":"/api/v3.1/connected_accounts/{nanoid}","pathV3":"/api/v3/connected_accounts/{nanoid}","summary":"Get connected account details by ID","href":"/reference/v3/api-reference/connected-accounts/getConnectedAccountsByNanoid"},{"method":"DELETE","pathV31":"/api/v3.1/connected_accounts/{nanoid}","pathV3":"/api/v3/connected_accounts/{nanoid}","summary":"Delete a connected account","href":"/reference/v3/api-reference/connected-accounts/deleteConnectedAccountsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/connected_accounts/{nanoid}","pathV3":"/api/v3/connected_accounts/{nanoid}","summary":"Update a connected account","href":"/reference/v3/api-reference/connected-accounts/patchConnectedAccountsByNanoid"},{"method":"PATCH","pathV31":"/api/v3.1/connected_accounts/{nanoId}/status","pathV3":"/api/v3/connected_accounts/{nanoId}/status","summary":"Enable or disable a connected account","href":"/reference/v3/api-reference/connected-accounts/patchConnectedAccountsByNanoIdStatus"},{"method":"POST","pathV31":"/api/v3.1/connected_accounts/{nanoid}/refresh","pathV3":"/api/v3/connected_accounts/{nanoid}/refresh","summary":"Refresh authentication for a connected account","href":"/reference/v3/api-reference/connected-accounts/postConnectedAccountsByNanoidRefresh"},{"method":"POST","pathV31":"/api/v3.1/connected_accounts/link","pathV3":"/api/v3/connected_accounts/link","summary":"Create a new auth link session","href":"/reference/v3/api-reference/connected-accounts/postConnectedAccountsLink"}]} />
docs/content/reference/v3/api-reference/files/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Files
3 +description: "File management"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +File management
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/files/list","pathV3":"/api/v3/files/list","summary":"List files with optional app and action filters","href":"/reference/v3/api-reference/files/getFilesList"},{"method":"POST","pathV31":"/api/v3.1/files/upload/request","pathV3":"/api/v3/files/upload/request","summary":"Create presigned URL for request file upload to S3","href":"/reference/v3/api-reference/files/postFilesUploadRequest"}]} />
docs/content/reference/v3/api-reference/mcp/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: MCP
3 +description: "MCP server management"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +MCP server management
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/mcp/servers","pathV3":"/api/v3/mcp/servers","summary":"List MCP servers with optional filters and pagination","href":"/reference/v3/api-reference/mcp/getMcpServers"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers","pathV3":"/api/v3/mcp/servers","summary":"Create a new MCP server","href":"/reference/v3/api-reference/mcp/postMcpServers"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers/custom","pathV3":"/api/v3/mcp/servers/custom","summary":"Create a new custom MCP server with multiple apps","href":"/reference/v3/api-reference/mcp/postMcpServersCustom"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers/generate","pathV3":"/api/v3/mcp/servers/generate","summary":"Generate MCP URL with custom parameters","href":"/reference/v3/api-reference/mcp/postMcpServersGenerate"},{"method":"GET","pathV31":"/api/v3.1/mcp/{id}","pathV3":"/api/v3/mcp/{id}","summary":"Get MCP server details by ID","href":"/reference/v3/api-reference/mcp/getMcpById"},{"method":"PATCH","pathV31":"/api/v3.1/mcp/{id}","pathV3":"/api/v3/mcp/{id}","summary":"Update MCP server configuration","href":"/reference/v3/api-reference/mcp/patchMcpById"},{"method":"DELETE","pathV31":"/api/v3.1/mcp/{id}","pathV3":"/api/v3/mcp/{id}","summary":"Delete an MCP server","href":"/reference/v3/api-reference/mcp/deleteMcpById"},{"method":"GET","pathV31":"/api/v3.1/mcp/app/{appKey}","pathV3":"/api/v3/mcp/app/{appKey}","summary":"List MCP servers for a specific app","href":"/reference/v3/api-reference/mcp/getMcpAppByAppKey"},{"method":"GET","pathV31":"/api/v3.1/mcp/servers/{serverId}/instances","pathV3":"/api/v3/mcp/servers/{serverId}/instances","summary":"List all instances for an MCP server","href":"/reference/v3/api-reference/mcp/getMcpServersByServerIdInstances"},{"method":"POST","pathV31":"/api/v3.1/mcp/servers/{serverId}/instances","pathV3":"/api/v3/mcp/servers/{serverId}/instances","summary":"Create a new MCP server instance","href":"/reference/v3/api-reference/mcp/postMcpServersByServerIdInstances"},{"method":"DELETE","pathV31":"/api/v3.1/mcp/servers/{serverId}/instances/{instanceId}","pathV3":"/api/v3/mcp/servers/{serverId}/instances/{instanceId}","summary":"Delete an MCP server instance and associated connected accounts","href":"/reference/v3/api-reference/mcp/deleteMcpServersByServerIdInstancesByInstanceId"}]} />
docs/content/reference/v3/api-reference/meta.json new
+5
@@ -0,0 +1,5 @@
1 +{
2 + "title": "API Reference",
3 + "defaultOpen": true,
4 + "pages": ["..."]
5 +}
docs/content/reference/v3/api-reference/migration/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Migration
3 +description: "Endpoints to help with migration from v1 to v3"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Endpoints to help with migration from v1 to v3
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/migration/get-nanoid","pathV3":"/api/v3/migration/get-nanoid","summary":"Get NanoId from UUID","href":"/reference/v3/api-reference/migration/getMigrationGetNanoid"}]} />
docs/content/reference/v3/api-reference/organization/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Organization
3 +description: "Organization management"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Organization management
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/org/usage/summary","pathV3":"/api/v3/org/usage/summary","summary":"Org usage summary","href":"/reference/v3/api-reference/organization/getOrgUsageSummary"}]} />
docs/content/reference/v3/api-reference/projects/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Projects
3 +description: "Projects API endpoints"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Projects API endpoints
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/org/project/config","pathV3":"/api/v3/org/project/config","summary":"Get project configuration","href":"/reference/v3/api-reference/projects/getOrgProjectConfig"},{"method":"PATCH","pathV31":"/api/v3.1/org/project/config","pathV3":"/api/v3/org/project/config","summary":"Update project configuration","href":"/reference/v3/api-reference/projects/patchOrgProjectConfig"},{"method":"GET","pathV31":"/api/v3.1/org/project/usage/summary","pathV3":"/api/v3/org/project/usage/summary","summary":"Project usage summary","href":"/reference/v3/api-reference/projects/getOrgProjectUsageSummary"},{"method":"POST","pathV31":"/api/v3.1/org/owner/project/new","pathV3":"/api/v3/org/owner/project/new","summary":"Create a new project","href":"/reference/v3/api-reference/projects/postOrgOwnerProjectNew"},{"method":"GET","pathV31":"/api/v3.1/org/owner/project/list","pathV3":"/api/v3/org/owner/project/list","summary":"List all projects","href":"/reference/v3/api-reference/projects/getOrgOwnerProjectList"},{"method":"GET","pathV31":"/api/v3.1/org/owner/project/{nano_id}","pathV3":"/api/v3/org/owner/project/{nano_id}","summary":"Get project details by ID With Org Api key","href":"/reference/v3/api-reference/projects/getOrgOwnerProjectByNanoId"},{"method":"DELETE","pathV31":"/api/v3.1/org/owner/project/{nano_id}","pathV3":"/api/v3/org/owner/project/{nano_id}","summary":"Delete a project","href":"/reference/v3/api-reference/projects/deleteOrgOwnerProjectByNanoId"},{"method":"POST","pathV31":"/api/v3.1/org/owner/project/{nano_id}/regenerate_api_key","pathV3":"/api/v3/org/owner/project/{nano_id}/regenerate_api_key","summary":"Delete and generate new API key for project","href":"/reference/v3/api-reference/projects/postOrgOwnerProjectByNanoIdRegenerateApiKey"}]} />
docs/content/reference/v3/api-reference/tool-router/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Tool Router
3 +description: "(Labs) Tool router endpoints"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +(Labs) Tool router endpoints
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/tool_router/session","pathV3":"/api/v3/tool_router/session","summary":"Create a new tool router session","href":"/reference/v3/api-reference/tool-router/postToolRouterSession"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/execute","pathV3":"/api/v3/tool_router/session/{session_id}/execute","summary":"Execute a tool within a tool router session","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdExecute"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/execute_meta","pathV3":"/api/v3/tool_router/session/{session_id}/execute_meta","summary":"Execute a meta tool within a tool router session","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdExecuteMeta"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}","pathV3":"/api/v3/tool_router/session/{session_id}","summary":"Get a tool router session by ID","href":"/reference/v3/api-reference/tool-router/getToolRouterSessionBySessionId"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/link","pathV3":"/api/v3/tool_router/session/{session_id}/link","summary":"Create a link session for a toolkit in a tool router session","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdLink"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/proxy_execute","pathV3":"/api/v3/tool_router/session/{session_id}/proxy_execute","summary":"Execute proxy request within a tool router session","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdProxyExecute"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}/toolkits","pathV3":"/api/v3/tool_router/session/{session_id}/toolkits","summary":"Get toolkits for a tool router session","href":"/reference/v3/api-reference/tool-router/getToolRouterSessionBySessionIdToolkits"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}/tools","pathV3":"/api/v3/tool_router/session/{session_id}/tools","summary":"List meta tools with schemas for a tool router session","href":"/reference/v3/api-reference/tool-router/getToolRouterSessionBySessionIdTools"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/search","pathV3":"/api/v3/tool_router/session/{session_id}/search","summary":"Search for tools using a query","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdSearch"},{"method":"GET","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/items","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/items","summary":"List files in a session mount","href":"/reference/v3/api-reference/tool-router/getToolRouterSessionBySessionIdMountsByMountIdItems"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/download_url","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/download_url","summary":"Create a presigned download URL for a mount file","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdDownloadUrl"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/upload_url","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/upload_url","summary":"Create a presigned upload URL for a mount file","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdUploadUrl"},{"method":"POST","pathV31":"/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/delete","pathV3":"/api/v3/tool_router/session/{session_id}/mounts/{mount_id}/delete","summary":"Delete a file from a session mount","href":"/reference/v3/api-reference/tool-router/postToolRouterSessionBySessionIdMountsByMountIdDelete"}]} />
docs/content/reference/v3/api-reference/toolkits/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Toolkits
3 +description: "Toolkit and tool management"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Toolkit and tool management
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/toolkits","pathV3":"/api/v3/toolkits","summary":"List available toolkits","href":"/reference/v3/api-reference/toolkits/getToolkits"},{"method":"GET","pathV31":"/api/v3.1/toolkits/categories","pathV3":"/api/v3/toolkits/categories","summary":"List toolkit categories","href":"/reference/v3/api-reference/toolkits/getToolkitsCategories"},{"method":"GET","pathV31":"/api/v3.1/toolkits/{slug}","pathV3":"/api/v3/toolkits/{slug}","summary":"Get toolkit by slug","href":"/reference/v3/api-reference/toolkits/getToolkitsBySlug"},{"method":"POST","pathV31":"/api/v3.1/toolkits/multi","pathV3":"/api/v3/toolkits/multi","summary":"Fetch multiple toolkits","href":"/reference/v3/api-reference/toolkits/postToolkitsMulti"},{"method":"GET","pathV31":"/api/v3.1/toolkits/changelog","pathV3":"/api/v3/toolkits/changelog","summary":"Get toolkits changelog","href":"/reference/v3/api-reference/toolkits/getToolkitsChangelog"}]} />
docs/content/reference/v3/api-reference/tools/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Tools
3 +description: "Tool execution endpoints"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Tool execution endpoints
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"GET","pathV31":"/api/v3.1/tools","pathV3":"/api/v3/tools","summary":"List available tools","href":"/reference/v3/api-reference/tools/getTools"},{"method":"GET","pathV31":"/api/v3.1/tools/enum","pathV3":"/api/v3/tools/enum","summary":"Get tool enum list","href":"/reference/v3/api-reference/tools/getToolsEnum"},{"method":"GET","pathV31":"/api/v3.1/tools/{tool_slug}","pathV3":"/api/v3/tools/{tool_slug}","summary":"Get tool by slug","href":"/reference/v3/api-reference/tools/getToolsByToolSlug"},{"method":"POST","pathV31":"/api/v3.1/tools/execute/{tool_slug}","pathV3":"/api/v3/tools/execute/{tool_slug}","summary":"Execute tool","href":"/reference/v3/api-reference/tools/postToolsExecuteByToolSlug"},{"method":"POST","pathV31":"/api/v3.1/tools/execute/{tool_slug}/input","pathV3":"/api/v3/tools/execute/{tool_slug}/input","summary":"Generate tool inputs from natural language","href":"/reference/v3/api-reference/tools/postToolsExecuteByToolSlugInput"},{"method":"POST","pathV31":"/api/v3.1/tools/execute/proxy","pathV3":"/api/v3/tools/execute/proxy","summary":"Execute proxy request","href":"/reference/v3/api-reference/tools/postToolsExecuteProxy"}]} />
docs/content/reference/v3/api-reference/triggers/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Triggers
3 +description: "Trigger management and execution"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Trigger management and execution
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/trigger_instances/{slug}/upsert","pathV3":"/api/v3/trigger_instances/{slug}/upsert","summary":"Create or update a trigger","href":"/reference/v3/api-reference/triggers/postTriggerInstancesBySlugUpsert"},{"method":"GET","pathV31":"/api/v3.1/trigger_instances/active","pathV3":"/api/v3/trigger_instances/active","summary":"List active triggers","href":"/reference/v3/api-reference/triggers/getTriggerInstancesActive"},{"method":"DELETE","pathV31":"/api/v3.1/trigger_instances/manage/{triggerId}","pathV3":"/api/v3/trigger_instances/manage/{triggerId}","summary":"Delete a trigger","href":"/reference/v3/api-reference/triggers/deleteTriggerInstancesManageByTriggerId"},{"method":"PATCH","pathV31":"/api/v3.1/trigger_instances/manage/{triggerId}","pathV3":"/api/v3/trigger_instances/manage/{triggerId}","summary":"Enable or disable a trigger","href":"/reference/v3/api-reference/triggers/patchTriggerInstancesManageByTriggerId"},{"method":"GET","pathV31":"/api/v3.1/triggers_types/list/enum","pathV3":"/api/v3/triggers_types/list/enum","summary":"List trigger type enums","href":"/reference/v3/api-reference/triggers/getTriggersTypesListEnum"},{"method":"GET","pathV31":"/api/v3.1/triggers_types/{slug}","pathV3":"/api/v3/triggers_types/{slug}","summary":"Get trigger type by slug","href":"/reference/v3/api-reference/triggers/getTriggersTypesBySlug"},{"method":"GET","pathV31":"/api/v3.1/triggers_types","pathV3":"/api/v3/triggers_types","summary":"List trigger types","href":"/reference/v3/api-reference/triggers/getTriggersTypes"}]} />
docs/content/reference/v3/api-reference/webhooks/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Webhooks
3 +description: "Webhook configuration"
4 +---
5 +
6 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
7 +
8 +Webhook configuration
9 +
10 +## Endpoints
11 +
12 +<ApiEndpointsTable endpoints={[{"method":"POST","pathV31":"/api/v3.1/webhook_subscriptions","pathV3":"/api/v3/webhook_subscriptions","summary":"Create webhook subscription","href":"/reference/v3/api-reference/webhooks/postWebhookSubscriptions"},{"method":"GET","pathV31":"/api/v3.1/webhook_subscriptions","pathV3":"/api/v3/webhook_subscriptions","summary":"List webhook subscriptions","href":"/reference/v3/api-reference/webhooks/getWebhookSubscriptions"},{"method":"GET","pathV31":"/api/v3.1/webhook_subscriptions/{id}","pathV3":"/api/v3/webhook_subscriptions/{id}","summary":"Get webhook subscription","href":"/reference/v3/api-reference/webhooks/getWebhookSubscriptionsById"},{"method":"PATCH","pathV31":"/api/v3.1/webhook_subscriptions/{id}","pathV3":"/api/v3/webhook_subscriptions/{id}","summary":"Update webhook subscription","href":"/reference/v3/api-reference/webhooks/patchWebhookSubscriptionsById"},{"method":"DELETE","pathV31":"/api/v3.1/webhook_subscriptions/{id}","pathV3":"/api/v3/webhook_subscriptions/{id}","summary":"Delete webhook subscription","href":"/reference/v3/api-reference/webhooks/deleteWebhookSubscriptionsById"},{"method":"POST","pathV31":"/api/v3.1/webhook_subscriptions/{id}/rotate_secret","pathV3":"/api/v3/webhook_subscriptions/{id}/rotate_secret","summary":"Rotate webhook secret","href":"/reference/v3/api-reference/webhooks/postWebhookSubscriptionsByIdRotateSecret"},{"method":"GET","pathV31":"/api/v3.1/webhook_subscriptions/event_types","pathV3":"/api/v3/webhook_subscriptions/event_types","summary":"List available event types","href":"/reference/v3/api-reference/webhooks/getWebhookSubscriptionsEventTypes"}]} />
docs/content/reference/v3/authentication.mdx new
+56
@@ -0,0 +1,56 @@
1 +---
2 +title: Authentication
3 +description: How to authenticate with Composio APIs using project and organization API keys
4 +keywords: [API authentication, API key, x-api-key, x-org-api-key, Composio authentication, authorization]
5 +---
6 +
7 +All Composio API endpoints require authentication via API key.
8 +
9 +## API Key Authentication
10 +
11 +Include your API key in the `x-api-key` header.
12 +
13 +### Getting Your API Key
14 +
15 +1. Sign in to [composio.dev](https://composio.dev)
16 +2. Navigate to **Settings**
17 +3. In **Project Settings**, copy the key from the **API Keys** section
18 +
19 +<Video src="/videos/fetch-project-key.mp4" autoPlay />
20 +
21 +## Organization API Key
22 +
23 +For organization-level access across multiple projects, use the `x-org-api-key` header instead.
24 +
25 +### Getting Your Organization API Key
26 +
27 +1. Sign in to [composio.dev](https://composio.dev)
28 +2. Navigate to **Organization Settings** → **General Settings**
29 +3. Copy the token under **Organization Access Tokens**
30 +
31 +<Video src="/videos/fetch-org-key.mp4" autoPlay />
32 +
33 +## Using the API Key
34 +
35 +Include your API key in the request header:
36 +
37 +```bash
38 +curl https://backend.composio.dev/api/v3/tools \
39 + -H "x-api-key: $COMPOSIO_API_KEY"
40 +```
41 +
42 +For organization-level endpoints:
43 +
44 +```bash
45 +curl https://backend.composio.dev/api/v3/org/projects \
46 + -H "x-org-api-key: $COMPOSIO_ORG_API_KEY"
47 +```
48 +
49 +<Cards>
50 + <Card title="Errors" href="/reference/v3/errors">
51 + Understanding API error responses
52 + </Card>
53 + <Card title="Rate Limits" href="/reference/v3/rate-limits">
54 + API rate limits by plan
55 + </Card>
56 +</Cards>
docs/content/reference/v3/errors.mdx new
+122
@@ -0,0 +1,122 @@
1 +---
2 +title: Errors
3 +description: Composio API error codes, HTTP status codes, and troubleshooting guide
4 +keywords: [API errors, error codes, HTTP status codes, error handling, troubleshooting, "400 bad request", "401 unauthorized", "429 rate limit"]
5 +---
6 +
7 +Composio uses conventional HTTP response codes to indicate the success or failure of an API request. In general: codes in the `2xx` range indicate success, codes in the `4xx` range indicate an error with the information provided, and codes in the `5xx` range indicate an error with Composio's servers.
8 +
9 +## The error object
10 +
11 +```json
12 +{
13 + "error": {
14 + "message": "No connected account found for this user and toolkit",
15 + "status": 400,
16 + "request_id": "req_abc123def456",
17 + "suggested_fix": "Connect the user to the toolkit first"
18 + }
19 +}
20 +```
21 +
22 +### Attributes
23 +
24 +| Attribute | Description |
25 +|-----------|-------------|
26 +| `message` | A human-readable message providing details about the error. |
27 +| `status` | The HTTP status code. |
28 +| `request_id` | A unique identifier for this request. Include this when contacting support. |
29 +| `suggested_fix` | When available, guidance on how to resolve the error. |
30 +
31 +## HTTP status codes
32 +
33 +| Code | Status | Description |
34 +|------|--------|-------------|
35 +| 200 | OK | Everything worked as expected. |
36 +| 400 | Bad Request | The request was unacceptable, often due to missing a required parameter. |
37 +| 401 | Unauthorized | No valid API key provided. |
38 +| 403 | Forbidden | The API key doesn't have permissions to perform the request. |
39 +| 404 | Not Found | The requested resource doesn't exist. |
40 +| 409 | Conflict | The request conflicts with another request (perhaps due to using the same idempotent key). |
41 +| 422 | Unprocessable Entity | The request was valid but cannot be processed. |
42 +| 429 | Too Many Requests | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests. |
43 +| 500, 502, 503, 504 | Server Errors | Something went wrong on Composio's end. |
44 +
45 +## Error types
46 +
47 +### Authentication errors
48 +
49 +Composio uses two types of API keys:
50 +- **Project API key** (`x-api-key`) — For project-level operations
51 +- **Organization API key** (`x-org-api-key`) — For organization-level access across projects
52 +
53 +| Error | Cause |
54 +|-------|-------|
55 +| Invalid API key | The API key is incorrect or revoked. Verify in [Settings](https://platform.composio.dev/settings). |
56 +| No authentication provided | The request is missing the `x-api-key` or `x-org-api-key` header. |
57 +| Invalid organization key | The organization API key is incorrect or revoked. Verify in Organization Settings. |
58 +| Insufficient permissions | The API key doesn't have access to this resource. |
59 +
60 +<Callout>
61 +See [Authentication Troubleshooting](/docs/troubleshooting/authentication) for more help.
62 +</Callout>
63 +
64 +### Tool errors
65 +
66 +Errors that occur when fetching or executing tools.
67 +
68 +| Error | Cause |
69 +|-------|-------|
70 +| Tool not found | The tool slug doesn't exist. Tool slugs are case-sensitive and use `SCREAMING_SNAKE_CASE`. |
71 +| No connected account | The user hasn't connected to this toolkit yet. |
72 +| Tool execution failed | The external service returned an error. Check tool parameters and user permissions. |
73 +
74 +<Callout>
75 +See [Tools Troubleshooting](/docs/troubleshooting/tools) for more help.
76 +</Callout>
77 +
78 +### Connection errors
79 +
80 +Errors related to connected accounts.
81 +
82 +| Error | Cause |
83 +|-------|-------|
84 +| Connected account not found | The `connectedAccountId` doesn't exist or was deleted. |
85 +| Auth refresh required | The OAuth token has expired. Prompt the user to re-authenticate. |
86 +| Connected account deleted | The connection was removed. Create a new connection. |
87 +
88 +### Trigger errors
89 +
90 +Errors related to trigger subscriptions.
91 +
92 +| Error | Cause |
93 +|-------|-------|
94 +| Trigger not found | The trigger slug doesn't exist for this toolkit. |
95 +| Trigger instance deleted | The trigger subscription or its connected account was removed. |
96 +
97 +<Callout>
98 +See [Triggers Troubleshooting](/docs/troubleshooting/triggers) for more help.
99 +</Callout>
100 +
101 +## Rate limiting
102 +
103 +When you hit rate limits, you'll receive a `429` status code. See [Rate Limits](/reference/v3/rate-limits) for details on limits by plan and best practices for handling rate limit errors.
104 +
105 +## Getting help
106 +
107 +When contacting support, include the `request_id` from the error response.
108 +
109 +<Cards>
110 + <Card title="Troubleshooting" href="/docs/troubleshooting">
111 + Common issues and solutions
112 + </Card>
113 + <Card title="Discord" href="https://discord.com/channels/1170785031560646836/1268871288156323901">
114 + Community support
115 + </Card>
116 + <Card title="Email" href="mailto:support@composio.dev">
117 + Contact support team
118 + </Card>
119 + <Card title="GitHub" href="https://github.com/ComposioHQ/composio/issues/new?labels=bug">
120 + Report a bug
121 + </Card>
122 +</Cards>
docs/content/reference/v3/index.mdx new
+24
@@ -0,0 +1,24 @@
1 +---
2 +title: Overview
3 +description: Composio REST API and SDK reference for AI agent tool execution, authentication, and integrations
4 +keywords: [Composio API, REST API, SDK reference, AI agent tools, tool execution, API documentation]
5 +---
6 +
7 +Composio powers tool discovery, execution, authentication, and context management for your AI agents with 1000+ toolkits. This reference covers our REST APIs and SDKs.
8 +
9 +## Quick Reference
10 +
11 +- **Base URL**: <ApiBaseUrl />
12 +- **[Authentication](/reference/v3/authentication)**: `x-api-key` (project) or `x-org-api-key` (organization) header
13 +- **[Rate Limits](/reference/v3/rate-limits)**: 20K-100K requests per 10 minutes (plan-dependent)
14 +
15 +## REST API
16 +
17 +| API | Description |
18 +|-----|-------------|
19 +| [Tool Router](/reference/v3/api-reference/tool-router) | Session-based API for AI agents to discover and execute tools |
20 +| [Tools](/reference/v3/api-reference/tools) | List, search, and execute individual actions |
21 +| [Connected Accounts](/reference/v3/api-reference/connected-accounts) | Manage user OAuth connections to apps |
22 +| [Auth Configs](/reference/v3/api-reference/auth-configs) | Configure how users authenticate to toolkits |
23 +| [Triggers](/reference/v3/api-reference/triggers) | Subscribe to webhooks from connected apps |
24 +| [Toolkits](/reference/v3/api-reference/toolkits) | Browse available apps and their tools |
docs/content/reference/v3/meta.json new
+10
@@ -0,0 +1,10 @@
1 +{
2 + "title": "V3",
3 + "pages": [
4 + "index",
5 + "authentication",
6 + "rate-limits",
7 + "errors",
8 + "api-reference"
9 + ]
10 +}
docs/content/reference/v3/rate-limits.mdx new
+62
@@ -0,0 +1,62 @@
1 +---
2 +title: Rate Limits
3 +description: Composio API rate limits by plan, rate limit headers, and best practices
4 +keywords: [API rate limits, rate limiting, throttling, 429 too many requests, API quotas, request limits]
5 +---
6 +
7 +Rate limits are enforced **per organization** and reset on a rolling 10-minute window.
8 +
9 +## Rate limits by plan
10 +
11 +| Plan | Rate Limit | Window |
12 +|------|------------|--------|
13 +| Starter | 20,000 requests | 10 minutes |
14 +| Hobby | 20,000 requests | 10 minutes |
15 +| Growth | 100,000 requests | 10 minutes |
16 +| Enterprise | Unlimited | - |
17 +
18 +<Callout>
19 +All authenticated API endpoints share your organization's rate limit. This includes tool execution, connected accounts, triggers, and all other API operations.
20 +</Callout>
21 +
22 +## Rate limit headers
23 +
24 +API responses include headers to help you track your usage:
25 +
26 +| Header | Description |
27 +|--------|-------------|
28 +| `X-RateLimit` | Total requests allowed in the current window |
29 +| `X-RateLimit-Remaining` | Requests remaining in the current window |
30 +| `X-RateLimit-Window-Size` | Window size (e.g., `600s` for 600 seconds) |
31 +| `Retry-After` | Seconds until the window resets (only on 429 responses) |
32 +
33 +## Rate limit response
34 +
35 +When you exceed the rate limit, you'll receive a `429 Too Many Requests` response:
36 +
37 +```json
38 +{
39 + "message": "Rate limit exceeded. Limit: 100000 requests per 10 minutes"
40 +}
41 +```
42 +
43 +## Best practices
44 +
45 +1. **Monitor your usage** - Check the `X-RateLimit-Remaining` header to track how close you are to the limit.
46 +
47 +2. **Implement backoff** - When you receive a `429`, wait for the duration specified in `Retry-After` before retrying.
48 +
49 +3. **Cache responses** - Cache tool definitions and other static data to reduce unnecessary API calls.
50 +
51 +## Need higher limits?
52 +
53 +If you're hitting rate limits regularly, consider upgrading your plan or [talk to us](https://calendly.com/composiohq/enterprise) to discuss custom limits for your use case.
54 +
55 +<Cards>
56 + <Card title="Errors" href="/reference/v3/errors">
57 + Understanding API error responses
58 + </Card>
59 + <Card title="Pricing" href="https://composio.dev/pricing">
60 + Compare plans and limits
61 + </Card>
62 +</Cards>
docs/content/toolkits/managed-auth.mdx
+1 -1
@@ -8,7 +8,7 @@ Toolkits with managed auth work out of the box with no OAuth setup. For toolkits
8 You can also check programmatically whether a toolkit has managed auth:
9
10 ```bash
11 -curl 'https://backend.composio.dev/api/v3/toolkits/posthog' \
11 +curl 'https://backend.composio.dev/api/v3.1/toolkits/posthog' \
12 -H 'x-api-key: YOUR_API_KEY'
13 ```
14
docs/lib/api-version.ts new
+16
@@ -0,0 +1,16 @@
1 +/**
2 + * Shared API version detection logic.
3 + * Centralizes the URL-based version detection used across components and proxy.
4 + */
5 +
6 +export type ApiVersion = '3.1' | '3.0';
7 +
8 +/**
9 + * Detects the API version from a pathname.
10 + * /reference/v3/ or /reference/v3 → '3.0', everything else → '3.1'
11 + */
12 +export function detectApiVersion(pathname: string): ApiVersion {
13 + return pathname.startsWith('/reference/v3/') || pathname === '/reference/v3'
14 + ? '3.0'
15 + : '3.1';
16 +}
docs/lib/filter-api-version.ts new
+82
@@ -0,0 +1,82 @@
1 +/**
2 + * Filters the combined page tree to show only the selected API version.
3 + * v3.1 pages are at /reference/{page} and /reference/api-reference/{tag}/{op}
4 + * v3.0 pages are at /reference/v3/{page} and /reference/v3/api-reference/{tag}/{op}
5 + *
6 + * For v3.1: hide the V3 folder entirely.
7 + * For v3.0: lift V3 folder contents to the top, hide v3.1-only nodes.
8 + */
9 +
10 +interface PageTreeNode {
11 + type: 'page' | 'folder' | 'separator';
12 + name?: unknown;
13 + url?: string;
14 + children?: PageTreeNode[];
15 + index?: PageTreeNode;
16 + [key: string]: unknown;
17 +}
18 +
19 +interface PageTreeRoot {
20 + children: PageTreeNode[];
21 + [key: string]: unknown;
22 +}
23 +
24 +function isV3Node(node: PageTreeNode): boolean {
25 + if (node.type === 'page' && typeof node.url === 'string') {
26 + return node.url.startsWith('/reference/v3/') || node.url === '/reference/v3';
27 + }
28 + if (node.type === 'folder') {
29 + if (node.index && isV3Node(node.index)) return true;
30 + return node.children?.some(isV3Node) ?? false;
31 + }
32 + return false;
33 +}
34 +
35 +/** Checks if a folder contains v3.1 API reference pages (URLs under /reference/api-reference/). */
36 +function isV31ApiFolder(node: PageTreeNode): boolean {
37 + if (node.type !== 'folder') return false;
38 + const hasV31ApiPage = (n: PageTreeNode): boolean => {
39 + if (n.type === 'page' && typeof n.url === 'string') {
40 + return n.url.startsWith('/reference/api-reference/');
41 + }
42 + if (n.type === 'folder') {
43 + if (n.index && hasV31ApiPage(n.index)) return true;
44 + return n.children?.some(hasV31ApiPage) ?? false;
45 + }
46 + return false;
47 + };
48 + if (node.index && hasV31ApiPage(node.index)) return true;
49 + return node.children?.some(hasV31ApiPage) ?? false;
50 +}
51 +
52 +export function prepareTree<T extends PageTreeRoot>(tree: T, version: string): T {
53 + const children = tree.children as PageTreeNode[];
54 +
55 + if (version === '3.1') {
56 + // Just hide the V3 folder
57 + return {
58 + ...tree,
59 + children: children.filter((node) => !isV3Node(node)),
60 + };
61 + }
62 +
63 + // v3.0: lift V3 folder contents, keep version-independent folders (SDK Reference, Meta Tools)
64 + const v3Folder = children.find(
65 + (node) => node.type === 'folder' && isV3Node(node),
66 + );
67 +
68 + // Nodes that should appear in both versions (exclude v3 nodes, v3.1 API Reference folder,
69 + // and top-level pages which are version-specific — both versions have their own copies)
70 + const sharedNodes = children.filter(
71 + (node) => node.type !== 'page' && !isV3Node(node) && !isV31ApiFolder(node),
72 + );
73 +
74 + if (v3Folder?.children) {
75 + // Include the folder's index page (v3/index.mdx → overview) which fumadocs
76 + // stores in .index rather than .children
77 + const indexPage = v3Folder.index ? [v3Folder.index] : [];
78 + return { ...tree, children: [...indexPage, ...v3Folder.children, ...sharedNodes] };
79 + }
80 +
81 + return { ...tree, children: [...children.filter(isV3Node), ...sharedNodes] };
82 +}
docs/lib/layout.shared.tsx
+2 -1
@@ -2,6 +2,7 @@ import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
2 import Image from 'next/image';
3 import { Play } from 'lucide-react';
4 import { SearchAndAskAI, SearchAndAskAIMobile } from '@/components/ask-ai-button';
5 +import { NavVersionSelector } from '@/components/version-selector';
6
7 // Composio Logo Component with light/dark mode switching
8 function ComposioLogo() {
@@ -53,7 +54,7 @@ export function baseOptions(): BaseLayoutProps {
54 active: 'nested-url',
55 },
56 {
56 - text: 'Reference',
57 + text: <span className="inline-flex items-center gap-1">Reference <NavVersionSelector /></span>,
58 url: '/reference',
59 active: 'nested-url',
60 },
docs/lib/openapi.ts
+7 -3
@@ -1,10 +1,14 @@
1 import { join } from 'path';
2 import { createOpenAPI } from 'fumadocs-openapi/server';
3
4 -// Use local filtered spec (generated by scripts/fetch-openapi.ts)
5 -// Run `bun run scripts/fetch-openapi.ts` to update the spec
6 -// Use absolute path to ensure resolution in Vercel serverless functions
4 +// v3.1 (latest) — clean operationIds, default API reference
5 export const openapi = createOpenAPI({
6 input: [join(process.cwd(), 'public/openapi.json')],
7 proxyUrl: '/api/proxy',
8 });
9 +
10 +// v3.0 — mounted under api-reference/v3/
11 +export const openapiV3 = createOpenAPI({
12 + input: [join(process.cwd(), 'public/openapi-v3.json')],
13 + proxyUrl: '/api/proxy',
14 +});
docs/lib/source.ts
+13 -93
@@ -1,33 +1,30 @@
1 import { docs, reference, cookbooks, toolkits, changelog } from 'fumadocs-mdx:collections/server';
2 import { type InferPageType, loader, multiple } from 'fumadocs-core/source';
3 import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
4 -import { openapi } from './openapi';
4 +import { openapi, openapiV3 } from './openapi';
5 import { openapiSource, openapiPlugin } from 'fumadocs-openapi/server';
6 import { getGuardrails } from './llm-guardrails';
7
8 /**
9 * Transformer to set defaultOpen: true for specific folders in the reference sidebar.
10 - * This is needed because openapiSource doesn't support meta.json files.
10 */
11 const defaultOpenTransformer = {
12 folder(node: { name: string; defaultOpen?: boolean }, folderPath: string) {
14 - // Set defaultOpen for API Reference and SDK Reference folders
15 - if (folderPath === 'api-reference' || folderPath === 'sdk-reference' || folderPath === 'meta-tools') {
13 + if (folderPath === 'api-reference' || folderPath === 'sdk-reference' || folderPath === 'meta-tools' || folderPath === 'v3/api-reference') {
14 return { ...node, defaultOpen: true };
15 }
16 return node;
17 },
18 };
19
22 -// See https://fumadocs.dev/docs/headless/source-api for more info
20 export const source = loader({
21 baseUrl: '/docs',
22 source: docs.toFumadocsSource(),
23 plugins: [lucideIconsPlugin()],
24 });
25
29 -// Combined reference source with MDX pages and OpenAPI-generated pages
30 -// Lazy initialization to avoid top-level await issues in serverless
26 +// One combined reference source with both v3.1 and v3.0 OpenAPI pages.
27 +// v3.1 at api-reference/, v3.0 at api-reference/v3/
28 // eslint-disable-next-line @typescript-eslint/no-explicit-any
29 let _referenceSource: any = null;
30 // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -35,22 +32,23 @@ let _openapiPagesPromise: Promise<any> | null = null;
32
33 async function getOpenapiPages() {
34 if (!_openapiPagesPromise) {
38 - _openapiPagesPromise = openapiSource(openapi, {
39 - groupBy: 'tag',
40 - baseDir: 'api-reference',
41 - });
35 + _openapiPagesPromise = Promise.all([
36 + openapiSource(openapi, { groupBy: 'tag', baseDir: 'api-reference' }),
37 + openapiSource(openapiV3, { groupBy: 'tag', baseDir: 'v3/api-reference' }),
38 + ]);
39 }
40 return _openapiPagesPromise;
41 }
42
43 export async function getReferenceSource() {
44 if (!_referenceSource) {
48 - const openapiPages = await getOpenapiPages();
45 + const [openapiLatest, openapiV3Pages] = await getOpenapiPages();
46 _referenceSource = loader({
47 baseUrl: '/reference',
48 source: multiple({
49 mdx: reference.toFumadocsSource(),
53 - openapi: openapiPages,
50 + openapi: openapiLatest,
51 + 'openapi-v3': openapiV3Pages,
52 }),
53 plugins: [lucideIconsPlugin(), openapiPlugin()],
54 pageTree: {
@@ -83,9 +81,6 @@ export const toolkitsSource = loader({
81
82 export const changelogEntries = changelog;
83
86 -/**
87 - * Generate OG image URL for any page section
88 - */
84 export function getOgImageUrl(_section: string, _slugs: string[], title?: string, _description?: string): string {
85 const encodedTitle = encodeURIComponent(title ?? 'Composio Docs');
86 return `https://og.composio.dev/api/og?title=${encodedTitle}`;
@@ -118,67 +113,49 @@ export function mdxToCleanMarkdown(content: string): string {
113 );
114
115 // Remove Cards wrapper before processing individual Card tags
121 - // (prevents <Cards> from being matched by <Card regex since <Cards starts with <Card)
116 result = result.replace(/<\/?Cards\b[^>]*>/g, '');
117
118 // Convert Card - handle multiline and various attribute orders
125 - // Self-closing Cards with description attribute
119 result = result.replace(
120 /<Card\b[\s\S]*?title="([^"]*)"[\s\S]*?href="([^"]*)"[\s\S]*?description="([^"]*)"[\s\S]*?\/>/g,
121 '- [$1]($2): $3'
122 );
130 - // Cards with children content (non-self-closing)
123 result = result.replace(
124 /<Card\b[\s\S]*?title="([^"]*)"[\s\S]*?href="([^"]*)"[\s\S]*?>([\s\S]*?)<\/Card>/g,
125 '- [$1]($2): $3'
126 );
135 - // Cards with href before title
127 result = result.replace(
128 /<Card\b[\s\S]*?href="([^"]*)"[\s\S]*?title="([^"]*)"[\s\S]*?>([\s\S]*?)<\/Card>/g,
129 '- [$2]($1): $3'
130 );
140 - // Convert ProviderCard to markdown link
131 result = result.replace(
132 /<ProviderCard[\s\S]*?name="([^"]*)"[\s\S]*?href="([^"]*)"[\s\S]*?languages=\{\[([^\]]*)\]\}[\s\S]*?\/>/g,
133 (_, name, href, langs) => `- [${name}](${href}) (${langs.replace(/"/g, '')})`
134 );
135
146 - // Strip orphaned indentation from converted list items
147 - // (Cards/ProviderCards nested inside wrapper components had JSX indentation that persists after wrapper removal)
136 result = result.replace(/^[ \t]+(- \[)/gm, '$1');
137
150 - // Convert Tabs/Tab content - keep inner content
138 result = result.replace(/<TabsList>[\s\S]*?<\/TabsList>/g, '');
139 result = result.replace(/<TabsTrigger[^>]*>[^<]*<\/TabsTrigger>/g, '');
140 result = result.replace(/<TabsContent[\s\S]*?value="([^"]*)"[\s\S]*?>([\s\S]*?)<\/TabsContent>/g, '\n**$1:**\n$2');
141 result = result.replace(/<Tab[\s\S]*?value="([^"]*)"[\s\S]*?>([\s\S]*?)<\/Tab>/g, '\n**$1:**\n$2');
142
156 - // Convert Steps/Step with StepTitle
157 - // Handle StepTitle with potential whitespace and multiline content
143 result = result.replace(/<StepTitle>([\s\S]*?)<\/StepTitle>/g, (_, title) => {
159 - // Clean up the title - remove extra whitespace and any # prefix fumadocs might add
144 const cleanTitle = title.replace(/^[\s#]*#\s*/, '').replace(/\s+$/, '').trim();
145 return cleanTitle ? `#### ${cleanTitle}` : '';
146 });
163 - // Handle <Step> with ### header pattern (legacy)
147 result = result.replace(/<Step>\s*###\s*(.+)/g, '#### $1');
165 - // Remove Steps wrapper and Step tags
148 result = result.replace(/<\/?Steps>/g, '');
149 result = result.replace(/<\/?Step>/g, '');
168 - // Clean up step titles that fumadocs converted to "# title" format
169 - // These appear as "#### # Title" after our processing, fix to "#### Title"
150 result = result.replace(/^(\s*#{1,6})\s*#\s+(.+)$/gm, '$1 $2');
171 - // Clean up any standalone # that fumadocs might leave
151 result = result.replace(/^\s*#\s*$/gm, '');
152
174 - // Convert FrameworkOption to header with framework name
153 result = result.replace(
154 /<FrameworkOption[\s\S]*?name="([^"]*)"[\s\S]*?>/g,
155 '\n## $1\n'
156 );
157 result = result.replace(/<\/FrameworkOption>/g, '');
158
181 - // Convert IntegrationTabs — extract label from tabs prop if present
159 const tabLabelMap: Record<string, string> = { native: 'Native Tools', mcp: 'MCP' };
160 result = result.replace(
161 /<IntegrationTabs[\s\S]*?tabs=\{\[([\s\S]*?)\]\}[\s\S]*?>/g,
@@ -191,64 +168,53 @@ export function mdxToCleanMarkdown(content: string): string {
168 return '\n> Choose your integration type · [Use this guide to decide](/docs/native-tools-vs-mcp)\n';
169 }
170 );
194 - // Also handle IntegrationTabs without explicit tabs prop
171 result = result.replace(
172 /<IntegrationTabs(?![^>]*tabs=)[\s\S]*?>/g,
173 '\n> Choose your integration type · [Use this guide to decide](/docs/native-tools-vs-mcp)\n'
174 );
175
200 - // Convert IntegrationContent to labeled section
176 result = result.replace(
177 /<IntegrationContent[\s\S]*?value="([^"]*)"[\s\S]*?>/g,
178 (_, value: string) => `\n### ${tabLabelMap[value] || value}\n`
179 );
180 result = result.replace(/<\/IntegrationContent>/g, '');
181
207 - // Convert Accordion to collapsible-style text
182 result = result.replace(
183 /<Accordion[\s\S]*?title="([^"]*)"[\s\S]*?>([\s\S]*?)<\/Accordion>/g,
184 '\n**$1**\n$2'
185 );
186
213 - // Convert Figure to markdown image with caption
187 result = result.replace(
188 /<Figure[\s\S]*?src="([^"]*)"[\s\S]*?alt="([^"]*)"[\s\S]*?caption="([^"]*)"[\s\S]*?\/>/g,
189 '![$2]($1)\n*$3*'
190 );
218 - // Figure without caption
191 result = result.replace(
192 /<Figure[\s\S]*?src="([^"]*)"[\s\S]*?alt="([^"]*)"[\s\S]*?\/>/g,
193 '![$2]($1)'
194 );
195
224 - // Convert ToolTypeOption to labeled section (similar to IntegrationContent)
196 result = result.replace(
197 /<ToolTypeOption[\s\S]*?name="([^"]*)"[\s\S]*?>/g,
198 '\n### $1\n'
199 );
200 result = result.replace(/<\/ToolTypeOption>/g, '');
201
231 - // Convert TemplateCard to markdown link with description
202 result = result.replace(
203 /<TemplateCard[\s\S]*?title="([^"]*)"[\s\S]*?description="([^"]*)"[\s\S]*?href="([^"]*)"[\s\S]*?\/>/g,
204 '- [$1]($3): $2'
205 );
236 - // TemplateCard with href before title
206 result = result.replace(
207 /<TemplateCard[\s\S]*?href="([^"]*)"[\s\S]*?title="([^"]*)"[\s\S]*?description="([^"]*)"[\s\S]*?\/>/g,
208 '- [$2]($1): $3'
209 );
210
242 - // Convert GlossaryTerm to heading + definition
211 result = result.replace(
212 /<GlossaryTerm[\s\S]*?name="([^"]*)"[\s\S]*?>([\s\S]*?)<\/GlossaryTerm>/g,
213 (_, name, content) => `### ${name}\n\n${content.trim()}`
214 );
215
248 - // Strip PromptBanner and its children (UI-only copy-prompt widget)
216 result = result.replace(/<PromptBanner[\s\S]*?<\/PromptBanner>/g, '');
217
251 - // Convert AIToolsBanner to plain text
218 result = result.replace(
219 /<AIToolsBanner\s*\/>/g,
220 '### For AI tools\n\n' +
@@ -263,29 +229,16 @@ export function mdxToCleanMarkdown(content: string): string {
229 '- [llms-full.txt](/llms-full.txt) — Complete documentation in one file'
230 );
231
266 - // Convert ConnectClientOption opening tags to headings for LLM output
232 result = result.replace(
233 /<ConnectClientOption[^>]*\bname="([^"]*)"[^>]*>/g,
234 (_, name) => `## ${name}\n`
235 );
236
272 - // Remove wrapper components (ProviderGrid, Tabs, Frame, div, QuickstartFlow, IntegrationTabs, Accordions, ToolTypeFlow, ToolkitsLanding, TemplateGrid, etc.)
273 - // Note: Cards wrapper is removed earlier (before Card conversion) to prevent regex conflicts
237 result = result.replace(/<\/?(ProviderGrid|Tabs|Frame|div|QuickstartFlow|IntegrationTabs|Accordions|ToolTypeFlow|ToolkitsLanding|TemplateGrid|Glossary|ConnectFlow|ConnectClientOption)[^>]*>/g, '');
238
276 - // Remove remaining self-closing JSX tags (including those with JSX expressions)
239 result = result.replace(/<[A-Z][a-zA-Z]*[\s\S]*?\/>/g, '');
278 -
279 - // Remove remaining JSX opening/closing tags but keep content
240 result = result.replace(/<\/?[A-Z][a-zA-Z]*[^>]*>/g, '');
241
282 - // Note: lone brace cleanup is done inside the code-block-aware loop below
283 - // to avoid stripping { and } from JSON code blocks.
284 -
285 - // Normalize indentation while preserving markdown structure
286 - // - Code blocks: normalize by stripping common indentation prefix
287 - // - Nested lists/blockquotes: preserve relative indentation
288 - // - Other content: remove excessive leading whitespace from JSX nesting
242 const lines = result.split('\n');
243 const normalizedLines: string[] = [];
244 let inCodeBlock = false;
@@ -293,12 +246,10 @@ export function mdxToCleanMarkdown(content: string): string {
246
247 const flushCodeBlock = () => {
248 if (codeBlockLines.length > 0) {
296 - // Find minimum indentation (ignoring empty lines)
249 const nonEmptyLines = codeBlockLines.filter(l => l.trim().length > 0);
250 const minIndent = nonEmptyLines.length > 0
251 ? Math.min(...nonEmptyLines.map(l => l.match(/^(\s*)/)?.[1]?.length || 0))
252 : 0;
301 - // Strip common indentation
253 for (const codeLine of codeBlockLines) {
254 normalizedLines.push(codeLine.slice(minIndent));
255 }
@@ -309,71 +260,51 @@ export function mdxToCleanMarkdown(content: string): string {
260 for (const line of lines) {
261 if (line.trim().startsWith('```')) {
262 if (inCodeBlock) {
312 - // End of code block - normalize and flush
263 flushCodeBlock();
264 inCodeBlock = false;
265 normalizedLines.push(line.trim());
266 } else {
317 - // Start of code block
267 inCodeBlock = true;
268 normalizedLines.push(line.trim());
269 }
270 } else if (inCodeBlock) {
271 codeBlockLines.push(line);
272 } else {
324 - // Outside code blocks - smart whitespace handling
273 const trimmedLine = line.trimStart();
326 - // Clean up leftover JSX artifacts like lone } or { (only outside code blocks)
274 if (/^\s*[{}]\s*$/.test(line)) {
275 continue;
276 }
330 - // Preserve indentation for markdown list items (but not blockquotes at root level)
277 if (trimmedLine.match(/^[-*+]\s/) || trimmedLine.match(/^\d+\.\s/)) {
332 - // For list items, normalize to 2-space indentation levels
278 const leadingSpaces = line.length - trimmedLine.length;
279 const indentLevel = Math.floor(leadingSpaces / 2);
335 - const normalizedIndent = ' '.repeat(Math.min(indentLevel, 4)); // Cap at 4 levels
280 + const normalizedIndent = ' '.repeat(Math.min(indentLevel, 4));
281 normalizedLines.push(normalizedIndent + trimmedLine);
282 } else {
338 - // For other content (including blockquotes), remove excessive leading whitespace
283 normalizedLines.push(trimmedLine);
284 }
285 }
286 }
287
344 - // Handle unclosed code block - flush any remaining content
288 if (inCodeBlock) {
289 flushCodeBlock();
290 }
291
292 result = normalizedLines.join('\n');
350 -
351 - // Clean up excessive newlines
293 result = result.replace(/\n{3,}/g, '\n\n');
353 -
354 - // Strip twoslash annotations ONLY inside code blocks (used for type-checking, not useful for AI)
355 - // These include: // ---cut---, // @errors, // ^?, // @noErrors, etc.
294 result = stripTwoslashFromCodeBlocks(result);
295
296 return result.trim();
297 }
298
361 -/**
362 - * Strip twoslash annotations only from inside code blocks.
363 - * This ensures we don't accidentally modify prose content.
364 - */
299 function stripTwoslashFromCodeBlocks(content: string): string {
366 - // Match code blocks: ```lang ... ```
300 return content.replace(/(```[\w]*\n)([\s\S]*?)(```)/g, (match, open, code, close) => {
301 let cleanCode = code;
369 - // Remove twoslash directives
302 cleanCode = cleanCode.replace(/^\/\/\s*---cut---.*\n?/gm, '');
303 cleanCode = cleanCode.replace(/^\/\/\s*@errors?:.*\n?/gm, '');
304 cleanCode = cleanCode.replace(/^\/\/\s*@noErrors.*\n?/gm, '');
305 cleanCode = cleanCode.replace(/^\/\/\s*@filename:.*\n?/gm, '');
306 cleanCode = cleanCode.replace(/^\/\/\s*@highlight.*\n?/gm, '');
375 - cleanCode = cleanCode.replace(/^\/\/\s*\^[\?\!].*\n?/gm, ''); // ^? and ^! hover annotations
376 - // Clean up resulting empty lines at start of code block
307 + cleanCode = cleanCode.replace(/^\/\/\s*\^[\?\!].*\n?/gm, '');
308 cleanCode = cleanCode.replace(/^\n+/, '');
309 return open + cleanCode + close;
310 });
@@ -382,15 +313,12 @@ function stripTwoslashFromCodeBlocks(content: string): string {
313 export async function getLLMText(page: InferPageType<typeof source>, options?: { includeFooter?: boolean; includeGuardrails?: boolean }) {
314 const includeFooter = options?.includeFooter ?? true;
315 const includeGuardrails = options?.includeGuardrails ?? true;
385 - // Fall back to description if getText is not available
316 if (typeof page.data.getText !== 'function') {
317 return `# ${page.data.title} (${page.url})
318
319 ${page.data.description || ''}`;
320 }
321
392 - // Try 'processed' mode first (works in serverless), then 'raw' (works locally)
393 - // Both can fail in different environments, so handle gracefully
322 let content: string | null = null;
323
324 try {
@@ -410,9 +338,6 @@ ${page.data.description || ''}`;
338 ${page.data.description || ''}`;
339 }
340
413 - // Split content at Mermaid tags, process each segment separately, then rejoin
414 - // with mermaid code blocks. This prevents JSX regexes with [\s\S]*? from
415 - // matching across mermaid boundaries and consuming diagram content.
341 const mermaidRegex = /<Mermaid\s+chart="([\s\S]*?)"\s*\/>/g;
342 const segments: string[] = [];
343 const mermaidCharts: string[] = [];
@@ -429,7 +354,6 @@ ${page.data.description || ''}`;
354 const cleanSegments = segments.map(s => mdxToCleanMarkdown(s));
355 let cleanContent = cleanSegments[0];
356 for (let i = 0; i < mermaidCharts.length; i++) {
432 - // Decode HTML entities that fumadocs encodes in JSX attributes
357 const chart = mermaidCharts[i].replace(/&#x22;/g, '"').replace(/&#x27;/g, "'").replace(/&amp;/g, '&');
358 cleanContent += `\n\n\`\`\`mermaid\n${chart}\n\`\`\`\n\n${cleanSegments[i + 1]}`;
359 }
@@ -446,7 +370,6 @@ ${cleanContent}${footer}${guardrails}`;
370 }
371
372 export function formatDate(dateStr: string): string {
449 - // Add T12:00 to avoid UTC midnight timezone shift
373 return new Date(`${dateStr}T12:00:00`).toLocaleDateString('en-US', {
374 year: 'numeric',
375 month: 'short',
@@ -465,21 +388,18 @@ function validateDateFormat(dateStr: string): void {
388 }
389
390 export function dateToChangelogUrl(dateStr: string): string {
468 - // Convert "2025-12-29" to "/docs/changelog/2025/12/29"
391 validateDateFormat(dateStr);
392 const [year, month, day] = dateStr.split('-');
393 return `/docs/changelog/${year}/${month}/${day}`;
394 }
395
396 export function dateToSlug(dateStr: string): string[] {
475 - // Convert "2025-12-29" to ["2025", "12", "29"]
397 validateDateFormat(dateStr);
398 const [year, month, day] = dateStr.split('-');
399 return [year, month, day];
400 }
401
402 export function slugToDate(slug: string[]): string | null {
482 - // Convert ["2025", "12", "29"] to "2025-12-29"
403 if (slug.length !== 3) return null;
404 const [year, month, day] = slug;
405 return `${year}-${month}-${day}`;
docs/lib/use-api-version.ts new
+12
@@ -0,0 +1,12 @@
1 +'use client';
2 +
3 +import { usePathname } from 'next/navigation';
4 +import { detectApiVersion, type ApiVersion } from './api-version';
5 +
6 +/**
7 + * Client hook that returns the current API version based on the URL path.
8 + */
9 +export function useApiVersion(): ApiVersion {
10 + const pathname = usePathname();
11 + return detectApiVersion(pathname);
12 +}
docs/mdx-components.tsx
+4
@@ -24,6 +24,8 @@ import { ManagedAuthList } from '@/components/toolkits/managed-auth-list';
24 import { Mermaid } from '@/components/mermaid';
25 import { AIToolsBanner } from '@/components/ai-tools-banner';
26 import { Glossary, GlossaryTerm } from '@/components/glossary';
27 +import { ApiBaseUrl } from '@/components/api-base-url';
28 +import { ApiEndpointsTable } from '@/components/api-endpoints-table';
29 import {
30 ShieldCheck,
31 Route as RouteIcon,
@@ -99,6 +101,8 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
101 StepTitle,
102 Glossary,
103 GlossaryTerm,
104 + ApiBaseUrl,
105 + ApiEndpointsTable,
106 // Lucide icons
107 ShieldCheck,
108 RouteIcon,
docs/proxy.ts
+15 -8
@@ -11,6 +11,7 @@ function kebabToCamel(str: string): string {
11 * Proxy handles:
12 * 1. Markdown content negotiation for AI agents (Accept: text/markdown)
13 * 2. Redirects for old Fern API reference URLs (kebab-case → camelCase)
14 + * 3. Sets x-pathname header for 404 logging
15 */
16 export function proxy(request: NextRequest) {
17 const { pathname } = request.nextUrl;
@@ -23,18 +24,24 @@ export function proxy(request: NextRequest) {
24 }
25
26 // Handle old Fern API reference URLs (kebab-case → camelCase)
26 - // Example: /reference/api-reference/tools/get-tools → /reference/api-reference/tools/getTools
27 - if (pathname.startsWith('/reference/api-reference/')) {
28 - const segments = pathname.split('/');
29 -
30 - // Convert kebab-case segments to camelCase (only operation IDs after index 3)
31 - // Structure: /reference/api-reference/{tag}/{operationId}
27 + // v3.1: /reference/api-reference/{tag}/{operationId}
28 + // v3.0: /reference/v3/api-reference/{tag}/{operationId}
29 + const apiRefPrefix = pathname.startsWith('/reference/v3/api-reference/')
30 + ? '/reference/v3/api-reference/'
31 + : pathname.startsWith('/reference/api-reference/')
32 + ? '/reference/api-reference/'
33 + : null;
34 +
35 + if (apiRefPrefix) {
36 + const rest = pathname.slice(apiRefPrefix.length);
37 + const segments = rest.split('/');
38 + // segments[0] = tag, segments[1+] = operationId parts — only camelCase the operationId
39 const newSegments = segments.map((segment, index) => {
33 - if (index <= 3) return segment; // Keep /reference/api-reference/{tag} as-is
40 + if (index === 0) return segment; // keep tag as-is
41 return kebabToCamel(segment);
42 });
43
37 - const newPathname = newSegments.join('/');
44 + const newPathname = apiRefPrefix + newSegments.join('/');
45 if (newPathname !== pathname) {
46 const url = request.nextUrl.clone();
47 url.pathname = newPathname;
docs/public/openapi-v3.json new
+19271
@@ -0,0 +1,19271 @@
1 +{
2 + "openapi": "3.0.0",
3 + "info": {
4 + "version": "3.0.0",
5 + "title": "Composio Platform API",
6 + "description": "",
7 + "contact": {
8 + "name": "Composio Support",
9 + "url": "https://composio.dev/support",
10 + "email": "support@composio.dev"
11 + },
12 + "license": {
13 + "name": "Proprietary",
14 + "url": "https://composio.dev/terms"
15 + }
16 + },
17 + "servers": [
18 + {
19 + "url": "https://backend.composio.dev",
20 + "description": "PRODUCTION API"
21 + }
22 + ],
23 + "tags": [
24 + {
25 + "name": "Authentication",
26 + "description": "Authentication related endpoints"
27 + },
28 + {
29 + "name": "Auth Configs",
30 + "description": "Authentication configuration management"
31 + },
32 + {
33 + "name": "Connected Accounts",
34 + "description": "Connected account management"
35 + },
36 + {
37 + "name": "Logs",
38 + "description": "Logging and monitoring"
39 + },
40 + {
41 + "name": "OpenAPI",
42 + "description": "OpenAPI specification management"
43 + },
44 + {
45 + "name": "Organization",
46 + "description": "Organization management"
47 + },
48 + {
49 + "name": "API Keys",
50 + "description": "API key management"
51 + },
52 + {
53 + "name": "Webhooks",
54 + "description": "Webhook configuration"
55 + },
56 + {
57 + "name": "Team",
58 + "description": "Team member management"
59 + },
60 + {
61 + "name": "Toolkits",
62 + "description": "Toolkit and tool management"
63 + },
64 + {
65 + "name": "Tools",
66 + "description": "Tool execution endpoints"
67 + },
68 + {
69 + "name": "Recipes",
70 + "description": "Recipe management and execution. Recipes are reusable code modules that combine multiple tools."
71 + },
72 + {
73 + "name": "Triggers",
74 + "description": "Trigger management and execution"
75 + },
76 + {
77 + "name": "Payments",
78 + "description": "Payment and subscription management"
79 + },
80 + {
81 + "name": "Files",
82 + "description": "File management"
83 + },
84 + {
85 + "name": "MCP",
86 + "description": "MCP server management"
87 + },
88 + {
89 + "name": "Migration",
90 + "description": "Endpoints to help with migration from v1 to v3"
91 + },
92 + {
93 + "name": "MCP Partner",
94 + "description": "MCP partner management"
95 + },
96 + {
97 + "name": "Recipe",
98 + "description": "Recipe endpoints"
99 + },
100 + {
101 + "name": "Tool Router",
102 + "description": "(Labs) Tool router endpoints"
103 + }
104 + ],
105 + "components": {
106 + "securitySchemes": {
107 + "ApiKeyAuth": {
108 + "type": "apiKey",
109 + "in": "header",
110 + "name": "x-api-key",
111 + "description": "Project API key authentication"
112 + },
113 + "UserApiKeyAuth": {
114 + "type": "apiKey",
115 + "in": "header",
116 + "name": "x-user-api-key",
117 + "description": "User API key authentication"
118 + },
119 + "OrgApiKeyAuth": {
120 + "type": "apiKey",
121 + "in": "header",
122 + "name": "x-org-api-key",
123 + "description": "Organization API key authentication"
124 + }
125 + },
126 + "schemas": {
127 + "Error": {
128 + "type": "object",
129 + "properties": {
130 + "error": {
131 + "type": "object",
132 + "properties": {
133 + "message": {
134 + "type": "string"
135 + },
136 + "code": {
137 + "type": "number"
138 + },
139 + "slug": {
140 + "type": "string"
141 + },
142 + "status": {
143 + "type": "number"
144 + },
145 + "request_id": {
146 + "type": "string"
147 + },
148 + "suggested_fix": {
149 + "type": "string"
150 + },
151 + "errors": {
152 + "type": "array",
153 + "items": {
154 + "type": "string"
155 + }
156 + }
157 + },
158 + "required": [
159 + "message",
160 + "code",
161 + "slug",
162 + "status"
163 + ]
164 + }
165 + },
166 + "required": [
167 + "error"
168 + ]
169 + },
170 + "PatchConnectedAccountBody": {
171 + "type": "object",
172 + "properties": {
173 + "alias": {
174 + "type": "string",
175 + "description": "A human-readable alias for this connected account. Pass an empty string to clear the alias. Must be unique per entity and toolkit within the project."
176 + },
177 + "connection": {
178 + "type": "object",
179 + "properties": {
180 + "state": {
181 + "type": "object",
182 + "properties": {
183 + "authScheme": {
184 + "type": "string",
185 + "enum": [
186 + "BEARER_TOKEN",
187 + "API_KEY",
188 + "BASIC",
189 + "BASIC_WITH_JWT",
190 + "GOOGLE_SERVICE_ACCOUNT",
191 + "SERVICE_ACCOUNT"
192 + ],
193 + "description": "The auth scheme of the connected account. Must match the connection's actual auth scheme."
194 + },
195 + "val": {
196 + "type": "object",
197 + "properties": {
198 + "subdomain": {
199 + "type": "string",
200 + "nullable": true
201 + },
202 + "your-domain": {
203 + "type": "string",
204 + "nullable": true
205 + },
206 + "region": {
207 + "type": "string",
208 + "nullable": true
209 + },
210 + "shop": {
211 + "type": "string",
212 + "nullable": true
213 + },
214 + "account_url": {
215 + "type": "string",
216 + "nullable": true
217 + },
218 + "COMPANYDOMAIN": {
219 + "type": "string",
220 + "nullable": true
221 + },
222 + "extension": {
223 + "type": "string",
224 + "nullable": true
225 + },
226 + "form_api_base_url": {
227 + "type": "string",
228 + "nullable": true
229 + },
230 + "instanceEndpoint": {
231 + "type": "string",
232 + "nullable": true
233 + },
234 + "api_url": {
235 + "type": "string",
236 + "nullable": true
237 + },
238 + "borneo_dashboard_url": {
239 + "type": "string",
240 + "nullable": true
241 + },
242 + "proxy_username": {
243 + "type": "string",
244 + "nullable": true
245 + },
246 + "proxy_password": {
247 + "type": "string",
248 + "nullable": true
249 + },
250 + "domain": {
251 + "type": "string",
252 + "nullable": true
253 + },
254 + "version": {
255 + "type": "string",
256 + "nullable": true
257 + },
258 + "dc": {
259 + "type": "string",
260 + "nullable": true
261 + },
262 + "site_name": {
263 + "type": "string",
264 + "nullable": true
265 + },
266 + "instanceName": {
267 + "type": "string",
268 + "nullable": true
269 + },
270 + "account_id": {
271 + "type": "string",
272 + "nullable": true
273 + },
274 + "your_server": {
275 + "type": "string",
276 + "nullable": true
277 + },
278 + "server_location": {
279 + "type": "string",
280 + "nullable": true
281 + },
282 + "base_url": {
283 + "type": "string",
284 + "nullable": true
285 + },
286 + "token": {
287 + "type": "string",
288 + "nullable": true
289 + },
290 + "generic_api_key": {
291 + "type": "string",
292 + "nullable": true
293 + },
294 + "api_key": {
295 + "type": "string",
296 + "nullable": true
297 + },
298 + "bearer_token": {
299 + "type": "string",
300 + "nullable": true
301 + },
302 + "basic_encoded": {
303 + "type": "string",
304 + "nullable": true
305 + },
306 + "username": {
307 + "type": "string",
308 + "nullable": true
309 + },
310 + "password": {
311 + "type": "string",
312 + "nullable": true
313 + },
314 + "credentials_json": {
315 + "type": "string",
316 + "nullable": true
317 + },
318 + "application_id": {
319 + "type": "string",
320 + "nullable": true
321 + },
322 + "installation_id": {
323 + "type": "string",
324 + "nullable": true
325 + },
326 + "private_key": {
327 + "type": "string",
328 + "nullable": true
329 + }
330 + },
331 + "additionalProperties": {},
332 + "description": "Credential fields to update. Only provided fields are changed — omitted fields are preserved. Set a field to null to remove it."
333 + }
334 + },
335 + "required": [
336 + "authScheme",
337 + "val"
338 + ]
339 + }
340 + },
341 + "required": [
342 + "state"
343 + ]
344 + }
345 + }
346 + },
347 + "DeprecatedToolkitInfo": {
348 + "type": "object",
349 + "properties": {
350 + "toolkitId": {
351 + "type": "string"
352 + }
353 + },
354 + "required": [
355 + "toolkitId"
356 + ],
357 + "description": "Deprecated toolkit ID",
358 + "deprecated": true,
359 + "example": {
360 + "toolkitId": "550e8400-e29b-41d4-a716-446655440000"
361 + }
362 + },
363 + "Tool": {
364 + "type": "object",
365 + "properties": {
366 + "slug": {
367 + "type": "string",
368 + "description": "Unique identifier for the tool",
369 + "example": "GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT"
370 + },
371 + "name": {
372 + "type": "string",
373 + "description": "Human-readable display name of the tool",
374 + "example": "GitHub Actions"
375 + },
376 + "description": {
377 + "type": "string",
378 + "description": "Detailed explanation of the tool's functionality and purpose",
379 + "example": "Automate GitHub workflows including CI/CD, issue management, and release processes"
380 + },
381 + "toolkit": {
382 + "type": "object",
383 + "properties": {
384 + "slug": {
385 + "type": "string",
386 + "description": "Unique identifier of the parent toolkit",
387 + "example": "github"
388 + },
389 + "name": {
390 + "type": "string",
391 + "description": "Human-readable name of the parent toolkit",
392 + "example": "GitHub"
393 + },
394 + "logo": {
395 + "type": "string",
396 + "description": "URL to the toolkit logo image",
397 + "example": "https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png"
398 + }
399 + },
400 + "required": [
401 + "slug",
402 + "name",
403 + "logo"
404 + ]
405 + },
406 + "input_parameters": {
407 + "type": "object",
408 + "additionalProperties": {},
409 + "description": "Schema definition of required input parameters for the tool",
410 + "example": {
411 + "repo_name": {
412 + "type": "string",
413 + "description": "GitHub repository name in owner/repo format",
414 + "required": true,
415 + "example": "octocat/Hello-World"
416 + },
417 + "workflow_id": {
418 + "type": "string",
419 + "description": "ID or filename of the workflow to trigger",
420 + "required": true,
421 + "example": "main.yml"
422 + }
423 + }
424 + },
425 + "no_auth": {
426 + "type": "boolean",
427 + "description": "Indicates if the tool can be used without authentication",
428 + "example": false
429 + },
430 + "available_versions": {
431 + "type": "array",
432 + "items": {
433 + "type": "string"
434 + },
435 + "description": "List of all available versions for this tool",
436 + "example": [
437 + "20250905_00",
438 + "20250906_00"
439 + ]
440 + },
441 + "version": {
442 + "type": "string",
443 + "description": "Current version of the tool",
444 + "example": "20250905_00"
445 + },
446 + "output_parameters": {
447 + "type": "object",
448 + "additionalProperties": {},
449 + "description": "Schema definition of return values from the tool",
450 + "example": {
451 + "run_id": {
452 + "type": "number",
453 + "description": "ID of the workflow run that was triggered",
454 + "example": 12345678
455 + },
456 + "status": {
457 + "type": "string",
458 + "description": "Status of the workflow run",
459 + "example": "completed",
460 + "enum": [
461 + "queued",
462 + "in_progress",
463 + "completed",
464 + "failed"
465 + ]
466 + }
467 + }
468 + },
469 + "scopes": {
470 + "type": "array",
471 + "items": {
472 + "type": "string"
473 + },
474 + "description": "List of scopes associated with the tool",
475 + "example": [
476 + "https://www.googleapis.com/auth/gmail.modify"
477 + ]
478 + },
479 + "scope_requirements": {
480 + "type": "object",
481 + "nullable": true,
482 + "properties": {
483 + "all_of": {
484 + "type": "array",
485 + "items": {
486 + "anyOf": [
487 + {
488 + "type": "string"
489 + },
490 + {
491 + "type": "object",
492 + "properties": {
493 + "any_of": {
494 + "type": "array",
495 + "items": {
496 + "type": "string"
497 + },
498 + "minItems": 1
499 + }
500 + },
501 + "required": [
502 + "any_of"
503 + ]
504 + }
505 + ]
506 + }
507 + }
508 + },
509 + "required": [
510 + "all_of"
511 + ],
512 + "description": "Structured scope requirements for the tool. Null means the tool is legacy and only exposes flat scopes.",
513 + "example": {
514 + "all_of": [
515 + "read:user",
516 + {
517 + "any_of": [
518 + "repo",
519 + "public_repo"
520 + ]
521 + }
522 + ]
523 + }
524 + },
525 + "tags": {
526 + "type": "array",
527 + "items": {
528 + "type": "string"
529 + },
530 + "description": "List of tags associated with the tool for categorization and filtering",
531 + "example": [
532 + "ci-cd",
533 + "github",
534 + "automation",
535 + "devops"
536 + ]
537 + },
538 + "human_description": {
539 + "type": "string",
540 + "description": "Human-friendly description of the tool, if available",
541 + "example": "Create a new issue in a GitHub repository"
542 + },
543 + "is_deprecated": {
544 + "type": "boolean",
545 + "description": "Indicates if this tool is deprecated and may be removed in the future",
546 + "example": false
547 + },
548 + "deprecated": {
549 + "type": "object",
550 + "properties": {
551 + "displayName": {
552 + "type": "string",
553 + "description": "The display name of the tool",
554 + "example": "GitHub Actions"
555 + },
556 + "version": {
557 + "type": "string",
558 + "description": "Current version identifier of the tool",
559 + "example": "20250905_00"
560 + },
561 + "available_versions": {
562 + "type": "array",
563 + "items": {
564 + "type": "string"
565 + },
566 + "description": "List of all available versions for this tool",
567 + "example": [
568 + "20250905_00",
569 + "20250906_00"
570 + ]
571 + },
572 + "is_deprecated": {
573 + "type": "boolean",
574 + "description": "Indicates if this tool is deprecated and may be removed in the future",
575 + "example": false
576 + },
577 + "toolkit": {
578 + "type": "object",
579 + "properties": {
580 + "logo": {
581 + "type": "string",
582 + "description": "URL to the toolkit logo image",
583 + "example": "https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png"
584 + }
585 + },
586 + "required": [
587 + "logo"
588 + ]
589 + }
590 + },
591 + "required": [
592 + "displayName",
593 + "version",
594 + "available_versions",
595 + "is_deprecated",
596 + "toolkit"
597 + ]
598 + }
599 + },
600 + "required": [
601 + "slug",
602 + "name",
603 + "description",
604 + "toolkit",
605 + "input_parameters",
606 + "no_auth",
607 + "available_versions",
608 + "version",
609 + "output_parameters",
610 + "scopes",
611 + "scope_requirements",
612 + "tags",
613 + "is_deprecated",
614 + "deprecated"
615 + ]
616 + },
617 + "ToolsPaginated": {
618 + "type": "object",
619 + "properties": {
620 + "items": {
621 + "type": "array",
622 + "items": {
623 + "$ref": "#/components/schemas/Tool"
624 + }
625 + },
626 + "next_cursor": {
627 + "type": "string",
628 + "nullable": true
629 + },
630 + "total_pages": {
631 + "type": "number"
632 + },
633 + "current_page": {
634 + "type": "number"
635 + },
636 + "total_items": {
637 + "type": "number"
638 + }
639 + },
640 + "required": [
641 + "items",
642 + "total_pages",
643 + "current_page",
644 + "total_items"
645 + ]
646 + },
647 + "ToolRouterToolkitsListResponse": {
648 + "type": "object",
649 + "properties": {
650 + "items": {
651 + "type": "array",
652 + "items": {
653 + "type": "object",
654 + "properties": {
655 + "name": {
656 + "type": "string",
657 + "description": "Display name of the toolkit"
658 + },
659 + "slug": {
660 + "type": "string",
661 + "description": "Unique slug identifier"
662 + },
663 + "enabled": {
664 + "type": "boolean",
665 + "description": "Whether the toolkit is enabled"
666 + },
667 + "is_no_auth": {
668 + "type": "boolean",
669 + "description": "Whether the toolkit is no-auth"
670 + },
671 + "composio_managed_auth_schemes": {
672 + "type": "array",
673 + "items": {
674 + "type": "string"
675 + },
676 + "description": "Available Composio-managed auth schemes"
677 + },
678 + "meta": {
679 + "type": "object",
680 + "properties": {
681 + "logo": {
682 + "type": "string",
683 + "format": "uri",
684 + "description": "URL to the toolkit logo"
685 + },
686 + "description": {
687 + "type": "string",
688 + "description": "Description of the toolkit"
689 + }
690 + },
691 + "required": [
692 + "logo",
693 + "description"
694 + ],
695 + "description": "Toolkit metadata"
696 + },
697 + "connected_account": {
698 + "type": "object",
699 + "nullable": true,
700 + "properties": {
701 + "id": {
702 + "type": "string",
703 + "format": "connectedAccountId",
704 + "description": "Connected account identifier"
705 + },
706 + "user_id": {
707 + "type": "string",
708 + "description": "User identifier"
709 + },
710 + "status": {
711 + "type": "string",
712 + "description": "Connection status"
713 + },
714 + "created_at": {
715 + "type": "string",
716 + "format": "date-time",
717 + "description": "Creation timestamp"
718 + },
719 + "auth_config": {
720 + "type": "object",
721 + "properties": {
722 + "id": {
723 + "type": "string",
724 + "description": "Auth config identifier"
725 + },
726 + "auth_scheme": {
727 + "type": "string",
728 + "description": "Authentication scheme type"
729 + },
730 + "is_composio_managed": {
731 + "type": "boolean",
732 + "description": "Whether this is a Composio-managed auth config"
733 + }
734 + },
735 + "required": [
736 + "id",
737 + "auth_scheme",
738 + "is_composio_managed"
739 + ],
740 + "description": "Auth config details"
741 + }
742 + },
743 + "required": [
744 + "id",
745 + "user_id",
746 + "status",
747 + "created_at",
748 + "auth_config"
749 + ],
750 + "description": "Connected account if available"
751 + }
752 + },
753 + "required": [
754 + "name",
755 + "slug",
756 + "enabled",
757 + "is_no_auth",
758 + "composio_managed_auth_schemes",
759 + "meta",
760 + "connected_account"
761 + ]
762 + }
763 + },
764 + "next_cursor": {
765 + "type": "string",
766 + "nullable": true
767 + },
768 + "total_pages": {
769 + "type": "number"
770 + },
771 + "current_page": {
772 + "type": "number"
773 + },
774 + "total_items": {
775 + "type": "number"
776 + }
777 + },
778 + "required": [
779 + "items",
780 + "total_pages",
781 + "current_page",
782 + "total_items"
783 + ]
784 + }
785 + },
786 + "parameters": {}
787 + },
788 + "paths": {
789 + "/api/v3/auth/session/info": {
790 + "get": {
791 + "summary": "Get current user session information",
792 + "description": "Retrieves detailed information about the current authenticated user session, including project details, organization membership, and API key information if applicable. This endpoint is useful for verifying authentication status and retrieving contextual information about the authenticated user and their access privileges.",
793 + "tags": [
794 + "Authentication"
795 + ],
796 + "operationId": "getAuthSessionInfo",
797 + "security": [
798 + {
799 + "ApiKeyAuth": []
800 + },
801 + {
802 + "UserApiKeyAuth": []
803 + }
804 + ],
805 + "responses": {
806 + "200": {
807 + "description": "Session is valid and active. Returns detailed information about the authenticated user, their project, and organization.",
808 + "content": {
809 + "application/json": {
810 + "schema": {
811 + "type": "object",
812 + "properties": {
813 + "project": {
814 + "type": "object",
815 + "nullable": true,
816 + "properties": {
817 + "auto_id": {
818 + "type": "number",
819 + "description": "Internal auto-incrementing ID for the project",
820 + "example": 12345
821 + },
822 + "id": {
823 + "type": "string",
824 + "description": "UUID identifier for the project",
825 + "example": "550e8400-e29b-41d4-a716-446655440000"
826 + },
827 + "org_id": {
828 + "type": "string",
829 + "description": "Organization UUID that this project belongs to",
830 + "example": "550e8400-e29b-41d4-a716-446655440001"
831 + },
832 + "name": {
833 + "type": "string",
834 + "description": "User-defined name for the project",
835 + "example": "Production API"
836 + },
837 + "email": {
838 + "type": "string",
839 + "description": "Email address used for project notifications",
840 + "example": "project-123@composio.dev"
841 + },
842 + "nano_id": {
843 + "type": "string",
844 + "format": "projectId",
845 + "description": "Short, URL-friendly unique identifier for the project",
846 + "example": "proj_abc123xyz456"
847 + },
848 + "created_at": {
849 + "type": "string",
850 + "description": "Date and time when the project was created",
851 + "example": "2023-05-16T14:30:00.000Z"
852 + },
853 + "updated_at": {
854 + "type": "string",
855 + "description": "Date and time when the project was last modified",
856 + "example": "2023-05-18T09:15:30.000Z"
857 + },
858 + "webhook_url": {
859 + "type": "string",
860 + "nullable": true,
861 + "description": "Endpoint URL for trigger webhook notifications",
862 + "example": "https://example.com/webhook"
863 + },
864 + "event_webhook_url": {
865 + "type": "string",
866 + "nullable": true,
867 + "description": "Endpoint URL for event webhook notifications",
868 + "example": "https://example.com/events"
869 + },
870 + "webhook_secret": {
871 + "type": "string",
872 + "nullable": true,
873 + "description": "Secret used to verify webhook signatures",
874 + "example": "whsec_a1b2c3d4e5f6g7h8i9j0"
875 + },
876 + "triggers_enabled": {
877 + "type": "boolean",
878 + "description": "Flag indicating if triggers are enabled for this project",
879 + "example": true
880 + },
881 + "last_subscribed_at": {
882 + "type": "string",
883 + "nullable": true,
884 + "description": "Date and time when the project last subscribed to updates",
885 + "example": "2023-05-17T10:00:00.000Z"
886 + },
887 + "deleted": {
888 + "type": "boolean",
889 + "description": "Flag indicating if the project has been deleted",
890 + "example": false
891 + },
892 + "is_new_webhook": {
893 + "type": "boolean",
894 + "description": "Deprecated: Please refer to webhook_version instead. True indicates if the webhook configuration is using the previous new format (V2). False indicates the oldest format (V1)",
895 + "example": true,
896 + "deprecated": true
897 + },
898 + "webhook_version": {
899 + "type": "string",
900 + "enum": [
901 + "V1",
902 + "V2",
903 + "V3"
904 + ],
905 + "description": "Version of the webhook configuration",
906 + "example": "V2"
907 + },
908 + "org": {
909 + "type": "object",
910 + "properties": {
911 + "id": {
912 + "type": "string",
913 + "format": "orgId",
914 + "description": "Short, URL-friendly unique identifier for the organization",
915 + "example": "org_abc123xyz456"
916 + },
917 + "name": {
918 + "type": "string",
919 + "description": "User-defined name for the organization",
920 + "example": "Acme Corp"
921 + },
922 + "plan": {
923 + "type": "string",
924 + "description": "Current subscription plan level",
925 + "example": "BUSINESS"
926 + }
927 + },
928 + "required": [
929 + "id",
930 + "name",
931 + "plan"
932 + ],
933 + "description": "Organization details"
934 + }
935 + },
936 + "required": [
937 + "auto_id",
938 + "id",
939 + "org_id",
940 + "name",
941 + "email",
942 + "nano_id",
943 + "created_at",
944 + "updated_at",
945 + "webhook_url",
946 + "event_webhook_url",
947 + "webhook_secret",
948 + "triggers_enabled",
949 + "last_subscribed_at",
950 + "deleted",
951 + "is_new_webhook",
952 + "webhook_version",
953 + "org"
954 + ],
955 + "description": "Details of the current active project (null if accessing with org-level credentials)"
956 + },
957 + "api_key": {
958 + "type": "object",
959 + "nullable": true,
960 + "properties": {
961 + "auto_id": {
962 + "type": "number",
963 + "description": "Internal auto-incrementing ID for the API key",
964 + "example": 7890
965 + },
966 + "id": {
967 + "type": "string",
968 + "description": "UUID identifier for the API key",
969 + "example": "550e8400-e29b-41d4-a716-446655440003"
970 + },
971 + "name": {
972 + "type": "string",
973 + "description": "User-defined name for the API key",
974 + "example": "Development Key"
975 + },
976 + "project_id": {
977 + "type": "string",
978 + "format": "projectId",
979 + "description": "Short, URL-friendly unique identifier for the associated project",
980 + "example": "proj_abc123xyz456"
981 + },
982 + "org_member_id": {
983 + "type": "string",
984 + "description": "UUID identifier for the organization member who owns this API key",
985 + "example": "550e8400-e29b-41d4-a716-446655440002"
986 + },
987 + "created_at": {
988 + "type": "string",
989 + "description": "Date and time when the API key was created",
990 + "example": "2023-05-01T10:00:00.000Z"
991 + },
992 + "updated_at": {
993 + "type": "string",
994 + "description": "Date and time when the API key was last modified",
995 + "example": "2023-05-01T10:00:00.000Z"
996 + },
997 + "deleted_at": {
998 + "type": "string",
999 + "nullable": true,
1000 + "description": "Date and time when the API key was deleted (if applicable)"
1001 + },
1002 + "key": {
1003 + "type": "string",
1004 + "description": "The actual API key value (usually only shown once during creation)",
1005 + "example": "sk_live_abc123xyz456"
1006 + },
1007 + "deleted": {
1008 + "type": "boolean",
1009 + "description": "Flag indicating if the API key has been deleted",
1010 + "example": false
1011 + }
1012 + },
1013 + "required": [
1014 + "auto_id",
1015 + "id",
1016 + "name",
1017 + "project_id",
1018 + "org_member_id",
1019 + "created_at",
1020 + "updated_at",
1021 + "deleted_at",
1022 + "key",
1023 + "deleted"
1024 + ],
1025 + "description": "Details of the API key used for authentication (null if using session auth)"
1026 + },
1027 + "org_member": {
1028 + "type": "object",
1029 + "properties": {
1030 + "id": {
1031 + "type": "string",
1032 + "description": "UUID identifier for the organization member",
1033 + "example": "550e8400-e29b-41d4-a716-446655440002"
1034 + },
1035 + "email": {
1036 + "type": "string",
1037 + "description": "Email address of the authenticated user",
1038 + "example": "user@example.com"
1039 + },
1040 + "name": {
1041 + "type": "string",
1042 + "description": "Display name of the authenticated user",
1043 + "example": "John Doe"
1044 + },
1045 + "role": {
1046 + "type": "string",
1047 + "description": "Access role of the authenticated user within the organization",
1048 + "example": "admin"
1049 + }
1050 + },
1051 + "required": [
1052 + "id",
1053 + "email",
1054 + "name",
1055 + "role"
1056 + ],
1057 + "description": "Information about the authenticated user",
1058 + "example": {
1059 + "id": "550e8400-e29b-41d4-a716-446655440002",
1060 + "email": "user@example.com",
1061 + "name": "John Doe",
1062 + "role": "admin"
1063 + }
1064 + }
1065 + },
1066 + "required": [
1067 + "project",
1068 + "api_key",
1069 + "org_member"
1070 + ],
1071 + "description": "Response containing user session information"
1072 + }
1073 + }
1074 + }
1075 + },
1076 + "400": {
1077 + "description": "Bad request. The request format may be invalid or missing required parameters.",
1078 + "content": {
1079 + "application/json": {
1080 + "schema": {
1081 + "$ref": "#/components/schemas/Error"
1082 + }
1083 + }
1084 + }
1085 + },
1086 + "401": {
1087 + "description": "Unauthorized. Authentication is required or the provided credentials are invalid or expired.",
1088 + "content": {
1089 + "application/json": {
1090 + "schema": {
1091 + "$ref": "#/components/schemas/Error"
1092 + }
1093 + }
1094 + }
1095 + },
1096 + "403": {
1097 + "description": "Forbidden. The authenticated user does not have permission to access this resource.",
1098 + "content": {
1099 + "application/json": {
1100 + "schema": {
1101 + "$ref": "#/components/schemas/Error"
1102 + }
1103 + }
1104 + }
1105 + },
1106 + "404": {
1107 + "description": "Not found. The requested project, organization, or member resource could not be found.",
1108 + "content": {
1109 + "application/json": {
1110 + "schema": {
1111 + "$ref": "#/components/schemas/Error"
1112 + }
1113 + }
1114 + }
1115 + },
1116 + "500": {
1117 + "description": "Internal server error. An unexpected error occurred while processing the request.",
1118 + "content": {
1119 + "application/json": {
1120 + "schema": {
1121 + "$ref": "#/components/schemas/Error"
1122 + }
1123 + }
1124 + }
1125 + }
1126 + },
1127 + "x-api-version": "3.0"
1128 + }
1129 + },
1130 + "/api/v3/auth_configs": {
1131 + "post": {
1132 + "summary": "Create new authentication configuration",
1133 + "description": "Creates a new auth config for a toolkit, allowing you to use your own OAuth credentials or API keys instead of Composio-managed authentication. This is required when you want to use custom OAuth apps (bring your own client ID/secret) or configure specific authentication parameters for a toolkit.",
1134 + "tags": [
1135 + "Auth Configs"
1136 + ],
1137 + "operationId": "postAuthConfigs",
1138 + "security": [
1139 + {
1140 + "ApiKeyAuth": []
1141 + },
1142 + {
1143 + "UserApiKeyAuth": []
1144 + }
1145 + ],
1146 + "requestBody": {
1147 + "content": {
1148 + "application/json": {
1149 + "schema": {
1150 + "type": "object",
1151 + "properties": {
1152 + "toolkit": {
1153 + "type": "object",
1154 + "properties": {
1155 + "slug": {
1156 + "type": "string",
1157 + "description": "Toolkit slug to create auth config for"
1158 + }
1159 + },
1160 + "required": [
1161 + "slug"
1162 + ]
1163 + },
1164 + "auth_config": {
1165 + "oneOf": [
1166 + {
1167 + "type": "object",
1168 + "properties": {
1169 + "type": {
1170 + "type": "string",
1171 + "enum": [
1172 + "use_composio_managed_auth"
1173 + ]
1174 + },
1175 + "name": {
1176 + "type": "string",
1177 + "description": "The name of the integration"
1178 + },
1179 + "credentials": {
1180 + "type": "object",
1181 + "properties": {
1182 + "scopes": {
1183 + "anyOf": [
1184 + {
1185 + "type": "string"
1186 + },
1187 + {
1188 + "type": "array",
1189 + "items": {
1190 + "type": "string"
1191 + }
1192 + }
1193 + ]
1194 + },
1195 + "user_scopes": {
1196 + "anyOf": [
1197 + {
1198 + "type": "string"
1199 + },
1200 + {
1201 + "type": "array",
1202 + "items": {
1203 + "type": "string"
1204 + }
1205 + }
1206 + ]
1207 + }
1208 + },
1209 + "default": {}
1210 + },
1211 + "tool_access_config": {
1212 + "type": "object",
1213 + "properties": {
1214 + "tools_for_connected_account_creation": {
1215 + "type": "array",
1216 + "items": {
1217 + "type": "string"
1218 + },
1219 + "default": [],
1220 + "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
1221 + }
1222 + }
1223 + },
1224 + "restrict_to_following_tools": {
1225 + "type": "array",
1226 + "items": {
1227 + "type": "string"
1228 + },
1229 + "default": [],
1230 + "description": "Use tool_access_config instead. This field will be deprecated in the future.",
1231 + "deprecated": true
1232 + },
1233 + "shared_credentials": {
1234 + "type": "object",
1235 + "additionalProperties": {},
1236 + "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
1237 + "x-experimental": true
1238 + },
1239 + "is_enabled_for_tool_router": {
1240 + "type": "boolean",
1241 + "description": "Whether this auth config is enabled for tool router"
1242 + }
1243 + },
1244 + "required": [
1245 + "type"
1246 + ]
1247 + },
1248 + {
1249 + "type": "object",
1250 + "properties": {
1251 + "type": {
1252 + "type": "string",
1253 + "enum": [
1254 + "use_custom_auth"
1255 + ]
1256 + },
1257 + "name": {
1258 + "type": "string",
1259 + "description": "The name of the integration"
1260 + },
1261 + "authScheme": {
1262 + "type": "string",
1263 + "enum": [
1264 + "OAUTH2",
1265 + "OAUTH1",
1266 + "API_KEY",
1267 + "BASIC",
1268 + "BILLCOM_AUTH",
1269 + "BEARER_TOKEN",
1270 + "GOOGLE_SERVICE_ACCOUNT",
1271 + "NO_AUTH",
1272 + "BASIC_WITH_JWT",
1273 + "CALCOM_AUTH",
1274 + "SERVICE_ACCOUNT",
1275 + "SAML",
1276 + "DCR_OAUTH",
1277 + "S2S_OAUTH2"
1278 + ]
1279 + },
1280 + "credentials": {
1281 + "type": "object",
1282 + "properties": {
1283 + "scopes": {
1284 + "anyOf": [
1285 + {
1286 + "type": "string"
1287 + },
1288 + {
1289 + "type": "array",
1290 + "items": {
1291 + "type": "string"
1292 + }
1293 + }
1294 + ]
1295 + },
1296 + "user_scopes": {
1297 + "anyOf": [
1298 + {
1299 + "type": "string"
1300 + },
1301 + {
1302 + "type": "array",
1303 + "items": {
1304 + "type": "string"
1305 + }
1306 + }
1307 + ]
1308 + }
1309 + },
1310 + "default": {}
1311 + },
1312 + "proxy_config": {
1313 + "type": "object",
1314 + "nullable": true,
1315 + "properties": {
1316 + "proxy_url": {
1317 + "type": "string",
1318 + "format": "uri",
1319 + "description": "The url of the auth proxy"
1320 + },
1321 + "proxy_auth_key": {
1322 + "type": "string",
1323 + "description": "The auth key for the auth proxy"
1324 + }
1325 + },
1326 + "required": [
1327 + "proxy_url"
1328 + ]
1329 + },
1330 + "restrict_to_following_tools": {
1331 + "type": "array",
1332 + "items": {
1333 + "type": "string"
1334 + },
1335 + "default": [],
1336 + "description": "Use tool_access_config instead. This field will be deprecated in the future.",
1337 + "deprecated": true
1338 + },
1339 + "tool_access_config": {
1340 + "type": "object",
1341 + "properties": {
1342 + "tools_for_connected_account_creation": {
1343 + "type": "array",
1344 + "items": {
1345 + "type": "string"
1346 + },
1347 + "default": [],
1348 + "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
1349 + }
1350 + }
1351 + },
1352 + "shared_credentials": {
1353 + "type": "object",
1354 + "additionalProperties": {},
1355 + "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
1356 + "x-experimental": true
1357 + },
1358 + "is_enabled_for_tool_router": {
1359 + "type": "boolean",
1360 + "description": "Whether this auth config is enabled for tool router"
1361 + }
1362 + },
1363 + "required": [
1364 + "type",
1365 + "authScheme"
1366 + ]
1367 + }
1368 + ],
1369 + "default": {
1370 + "type": "use_composio_managed_auth",
1371 + "credentials": {},
1372 + "restrict_to_following_tools": []
1373 + }
1374 + }
1375 + },
1376 + "required": [
1377 + "toolkit"
1378 + ]
1379 + }
1380 + }
1381 + }
1382 + },
1383 + "responses": {
1384 + "201": {
1385 + "description": "Successfully created auth config",
1386 + "content": {
1387 + "application/json": {
1388 + "schema": {
1389 + "type": "object",
1390 + "properties": {
1391 + "toolkit": {
1392 + "type": "object",
1393 + "properties": {
1394 + "slug": {
1395 + "type": "string",
1396 + "description": "The unique key of the toolkit"
1397 + }
1398 + },
1399 + "required": [
1400 + "slug"
1401 + ]
1402 + },
1403 + "auth_config": {
1404 + "type": "object",
1405 + "properties": {
1406 + "id": {
1407 + "type": "string",
1408 + "format": "authConfigId",
1409 + "description": "The auth config id of the toolkit (must be a valid auth config id)"
1410 + },
1411 + "auth_scheme": {
1412 + "type": "string",
1413 + "description": "The authentication mode of the toolkit"
1414 + },
1415 + "is_composio_managed": {
1416 + "type": "boolean",
1417 + "description": "Whether the auth config is managed by Composio"
1418 + },
1419 + "restrict_to_following_tools": {
1420 + "type": "array",
1421 + "items": {
1422 + "type": "string"
1423 + },
1424 + "default": [],
1425 + "description": "The tools that the user can use with the auth config"
1426 + }
1427 + },
1428 + "required": [
1429 + "id",
1430 + "auth_scheme",
1431 + "is_composio_managed"
1432 + ]
1433 + }
1434 + },
1435 + "required": [
1436 + "toolkit",
1437 + "auth_config"
1438 + ]
1439 + }
1440 + }
1441 + }
1442 + },
1443 + "400": {
1444 + "description": "Bad request",
1445 + "content": {
1446 + "application/json": {
1447 + "schema": {
1448 + "$ref": "#/components/schemas/Error"
1449 + }
1450 + }
1451 + }
1452 + },
1453 + "401": {
1454 + "description": "Unauthorized",
1455 + "content": {
1456 + "application/json": {
1457 + "schema": {
1458 + "$ref": "#/components/schemas/Error"
1459 + }
1460 + }
1461 + }
1462 + },
1463 + "404": {
1464 + "description": "Not found",
1465 + "content": {
1466 + "application/json": {
1467 + "schema": {
1468 + "$ref": "#/components/schemas/Error"
1469 + }
1470 + }
1471 + }
1472 + },
1473 + "500": {
1474 + "description": "Internal server error",
1475 + "content": {
1476 + "application/json": {
1477 + "schema": {
1478 + "$ref": "#/components/schemas/Error"
1479 + }
1480 + }
1481 + }
1482 + }
1483 + },
1484 + "x-api-version": "3.0"
1485 + },
1486 + "get": {
1487 + "summary": "List authentication configurations with optional filters",
1488 + "description": "Retrieves all auth configs for your project. Auth configs define how users authenticate with external services (OAuth, API keys, etc.). Use filters to find configs for specific toolkits or to distinguish between Composio-managed and custom configurations.",
1489 + "tags": [
1490 + "Auth Configs"
1491 + ],
1492 + "operationId": "getAuthConfigs",
1493 + "security": [
1494 + {
1495 + "ApiKeyAuth": []
1496 + },
1497 + {
1498 + "UserApiKeyAuth": []
1499 + }
1500 + ],
1501 + "parameters": [
1502 + {
1503 + "schema": {
1504 + "anyOf": [
1505 + {
1506 + "type": "string"
1507 + },
1508 + {
1509 + "type": "boolean"
1510 + }
1511 + ],
1512 + "description": "Whether to filter by composio managed auth configs"
1513 + },
1514 + "required": false,
1515 + "description": "Whether to filter by composio managed auth configs",
1516 + "name": "is_composio_managed",
1517 + "in": "query"
1518 + },
1519 + {
1520 + "schema": {
1521 + "type": "string"
1522 + },
1523 + "required": false,
1524 + "description": "Comma-separated list of toolkit slugs to filter auth configs by",
1525 + "in": "query",
1526 + "name": "toolkit_slug"
1527 + },
1528 + {
1529 + "schema": {
1530 + "type": "string",
1531 + "description": "DEPRECATED: This parameter will be removed in a future version. Please use toolkit_slug instead.",
1532 + "deprecated": true
1533 + },
1534 + "required": false,
1535 + "description": "The app id to filter by",
1536 + "name": "deprecated_app_id",
1537 + "in": "query"
1538 + },
1539 + {
1540 + "schema": {
1541 + "type": "string",
1542 + "description": "DEPRECATED: This parameter will be removed in a future version.",
1543 + "deprecated": true
1544 + },
1545 + "required": false,
1546 + "name": "deprecated_status",
1547 + "in": "query"
1548 + },
1549 + {
1550 + "schema": {
1551 + "type": "boolean",
1552 + "nullable": true,
1553 + "default": false,
1554 + "description": "Show disabled auth configs"
1555 + },
1556 + "required": false,
1557 + "description": "Show disabled auth configs",
1558 + "name": "show_disabled",
1559 + "in": "query"
1560 + },
1561 + {
1562 + "schema": {
1563 + "type": "string",
1564 + "description": "Search auth configs by name or id"
1565 + },
1566 + "required": false,
1567 + "description": "Search auth configs by name or id",
1568 + "name": "search",
1569 + "in": "query"
1570 + },
1571 + {
1572 + "schema": {
1573 + "type": "number",
1574 + "nullable": true
1575 + },
1576 + "required": false,
1577 + "description": "Number of items per page, max allowed is 1000",
1578 + "name": "limit",
1579 + "in": "query"
1580 + },
1581 + {
1582 + "schema": {
1583 + "type": "string"
1584 + },
1585 + "required": false,
1586 + "description": "Cursor for pagination. The cursor is a base64 encoded string of the page and limit. The page is the page number and the limit is the number of items per page. The cursor is used to paginate through the items. The cursor is not required for the first page.",
1587 + "name": "cursor",
1588 + "in": "query"
1589 + }
1590 + ],
1591 + "responses": {
1592 + "200": {
1593 + "description": "Successfully fetched auth configs",
1594 + "content": {
1595 + "application/json": {
1596 + "schema": {
1597 + "type": "object",
1598 + "properties": {
1599 + "items": {
1600 + "type": "array",
1601 + "items": {
1602 + "type": "object",
1603 + "properties": {
1604 + "id": {
1605 + "type": "string",
1606 + "format": "authConfigId",
1607 + "description": "The unique ID of the authentication configuration"
1608 + },
1609 + "uuid": {
1610 + "type": "string",
1611 + "description": "The UUID of the authentication configuration (for backward compatibility)"
1612 + },
1613 + "type": {
1614 + "type": "string",
1615 + "enum": [
1616 + "default",
1617 + "custom"
1618 + ],
1619 + "description": "The type of the authentication configuration (custom or default)"
1620 + },
1621 + "toolkit": {
1622 + "type": "object",
1623 + "properties": {
1624 + "slug": {
1625 + "type": "string",
1626 + "description": "The unique identifier of the integration app"
1627 + },
1628 + "logo": {
1629 + "type": "string",
1630 + "description": "The URL to the integration app's logo image"
1631 + },
1632 + "auth_guide_url": {
1633 + "type": "string",
1634 + "nullable": true,
1635 + "description": "URL to a guide page with authentication setup instructions"
1636 + },
1637 + "auth_hint_url": {
1638 + "type": "string",
1639 + "nullable": true,
1640 + "description": "URL to a page where users can obtain or configure credentials"
1641 + }
1642 + },
1643 + "required": [
1644 + "slug",
1645 + "logo"
1646 + ],
1647 + "description": "Information about the associated integration"
1648 + },
1649 + "name": {
1650 + "type": "string",
1651 + "description": "The display name of the authentication configuration"
1652 + },
1653 + "auth_scheme": {
1654 + "type": "string",
1655 + "enum": [
1656 + "OAUTH2",
1657 + "OAUTH1",
1658 + "API_KEY",
1659 + "BASIC",
1660 + "BILLCOM_AUTH",
1661 + "BEARER_TOKEN",
1662 + "GOOGLE_SERVICE_ACCOUNT",
1663 + "NO_AUTH",
1664 + "BASIC_WITH_JWT",
1665 + "CALCOM_AUTH",
1666 + "SERVICE_ACCOUNT",
1667 + "SAML",
1668 + "DCR_OAUTH",
1669 + "S2S_OAUTH2"
1670 + ],
1671 + "description": "The authentication scheme used (e.g., OAuth2, API Key, etc.)"
1672 + },
1673 + "is_composio_managed": {
1674 + "type": "boolean",
1675 + "description": "Whether this authentication configuration is managed by Composio or the user"
1676 + },
1677 + "credentials": {
1678 + "type": "object",
1679 + "additionalProperties": {},
1680 + "description": "The authentication credentials (tokens, keys, etc.) - may be partially hidden for security"
1681 + },
1682 + "proxy_config": {
1683 + "type": "object",
1684 + "nullable": true,
1685 + "properties": {
1686 + "proxy_url": {
1687 + "type": "string",
1688 + "format": "uri",
1689 + "description": "The url of the auth proxy"
1690 + },
1691 + "proxy_auth_key": {
1692 + "type": "string",
1693 + "description": "The auth key for the auth proxy"
1694 + }
1695 + },
1696 + "required": [
1697 + "proxy_url"
1698 + ]
1699 + },
1700 + "status": {
1701 + "type": "string",
1702 + "enum": [
1703 + "ENABLED",
1704 + "DISABLED"
1705 + ],
1706 + "description": "Current status of the authentication configuration"
1707 + },
1708 + "created_by": {
1709 + "type": "string",
1710 + "description": "The identifier of the user who created the auth config"
1711 + },
1712 + "created_at": {
1713 + "type": "string",
1714 + "description": "ISO 8601 date-time when the auth config was created"
1715 + },
1716 + "last_updated_at": {
1717 + "type": "string",
1718 + "description": "ISO 8601 date-time when the auth config was last updated"
1719 + },
1720 + "no_of_connections": {
1721 + "type": "number",
1722 + "description": "The number of active connections using this auth config"
1723 + },
1724 + "expected_input_fields": {
1725 + "type": "array",
1726 + "items": {
1727 + "nullable": true,
1728 + "type": "object"
1729 + },
1730 + "description": "Fields expected during connection initialization"
1731 + },
1732 + "restrict_to_following_tools": {
1733 + "type": "array",
1734 + "items": {
1735 + "type": "string"
1736 + },
1737 + "description": "Use tool_access_config instead. This field will be deprecated in the future.",
1738 + "deprecated": true
1739 + },
1740 + "tool_access_config": {
1741 + "type": "object",
1742 + "properties": {
1743 + "tools_for_connected_account_creation": {
1744 + "type": "array",
1745 + "items": {
1746 + "type": "string"
1747 + },
1748 + "default": [],
1749 + "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
1750 + },
1751 + "tools_available_for_execution": {
1752 + "type": "array",
1753 + "items": {
1754 + "type": "string"
1755 + },
1756 + "default": [],
1757 + "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
1758 + }
1759 + }
1760 + },
1761 + "shared_credentials": {
1762 + "type": "object",
1763 + "additionalProperties": {},
1764 + "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
1765 + "x-experimental": true
1766 + },
1767 + "is_enabled_for_tool_router": {
1768 + "type": "boolean",
1769 + "description": "Whether this auth config is enabled for tool router"
1770 + },
1771 + "deprecated_params": {
1772 + "type": "object",
1773 + "properties": {
1774 + "default_connector_id": {
1775 + "type": "string",
1776 + "nullable": true,
1777 + "description": "Deprecated: Default connector ID"
1778 + },
1779 + "member_uuid": {
1780 + "type": "string",
1781 + "description": "Deprecated: Member UUID"
1782 + },
1783 + "toolkit_id": {
1784 + "type": "string",
1785 + "description": "Deprecated: Toolkit ID"
1786 + },
1787 + "expected_input_fields": {
1788 + "type": "array",
1789 + "items": {
1790 + "type": "object",
1791 + "additionalProperties": {}
1792 + },
1793 + "description": "Deprecated: Fields expected during connection initialization"
1794 + }
1795 + },
1796 + "required": [
1797 + "default_connector_id"
1798 + ],
1799 + "description": "DEPRECATED: This parameter will be removed in a future version.",
1800 + "deprecated": true
1801 + }
1802 + },
1803 + "required": [
1804 + "id",
1805 + "uuid",
1806 + "type",
1807 + "toolkit",
1808 + "name",
1809 + "status",
1810 + "no_of_connections",
1811 + "tool_access_config"
1812 + ]
1813 + }
1814 + },
1815 + "next_cursor": {
1816 + "type": "string",
1817 + "nullable": true
1818 + },
1819 + "total_pages": {
1820 + "type": "number"
1821 + },
1822 + "current_page": {
1823 + "type": "number"
1824 + },
1825 + "total_items": {
1826 + "type": "number"
1827 + }
1828 + },
1829 + "required": [
1830 + "items",
1831 + "total_pages",
1832 + "current_page",
1833 + "total_items"
1834 + ]
1835 + }
1836 + }
1837 + }
1838 + },
1839 + "400": {
1840 + "description": "Bad request",
1841 + "content": {
1842 + "application/json": {
1843 + "schema": {
1844 + "$ref": "#/components/schemas/Error"
1845 + }
1846 + }
1847 + }
1848 + },
1849 + "401": {
1850 + "description": "Unauthorized",
1851 + "content": {
1852 + "application/json": {
1853 + "schema": {
1854 + "$ref": "#/components/schemas/Error"
1855 + }
1856 + }
1857 + }
1858 + },
1859 + "404": {
1860 + "description": "Not found",
1861 + "content": {
1862 + "application/json": {
1863 + "schema": {
1864 + "$ref": "#/components/schemas/Error"
1865 + }
1866 + }
1867 + }
1868 + },
1869 + "500": {
1870 + "description": "Internal server error",
1871 + "content": {
1872 + "application/json": {
1873 + "schema": {
1874 + "$ref": "#/components/schemas/Error"
1875 + }
1876 + }
1877 + }
1878 + }
1879 + },
1880 + "x-api-version": "3.0"
1881 + }
1882 + },
1883 + "/api/v3/auth_configs/{nanoid}": {
1884 + "get": {
1885 + "summary": "Get single authentication configuration by ID",
1886 + "description": "Retrieves detailed information about a specific authentication configuration using its unique identifier.",
1887 + "tags": [
1888 + "Auth Configs"
1889 + ],
1890 + "operationId": "getAuthConfigsByNanoid",
1891 + "security": [
1892 + {
1893 + "ApiKeyAuth": []
1894 + },
1895 + {
1896 + "UserApiKeyAuth": []
1897 + }
1898 + ],
1899 + "parameters": [
1900 + {
1901 + "schema": {
1902 + "type": "string",
1903 + "format": "authConfigId",
1904 + "description": "The unique identifier of the authentication configuration to retrieve"
1905 + },
1906 + "required": true,
1907 + "description": "The unique identifier of the authentication configuration to retrieve",
1908 + "name": "nanoid",
1909 + "in": "path"
1910 + }
1911 + ],
1912 + "responses": {
1913 + "200": {
1914 + "description": "Successfully fetched auth config",
1915 + "content": {
1916 + "application/json": {
1917 + "schema": {
1918 + "type": "object",
1919 + "properties": {
1920 + "id": {
1921 + "type": "string",
1922 + "format": "authConfigId",
1923 + "description": "The unique ID of the authentication configuration"
1924 + },
1925 + "uuid": {
1926 + "type": "string",
1927 + "description": "The UUID of the authentication configuration (for backward compatibility)"
1928 + },
1929 + "type": {
1930 + "type": "string",
1931 + "enum": [
1932 + "default",
1933 + "custom"
1934 + ],
1935 + "description": "The type of the authentication configuration (custom or default)"
1936 + },
1937 + "toolkit": {
1938 + "type": "object",
1939 + "properties": {
1940 + "slug": {
1941 + "type": "string",
1942 + "description": "The unique identifier of the integration app"
1943 + },
1944 + "logo": {
1945 + "type": "string",
1946 + "description": "The URL to the integration app's logo image"
1947 + },
1948 + "auth_guide_url": {
1949 + "type": "string",
1950 + "nullable": true,
1951 + "description": "URL to a guide page with authentication setup instructions"
1952 + },
1953 + "auth_hint_url": {
1954 + "type": "string",
1955 + "nullable": true,
1956 + "description": "URL to a page where users can obtain or configure credentials"
1957 + }
1958 + },
1959 + "required": [
1960 + "slug",
1961 + "logo"
1962 + ],
1963 + "description": "Information about the associated integration"
1964 + },
1965 + "name": {
1966 + "type": "string",
1967 + "description": "The display name of the authentication configuration"
1968 + },
1969 + "auth_scheme": {
1970 + "type": "string",
1971 + "enum": [
1972 + "OAUTH2",
1973 + "OAUTH1",
1974 + "API_KEY",
1975 + "BASIC",
1976 + "BILLCOM_AUTH",
1977 + "BEARER_TOKEN",
1978 + "GOOGLE_SERVICE_ACCOUNT",
1979 + "NO_AUTH",
1980 + "BASIC_WITH_JWT",
1981 + "CALCOM_AUTH",
1982 + "SERVICE_ACCOUNT",
1983 + "SAML",
1984 + "DCR_OAUTH",
1985 + "S2S_OAUTH2"
1986 + ],
1987 + "description": "The authentication scheme used (e.g., OAuth2, API Key, etc.)"
1988 + },
1989 + "is_composio_managed": {
1990 + "type": "boolean",
1991 + "description": "Whether this authentication configuration is managed by Composio or the user"
1992 + },
1993 + "credentials": {
1994 + "type": "object",
1995 + "additionalProperties": {},
1996 + "description": "The authentication credentials (tokens, keys, etc.) - may be partially hidden for security"
1997 + },
1998 + "proxy_config": {
1999 + "type": "object",
2000 + "nullable": true,
2001 + "properties": {
2002 + "proxy_url": {
2003 + "type": "string",
2004 + "format": "uri",
2005 + "description": "The url of the auth proxy"
2006 + },
2007 + "proxy_auth_key": {
2008 + "type": "string",
2009 + "description": "The auth key for the auth proxy"
2010 + }
2011 + },
2012 + "required": [
2013 + "proxy_url"
2014 + ]
2015 + },
2016 + "status": {
2017 + "type": "string",
2018 + "enum": [
2019 + "ENABLED",
2020 + "DISABLED"
2021 + ],
2022 + "description": "Current status of the authentication configuration"
2023 + },
2024 + "created_by": {
2025 + "type": "string",
2026 + "description": "The identifier of the user who created the auth config"
2027 + },
2028 + "created_at": {
2029 + "type": "string",
2030 + "description": "ISO 8601 date-time when the auth config was created"
2031 + },
2032 + "last_updated_at": {
2033 + "type": "string",
2034 + "description": "ISO 8601 date-time when the auth config was last updated"
2035 + },
2036 + "no_of_connections": {
2037 + "type": "number",
2038 + "description": "The number of active connections using this auth config"
2039 + },
2040 + "expected_input_fields": {
2041 + "type": "array",
2042 + "items": {
2043 + "nullable": true,
2044 + "type": "object"
2045 + },
2046 + "description": "Fields expected during connection initialization"
2047 + },
2048 + "restrict_to_following_tools": {
2049 + "type": "array",
2050 + "items": {
2051 + "type": "string"
2052 + },
2053 + "description": "Use tool_access_config instead. This field will be deprecated in the future.",
2054 + "deprecated": true
2055 + },
2056 + "tool_access_config": {
2057 + "type": "object",
2058 + "properties": {
2059 + "tools_for_connected_account_creation": {
2060 + "type": "array",
2061 + "items": {
2062 + "type": "string"
2063 + },
2064 + "default": [],
2065 + "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
2066 + },
2067 + "tools_available_for_execution": {
2068 + "type": "array",
2069 + "items": {
2070 + "type": "string"
2071 + },
2072 + "default": [],
2073 + "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
2074 + }
2075 + }
2076 + },
2077 + "shared_credentials": {
2078 + "type": "object",
2079 + "additionalProperties": {},
2080 + "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
2081 + "x-experimental": true
2082 + },
2083 + "is_enabled_for_tool_router": {
2084 + "type": "boolean",
2085 + "description": "Whether this auth config is enabled for tool router"
2086 + },
2087 + "deprecated_params": {
2088 + "type": "object",
2089 + "properties": {
2090 + "default_connector_id": {
2091 + "type": "string",
2092 + "nullable": true,
2093 + "description": "Deprecated: Default connector ID"
2094 + },
2095 + "member_uuid": {
2096 + "type": "string",
2097 + "description": "Deprecated: Member UUID"
2098 + },
2099 + "toolkit_id": {
2100 + "type": "string",
2101 + "description": "Deprecated: Toolkit ID"
2102 + },
2103 + "expected_input_fields": {
2104 + "type": "array",
2105 + "items": {
2106 + "type": "object",
2107 + "additionalProperties": {}
2108 + },
2109 + "description": "Deprecated: Fields expected during connection initialization"
2110 + }
2111 + },
2112 + "required": [
2113 + "default_connector_id"
2114 + ],
2115 + "description": "DEPRECATED: This parameter will be removed in a future version.",
2116 + "deprecated": true
2117 + }
2118 + },
2119 + "required": [
2120 + "id",
2121 + "uuid",
2122 + "type",
2123 + "toolkit",
2124 + "name",
2125 + "status",
2126 + "no_of_connections",
2127 + "tool_access_config"
2128 + ]
2129 + }
2130 + }
2131 + }
2132 + },
2133 + "400": {
2134 + "description": "Bad request - Invalid auth config ID format",
2135 + "content": {
2136 + "application/json": {
2137 + "schema": {
2138 + "$ref": "#/components/schemas/Error"
2139 + }
2140 + }
2141 + }
2142 + },
2143 + "401": {
2144 + "description": "Unauthorized - Authentication required",
2145 + "content": {
2146 + "application/json": {
2147 + "schema": {
2148 + "$ref": "#/components/schemas/Error"
2149 + }
2150 + }
2151 + }
2152 + },
2153 + "404": {
2154 + "description": "Not found - Auth configuration does not exist",
2155 + "content": {
2156 + "application/json": {
2157 + "schema": {
2158 + "$ref": "#/components/schemas/Error"
2159 + }
2160 + }
2161 + }
2162 + },
2163 + "500": {
2164 + "description": "Internal server error - Something went wrong on the server",
2165 + "content": {
2166 + "application/json": {
2167 + "schema": {
2168 + "$ref": "#/components/schemas/Error"
2169 + }
2170 + }
2171 + }
2172 + }
2173 + },
2174 + "x-api-version": "3.0"
2175 + },
2176 + "patch": {
2177 + "summary": "Update an authentication configuration",
2178 + "description": "Modifies an existing authentication configuration with new credentials or other settings. Only specified fields will be updated.",
2179 + "tags": [
2180 + "Auth Configs"
2181 + ],
2182 + "operationId": "patchAuthConfigsByNanoid",
2183 + "security": [
2184 + {
2185 + "ApiKeyAuth": []
2186 + },
2187 + {
2188 + "UserApiKeyAuth": []
2189 + }
2190 + ],
2191 + "parameters": [
2192 + {
2193 + "schema": {
2194 + "type": "string",
2195 + "format": "authConfigId",
2196 + "description": "The unique identifier of the authentication configuration to update"
2197 + },
2198 + "required": true,
2199 + "description": "The unique identifier of the authentication configuration to update",
2200 + "name": "nanoid",
2201 + "in": "path"
2202 + }
2203 + ],
2204 + "requestBody": {
2205 + "content": {
2206 + "application/json": {
2207 + "schema": {
2208 + "oneOf": [
2209 + {
2210 + "type": "object",
2211 + "properties": {
2212 + "type": {
2213 + "type": "string",
2214 + "enum": [
2215 + "custom"
2216 + ]
2217 + },
2218 + "name": {
2219 + "type": "string",
2220 + "minLength": 1,
2221 + "description": "The display name of the authentication configuration"
2222 + },
2223 + "credentials": {
2224 + "type": "object",
2225 + "properties": {
2226 + "scopes": {
2227 + "anyOf": [
2228 + {
2229 + "type": "string"
2230 + },
2231 + {
2232 + "type": "array",
2233 + "items": {
2234 + "type": "string"
2235 + }
2236 + }
2237 + ]
2238 + },
2239 + "user_scopes": {
2240 + "anyOf": [
2241 + {
2242 + "type": "string"
2243 + },
2244 + {
2245 + "type": "array",
2246 + "items": {
2247 + "type": "string"
2248 + }
2249 + }
2250 + ]
2251 + }
2252 + }
2253 + },
2254 + "proxy_config": {
2255 + "type": "object",
2256 + "nullable": true,
2257 + "properties": {
2258 + "proxy_url": {
2259 + "type": "string",
2260 + "format": "uri",
2261 + "description": "The url of the auth proxy"
2262 + },
2263 + "proxy_auth_key": {
2264 + "type": "string",
2265 + "description": "The auth key for the auth proxy"
2266 + }
2267 + },
2268 + "required": [
2269 + "proxy_url"
2270 + ]
2271 + },
2272 + "restrict_to_following_tools": {
2273 + "type": "array",
2274 + "items": {
2275 + "type": "string"
2276 + },
2277 + "description": "Use tool_access_config instead. This field will be deprecated in the future.",
2278 + "deprecated": true
2279 + },
2280 + "tool_access_config": {
2281 + "type": "object",
2282 + "properties": {
2283 + "tools_for_connected_account_creation": {
2284 + "type": "array",
2285 + "items": {
2286 + "type": "string"
2287 + },
2288 + "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
2289 + },
2290 + "tools_available_for_execution": {
2291 + "type": "array",
2292 + "items": {
2293 + "type": "string"
2294 + },
2295 + "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
2296 + }
2297 + }
2298 + },
2299 + "shared_credentials": {
2300 + "type": "object",
2301 + "additionalProperties": {},
2302 + "description": "Shared credentials that will be inherited by connected accounts. For eg: this can be used to share the API key for a tool with all connected accounts using this auth config."
2303 + },
2304 + "is_enabled_for_tool_router": {
2305 + "type": "boolean",
2306 + "description": "Whether this auth config is enabled for tool router"
2307 + }
2308 + },
2309 + "required": [
2310 + "type"
2311 + ]
2312 + },
2313 + {
2314 + "type": "object",
2315 + "properties": {
2316 + "type": {
2317 + "type": "string",
2318 + "enum": [
2319 + "default"
2320 + ]
2321 + },
2322 + "name": {
2323 + "type": "string",
2324 + "minLength": 1,
2325 + "description": "The display name of the authentication configuration"
2326 + },
2327 + "scopes": {
2328 + "anyOf": [
2329 + {
2330 + "type": "string"
2331 + },
2332 + {
2333 + "type": "array",
2334 + "items": {
2335 + "type": "string"
2336 + }
2337 + }
2338 + ]
2339 + },
2340 + "user_scopes": {
2341 + "anyOf": [
2342 + {
2343 + "type": "string"
2344 + },
2345 + {
2346 + "type": "array",
2347 + "items": {
2348 + "type": "string"
2349 + }
2350 + }
2351 + ]
2352 + },
2353 + "restrict_to_following_tools": {
2354 + "type": "array",
2355 + "items": {
2356 + "type": "string"
2357 + },
2358 + "description": "Use tool_access_config instead. This field will be deprecated in the future.",
2359 + "deprecated": true
2360 + },
2361 + "tool_access_config": {
2362 + "type": "object",
2363 + "properties": {
2364 + "tools_for_connected_account_creation": {
2365 + "type": "array",
2366 + "items": {
2367 + "type": "string"
2368 + },
2369 + "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
2370 + },
2371 + "tools_available_for_execution": {
2372 + "type": "array",
2373 + "items": {
2374 + "type": "string"
2375 + },
2376 + "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
2377 + }
2378 + }
2379 + },
2380 + "shared_credentials": {
2381 + "type": "object",
2382 + "additionalProperties": {},
2383 + "description": "Shared credentials that will be inherited by connected accounts. For eg: this can be used to share the API key for a tool with all connected accounts using this auth config."
2384 + },
2385 + "is_enabled_for_tool_router": {
2386 + "type": "boolean",
2387 + "description": "Whether this auth config is enabled for tool router"
2388 + }
2389 + },
2390 + "required": [
2391 + "type"
2392 + ]
2393 + }
2394 + ]
2395 + },
2396 + "examples": {
2397 + "standardUpdate": {
2398 + "summary": "Standard credential update",
2399 + "value": {
2400 + "auth_config": {
2401 + "credentials": {
2402 + "api_key": "YOUR_NEW_API_KEY",
2403 + "client_secret": "YOUR_NEW_CLIENT_SECRET"
2404 + },
2405 + "restrict_to_following_tools": [
2406 + "GMAIL_SEND_EMAIL",
2407 + "GMAIL_FETCH_EMAILS"
2408 + ]
2409 + }
2410 + }
2411 + }
2412 + }
2413 + }
2414 + }
2415 + },
2416 + "responses": {
2417 + "200": {
2418 + "description": "Successfully updated auth config",
2419 + "content": {
2420 + "application/json": {
2421 + "schema": {
2422 + "type": "object",
2423 + "properties": {}
2424 + }
2425 + }
2426 + }
2427 + },
2428 + "400": {
2429 + "description": "Bad request - Invalid input or credentials format",
2430 + "content": {
2431 + "application/json": {
2432 + "schema": {
2433 + "$ref": "#/components/schemas/Error"
2434 + }
2435 + }
2436 + }
2437 + },
2438 + "401": {
2439 + "description": "Unauthorized - Authentication required",
2440 + "content": {
2441 + "application/json": {
2442 + "schema": {
2443 + "$ref": "#/components/schemas/Error"
2444 + }
2445 + }
2446 + }
2447 + },
2448 + "404": {
2449 + "description": "Not found - Auth configuration does not exist",
2450 + "content": {
2451 + "application/json": {
2452 + "schema": {
2453 + "$ref": "#/components/schemas/Error"
2454 + }
2455 + }
2456 + }
2457 + },
2458 + "500": {
2459 + "description": "Internal server error - Something went wrong on the server",
2460 + "content": {
2461 + "application/json": {
2462 + "schema": {
2463 + "$ref": "#/components/schemas/Error"
2464 + }
2465 + }
2466 + }
2467 + }
2468 + },
2469 + "x-api-version": "3.0"
2470 + },
2471 + "delete": {
2472 + "summary": "Delete an authentication configuration",
2473 + "description": "Soft-deletes an authentication configuration by marking it as deleted in the database. This operation cannot be undone.",
2474 + "tags": [
2475 + "Auth Configs"
2476 + ],
2477 + "operationId": "deleteAuthConfigsByNanoid",
2478 + "security": [
2479 + {
2480 + "ApiKeyAuth": []
2481 + },
2482 + {
2483 + "UserApiKeyAuth": []
2484 + }
2485 + ],
2486 + "parameters": [
2487 + {
2488 + "schema": {
2489 + "type": "string",
2490 + "format": "authConfigId",
2491 + "description": "The unique identifier of the authentication configuration to delete"
2492 + },
2493 + "required": true,
2494 + "description": "The unique identifier of the authentication configuration to delete",
2495 + "name": "nanoid",
2496 + "in": "path"
2497 + }
2498 + ],
2499 + "responses": {
2500 + "200": {
2501 + "description": "Successfully deleted auth config",
2502 + "content": {
2503 + "application/json": {
2504 + "schema": {
2505 + "type": "object",
2506 + "properties": {}
2507 + }
2508 + }
2509 + }
2510 + },
2511 + "400": {
2512 + "description": "Bad request - Invalid auth config ID format",
2513 + "content": {
2514 + "application/json": {
2515 + "schema": {
2516 + "$ref": "#/components/schemas/Error"
2517 + }
2518 + }
2519 + }
2520 + },
2521 + "401": {
2522 + "description": "Unauthorized - Authentication required",
2523 + "content": {
2524 + "application/json": {
2525 + "schema": {
2526 + "$ref": "#/components/schemas/Error"
2527 + }
2528 + }
2529 + }
2530 + },
2531 + "404": {
2532 + "description": "Auth config not found - The specified configuration does not exist or was already deleted",
2533 + "content": {
2534 + "application/json": {
2535 + "schema": {
2536 + "type": "object",
2537 + "properties": {}
2538 + }
2539 + }
2540 + }
2541 + },
2542 + "500": {
2543 + "description": "Internal server error - Something went wrong on the server",
2544 + "content": {
2545 + "application/json": {
2546 + "schema": {
2547 + "$ref": "#/components/schemas/Error"
2548 + }
2549 + }
2550 + }
2551 + }
2552 + },
2553 + "x-api-version": "3.0"
2554 + }
2555 + },
2556 + "/api/v3/auth_configs/{nanoid}/{status}": {
2557 + "patch": {
2558 + "summary": "Enable or disable an authentication configuration",
2559 + "description": "Updates the status of an authentication configuration to either enabled or disabled. Disabled configurations cannot be used for new connections.",
2560 + "tags": [
2561 + "Auth Configs"
2562 + ],
2563 + "operationId": "patchAuthConfigsByNanoidByStatus",
2564 + "security": [
2565 + {
2566 + "ApiKeyAuth": []
2567 + },
2568 + {
2569 + "UserApiKeyAuth": []
2570 + }
2571 + ],
2572 + "parameters": [
2573 + {
2574 + "schema": {
2575 + "type": "string",
2576 + "format": "authConfigId",
2577 + "description": "The unique identifier of the authentication configuration to update"
2578 + },
2579 + "required": true,
2580 + "description": "The unique identifier of the authentication configuration to update",
2581 + "name": "nanoid",
2582 + "in": "path"
2583 + },
2584 + {
2585 + "schema": {
2586 + "type": "string",
2587 + "enum": [
2588 + "ENABLED",
2589 + "DISABLED"
2590 + ],
2591 + "description": "The new status to set for the auth configuration"
2592 + },
2593 + "required": true,
2594 + "description": "The new status to set for the auth configuration",
2595 + "name": "status",
2596 + "in": "path"
2597 + }
2598 + ],
2599 + "responses": {
2600 + "200": {
2601 + "description": "Successfully updated auth config status",
2602 + "content": {
2603 + "application/json": {
2604 + "schema": {
2605 + "type": "object",
2606 + "properties": {}
2607 + }
2608 + }
2609 + }
2610 + },
2611 + "400": {
2612 + "description": "Bad request - Invalid auth config ID or status value",
2613 + "content": {
2614 + "application/json": {
2615 + "schema": {
2616 + "$ref": "#/components/schemas/Error"
2617 + }
2618 + }
2619 + }
2620 + },
2621 + "401": {
2622 + "description": "Unauthorized - Authentication required",
2623 + "content": {
2624 + "application/json": {
2625 + "schema": {
2626 + "$ref": "#/components/schemas/Error"
2627 + }
2628 + }
2629 + }
2630 + },
2631 + "404": {
2632 + "description": "Not found - Auth configuration does not exist",
2633 + "content": {
2634 + "application/json": {
2635 + "schema": {
2636 + "$ref": "#/components/schemas/Error"
2637 + }
2638 + }
2639 + }
2640 + },
2641 + "500": {
2642 + "description": "Internal server error - Something went wrong on the server",
2643 + "content": {
2644 + "application/json": {
2645 + "schema": {
2646 + "$ref": "#/components/schemas/Error"
2647 + }
2648 + }
2649 + }
2650 + }
2651 + },
2652 + "x-api-version": "3.0"
2653 + }
2654 + },
2655 + "/api/v3/connected_accounts": {
2656 + "get": {
2657 + "summary": "List connected accounts with optional filters",
2658 + "description": "Retrieves all connected accounts for your project. Connected accounts represent authenticated user connections to external services (e.g., a user's Gmail account, Slack workspace). Filter by toolkit, status, user ID, or auth config to find specific connections.",
2659 + "tags": [
2660 + "Connected Accounts"
2661 + ],
2662 + "operationId": "getConnectedAccounts",
2663 + "security": [
2664 + {
2665 + "ApiKeyAuth": []
2666 + },
2667 + {
2668 + "UserApiKeyAuth": []
2669 + }
2670 + ],
2671 + "parameters": [
2672 + {
2673 + "schema": {
2674 + "type": "array",
2675 + "nullable": true,
2676 + "items": {
2677 + "type": "string"
2678 + },
2679 + "description": "The toolkit slugs of the connected accounts"
2680 + },
2681 + "required": false,
2682 + "description": "The toolkit slugs of the connected accounts",
2683 + "name": "toolkit_slugs",
2684 + "in": "query"
2685 + },
2686 + {
2687 + "schema": {
2688 + "type": "array",
2689 + "nullable": true,
2690 + "items": {
2691 + "type": "string",
2692 + "enum": [
2693 + "INITIALIZING",
2694 + "INITIATED",
2695 + "ACTIVE",
2696 + "FAILED",
2697 + "EXPIRED",
2698 + "INACTIVE"
2699 + ]
2700 + },
2701 + "description": "The status of the connected account"
2702 + },
2703 + "required": false,
2704 + "description": "The status of the connected account",
2705 + "name": "statuses",
2706 + "in": "query"
2707 + },
2708 + {
2709 + "schema": {
2710 + "type": "string",
2711 + "nullable": true,
2712 + "description": "The cursor to paginate through the connected accounts"
2713 + },
2714 + "required": false,
2715 + "description": "The cursor to paginate through the connected accounts",
2716 + "name": "cursor",
2717 + "in": "query"
2718 + },
2719 + {
2720 + "schema": {
2721 + "type": "number",
2722 + "nullable": true,
2723 + "description": "The limit of the connected accounts to return"
2724 + },
2725 + "required": false,
2726 + "description": "The limit of the connected accounts to return",
2727 + "name": "limit",
2728 + "in": "query"
2729 + },
2730 + {
2731 + "schema": {
2732 + "type": "array",
2733 + "nullable": true,
2734 + "items": {
2735 + "type": "string"
2736 + },
2737 + "description": "The user ids of the connected accounts"
2738 + },
2739 + "required": false,
2740 + "description": "The user ids of the connected accounts",
2741 + "name": "user_ids",
2742 + "in": "query"
2743 + },
2744 + {
2745 + "schema": {
2746 + "type": "array",
2747 + "nullable": true,
2748 + "items": {
2749 + "type": "string",
2750 + "format": "authConfigId"
2751 + },
2752 + "description": "The auth config ids of the connected accounts"
2753 + },
2754 + "required": false,
2755 + "description": "The auth config ids of the connected accounts",
2756 + "name": "auth_config_ids",
2757 + "in": "query"
2758 + },
2759 + {
2760 + "schema": {
2761 + "type": "array",
2762 + "nullable": true,
2763 + "items": {
2764 + "type": "string",
2765 + "format": "connectedAccountId"
2766 + },
2767 + "description": "The connected account ids to filter by"
2768 + },
2769 + "required": false,
2770 + "description": "The connected account ids to filter by",
2771 + "name": "connected_account_ids",
2772 + "in": "query"
2773 + },
2774 + {
2775 + "schema": {
2776 + "type": "string",
2777 + "enum": [
2778 + "created_at",
2779 + "updated_at"
2780 + ],
2781 + "default": "created_at",
2782 + "description": "The order by of the connected accounts"
2783 + },
2784 + "required": false,
2785 + "description": "The order by of the connected accounts",
2786 + "name": "order_by",
2787 + "in": "query"
2788 + },
2789 + {
2790 + "schema": {
2791 + "type": "string",
2792 + "enum": [
2793 + "asc",
2794 + "desc"
2795 + ],
2796 + "default": "desc",
2797 + "description": "The order direction of the connected accounts"
2798 + },
2799 + "required": false,
2800 + "description": "The order direction of the connected accounts",
2801 + "name": "order_direction",
2802 + "in": "query"
2803 + }
2804 + ],
2805 + "responses": {
2806 + "200": {
2807 + "description": "Successfully retrieved connected accounts",
2808 + "content": {
2809 + "application/json": {
2810 + "schema": {
2811 + "type": "object",
2812 + "properties": {
2813 + "items": {
2814 + "type": "array",
2815 + "items": {
2816 + "type": "object",
2817 + "properties": {
2818 + "toolkit": {
2819 + "type": "object",
2820 + "properties": {
2821 + "slug": {
2822 + "type": "string",
2823 + "description": "The slug of the toolkit"
2824 + }
2825 + },
2826 + "required": [
2827 + "slug"
2828 + ]
2829 + },
2830 + "auth_config": {
2831 + "type": "object",
2832 + "properties": {
2833 + "id": {
2834 + "type": "string",
2835 + "format": "authConfigId",
2836 + "description": "The id of the auth config"
2837 + },
2838 + "auth_scheme": {
2839 + "type": "string",
2840 + "enum": [
2841 + "OAUTH2",
2842 + "OAUTH1",
2843 + "API_KEY",
2844 + "BASIC",
2845 + "BILLCOM_AUTH",
2846 + "BEARER_TOKEN",
2847 + "GOOGLE_SERVICE_ACCOUNT",
2848 + "NO_AUTH",
2849 + "BASIC_WITH_JWT",
2850 + "CALCOM_AUTH",
2851 + "SERVICE_ACCOUNT",
2852 + "SAML",
2853 + "DCR_OAUTH",
2854 + "S2S_OAUTH2"
2855 + ],
2856 + "description": "the authScheme is part of the connection state use it there",
2857 + "deprecated": true
2858 + },
2859 + "is_composio_managed": {
2860 + "type": "boolean",
2861 + "description": "Whether the auth config is managed by Composio"
2862 + },
2863 + "is_disabled": {
2864 + "type": "boolean",
2865 + "description": "Whether the auth config is disabled"
2866 + },
2867 + "deprecated": {
2868 + "type": "object",
2869 + "properties": {
2870 + "uuid": {
2871 + "type": "string",
2872 + "format": "uuid",
2873 + "description": "The uuid of the auth config"
2874 + }
2875 + },
2876 + "required": [
2877 + "uuid"
2878 + ],
2879 + "deprecated": true
2880 + }
2881 + },
2882 + "required": [
2883 + "id",
2884 + "auth_scheme",
2885 + "is_composio_managed",
2886 + "is_disabled"
2887 + ]
2888 + },
2889 + "id": {
2890 + "type": "string",
2891 + "format": "connectedAccountId",
2892 + "description": "The id of the connection"
2893 + },
2894 + "word_id": {
2895 + "type": "string",
2896 + "nullable": true,
2897 + "description": "A short, token-friendly identifier for multi-account disambiguation, typically toolkit-prefixed with 1-2 words (e.g., \"gmail_red-castle\")"
2898 + },
2899 + "alias": {
2900 + "type": "string",
2901 + "nullable": true,
2902 + "description": "A user-defined alias for the connected account"
2903 + },
2904 + "user_id": {
2905 + "type": "string",
2906 + "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back",
2907 + "deprecated": true
2908 + },
2909 + "status": {
2910 + "type": "string",
2911 + "enum": [
2912 + "INITIALIZING",
2913 + "INITIATED",
2914 + "ACTIVE",
2915 + "FAILED",
2916 + "EXPIRED",
2917 + "INACTIVE"
2918 + ],
2919 + "description": "The status of the connection"
2920 + },
2921 + "created_at": {
2922 + "type": "string",
2923 + "description": "The created at of the connection"
2924 + },
2925 + "updated_at": {
2926 + "type": "string",
2927 + "description": "The updated at of the connection"
2928 + },
2929 + "state": {
2930 + "description": "The state of the connection",
2931 + "type": "object",
2932 + "properties": {
2933 + "authScheme": {
2934 + "type": "string",
2935 + "enum": [
2936 + "OAUTH1",
2937 + "OAUTH2",
2938 + "API_KEY",
2939 + "BASIC",
2940 + "BEARER_TOKEN",
2941 + "GOOGLE_SERVICE_ACCOUNT",
2942 + "NO_AUTH",
2943 + "CALCOM_AUTH",
2944 + "BILLCOM_AUTH",
2945 + "BASIC_WITH_JWT",
2946 + "SERVICE_ACCOUNT",
2947 + "SAML",
2948 + "DCR_OAUTH",
2949 + "S2S_OAUTH2"
2950 + ]
2951 + },
2952 + "val": {
2953 + "type": "object",
2954 + "properties": {
2955 + "subdomain": {
2956 + "type": "string"
2957 + },
2958 + "your-domain": {
2959 + "type": "string"
2960 + },
2961 + "region": {
2962 + "type": "string"
2963 + },
2964 + "shop": {
2965 + "type": "string"
2966 + },
2967 + "account_url": {
2968 + "type": "string"
2969 + },
2970 + "COMPANYDOMAIN": {
2971 + "type": "string"
2972 + },
2973 + "extension": {
2974 + "type": "string"
2975 + },
2976 + "form_api_base_url": {
2977 + "type": "string"
2978 + },
2979 + "instanceEndpoint": {
2980 + "type": "string"
2981 + },
2982 + "api_url": {
2983 + "type": "string"
2984 + },
2985 + "borneo_dashboard_url": {
2986 + "type": "string"
2987 + },
2988 + "proxy_username": {
2989 + "type": "string"
2990 + },
2991 + "proxy_password": {
2992 + "type": "string"
2993 + },
2994 + "domain": {
2995 + "type": "string"
2996 + },
2997 + "version": {
2998 + "type": "string"
2999 + },
3000 + "dc": {
3001 + "type": "string"
3002 + },
3003 + "site_name": {
3004 + "type": "string"
3005 + },
3006 + "instanceName": {
3007 + "type": "string"
3008 + },
3009 + "account_id": {
3010 + "type": "string"
3011 + },
3012 + "your_server": {
3013 + "type": "string"
3014 + },
3015 + "server_location": {
3016 + "type": "string"
3017 + },
3018 + "base_url": {
3019 + "type": "string"
3020 + },
3021 + "status": {
3022 + "type": "string",
3023 + "enum": [
3024 + "INITIALIZING",
3025 + "INITIATED",
3026 + "ACTIVE",
3027 + "FAILED",
3028 + "EXPIRED",
3029 + "INACTIVE"
3030 + ]
3031 + },
3032 + "oauth_token": {
3033 + "type": "string"
3034 + },
3035 + "authUri": {
3036 + "type": "string"
3037 + },
3038 + "oauth_token_secret": {
3039 + "type": "string"
3040 + },
3041 + "redirectUrl": {
3042 + "type": "string"
3043 + },
3044 + "callbackUrl": {
3045 + "type": "string"
3046 + },
3047 + "oauth_verifier": {
3048 + "type": "string"
3049 + },
3050 + "consumer_key": {
3051 + "type": "string"
3052 + },
3053 + "callback_url": {
3054 + "type": "string"
3055 + },
3056 + "error": {
3057 + "type": "string"
3058 + },
3059 + "error_description": {
3060 + "type": "string"
3061 + },
3062 + "expired_at": {
3063 + "type": "string"
3064 + }
3065 + },
3066 + "required": [
3067 + "status"
3068 + ],
3069 + "additionalProperties": true
3070 + }
3071 + },
3072 + "required": [
3073 + "authScheme",
3074 + "val"
3075 + ],
3076 + "additionalProperties": true
3077 + },
3078 + "data": {
3079 + "type": "object",
3080 + "additionalProperties": {},
3081 + "description": "This is deprecated, use `state` instead",
3082 + "deprecated": true
3083 + },
3084 + "status_reason": {
3085 + "type": "string",
3086 + "nullable": true,
3087 + "description": "The reason the connection status changed. Possible reasons: Connection initiation did not complete within 10 minutes, Permanent auth error during token refresh, Max auth failures reached, OAuth callback failed during token exchange, Connection status updated by user, Auth config is disabled"
3088 + },
3089 + "is_disabled": {
3090 + "type": "boolean",
3091 + "description": "Whether the connection is disabled"
3092 + },
3093 + "test_request_endpoint": {
3094 + "type": "string",
3095 + "description": "The endpoint to make test request for verification"
3096 + },
3097 + "deprecated": {
3098 + "type": "object",
3099 + "properties": {
3100 + "labels": {
3101 + "type": "array",
3102 + "items": {
3103 + "type": "string"
3104 + },
3105 + "description": "The labels of the connection"
3106 + },
3107 + "uuid": {
3108 + "type": "string",
3109 + "format": "uuid",
3110 + "description": "The uuid of the connection"
3111 + }
3112 + },
3113 + "required": [
3114 + "labels",
3115 + "uuid"
3116 + ],
3117 + "deprecated": true
3118 + }
3119 + },
3120 + "required": [
3121 + "toolkit",
3122 + "auth_config",
3123 + "id",
3124 + "word_id",
3125 + "alias",
3126 + "user_id",
3127 + "status",
3128 + "created_at",
3129 + "updated_at",
3130 + "state",
3131 + "data",
3132 + "status_reason",
3133 + "is_disabled"
3134 + ]
3135 + }
3136 + },
3137 + "next_cursor": {
3138 + "type": "string",
3139 + "nullable": true
3140 + },
3141 + "total_pages": {
3142 + "type": "number"
3143 + },
3144 + "current_page": {
3145 + "type": "number"
3146 + },
3147 + "total_items": {
3148 + "type": "number"
3149 + }
3150 + },
3151 + "required": [
3152 + "items",
3153 + "total_pages",
3154 + "current_page",
3155 + "total_items"
3156 + ]
3157 + }
3158 + }
3159 + }
3160 + },
3161 + "400": {
3162 + "description": "Bad request",
3163 + "content": {
3164 + "application/json": {
3165 + "schema": {
3166 + "$ref": "#/components/schemas/Error"
3167 + }
3168 + }
3169 + }
3170 + },
3171 + "401": {
3172 + "description": "Unauthorized",
3173 + "content": {
3174 + "application/json": {
3175 + "schema": {
3176 + "$ref": "#/components/schemas/Error"
3177 + }
3178 + }
3179 + }
3180 + },
3181 + "404": {
3182 + "description": "Not found",
3183 + "content": {
3184 + "application/json": {
3185 + "schema": {
3186 + "$ref": "#/components/schemas/Error"
3187 + }
3188 + }
3189 + }
3190 + },
3191 + "422": {
3192 + "description": "Unprocessable entity",
3193 + "content": {
3194 + "application/json": {
3195 + "schema": {
3196 + "$ref": "#/components/schemas/Error"
3197 + }
3198 + }
3199 + }
3200 + },
3201 + "500": {
3202 + "description": "Internal server error",
3203 + "content": {
3204 + "application/json": {
3205 + "schema": {
3206 + "$ref": "#/components/schemas/Error"
3207 + }
3208 + }
3209 + }
3210 + }
3211 + },
3212 + "x-api-version": "3.0"
3213 + },
3214 + "post": {
3215 + "summary": "Create a new connected account",
3216 + "description": "Initiates a new connection to an external service for a user. For OAuth-based toolkits, this returns a redirect URL to complete authentication. For API key-based toolkits, provide the credentials directly in the request body. Use the `user_id` field to associate the connection with a specific user in your system.",
3217 + "tags": [
3218 + "Connected Accounts"
3219 + ],
3220 + "operationId": "postConnectedAccounts",
3221 + "security": [
3222 + {
3223 + "ApiKeyAuth": []
3224 + },
3225 + {
3226 + "UserApiKeyAuth": []
3227 + }
3228 + ],
3229 + "requestBody": {
3230 + "content": {
3231 + "application/json": {
3232 + "schema": {
3233 + "type": "object",
3234 + "properties": {
3235 + "auth_config": {
3236 + "type": "object",
3237 + "properties": {
3238 + "id": {
3239 + "type": "string",
3240 + "format": "authConfigId",
3241 + "description": "The auth config id of the app (must be a valid auth config id)"
3242 + }
3243 + },
3244 + "required": [
3245 + "id"
3246 + ]
3247 + },
3248 + "connection": {
3249 + "type": "object",
3250 + "properties": {
3251 + "state": {
3252 + "description": "The state of the connected account",
3253 + "type": "object",
3254 + "properties": {
3255 + "authScheme": {
3256 + "type": "string",
3257 + "enum": [
3258 + "OAUTH1",
3259 + "OAUTH2",
3260 + "API_KEY",
3261 + "BASIC",
3262 + "BEARER_TOKEN",
3263 + "GOOGLE_SERVICE_ACCOUNT",
3264 + "NO_AUTH",
3265 + "CALCOM_AUTH",
3266 + "BILLCOM_AUTH",
3267 + "BASIC_WITH_JWT",
3268 + "SERVICE_ACCOUNT",
3269 + "SAML",
3270 + "DCR_OAUTH",
3271 + "S2S_OAUTH2"
3272 + ]
3273 + },
3274 + "val": {
3275 + "type": "object",
3276 + "properties": {
3277 + "subdomain": {
3278 + "type": "string"
3279 + },
3280 + "your-domain": {
3281 + "type": "string"
3282 + },
3283 + "region": {
3284 + "type": "string"
3285 + },
3286 + "shop": {
3287 + "type": "string"
3288 + },
3289 + "account_url": {
3290 + "type": "string"
3291 + },
3292 + "COMPANYDOMAIN": {
3293 + "type": "string"
3294 + },
3295 + "extension": {
3296 + "type": "string"
3297 + },
3298 + "form_api_base_url": {
3299 + "type": "string"
3300 + },
3301 + "instanceEndpoint": {
3302 + "type": "string"
3303 + },
3304 + "api_url": {
3305 + "type": "string"
3306 + },
3307 + "borneo_dashboard_url": {
3308 + "type": "string"
3309 + },
3310 + "proxy_username": {
3311 + "type": "string"
3312 + },
3313 + "proxy_password": {
3314 + "type": "string"
3315 + },
3316 + "domain": {
3317 + "type": "string"
3318 + },
3319 + "version": {
3320 + "type": "string"
3321 + },
3322 + "dc": {
3323 + "type": "string"
3324 + },
3325 + "site_name": {
3326 + "type": "string"
3327 + },
3328 + "instanceName": {
3329 + "type": "string"
3330 + },
3331 + "account_id": {
3332 + "type": "string"
3333 + },
3334 + "your_server": {
3335 + "type": "string"
3336 + },
3337 + "server_location": {
3338 + "type": "string"
3339 + },
3340 + "base_url": {
3341 + "type": "string"
3342 + },
3343 + "status": {
3344 + "type": "string",
3345 + "enum": [
3346 + "INITIALIZING",
3347 + "INITIATED",
3348 + "ACTIVE",
3349 + "FAILED",
3350 + "EXPIRED",
3351 + "INACTIVE"
3352 + ]
3353 + },
3354 + "oauth_token": {
3355 + "type": "string"
3356 + },
3357 + "authUri": {
3358 + "type": "string"
3359 + },
3360 + "oauth_token_secret": {
3361 + "type": "string"
3362 + },
3363 + "redirectUrl": {
3364 + "type": "string"
3365 + },
3366 + "callbackUrl": {
3367 + "type": "string"
3368 + },
3369 + "oauth_verifier": {
3370 + "type": "string"
3371 + },
3372 + "consumer_key": {
3373 + "type": "string"
3374 + },
3375 + "callback_url": {
3376 + "type": "string"
3377 + },
3378 + "error": {
3379 + "type": "string"
3380 + },
3381 + "error_description": {
3382 + "type": "string"
3383 + },
3384 + "expired_at": {
3385 + "type": "string"
3386 + }
3387 + },
3388 + "required": [
3389 + "status"
3390 + ],
3391 + "additionalProperties": true
3392 + }
3393 + },
3394 + "required": [
3395 + "authScheme",
3396 + "val"
3397 + ],
3398 + "additionalProperties": true
3399 + },
3400 + "data": {
3401 + "type": "object",
3402 + "additionalProperties": {},
3403 + "description": "DEPRECATED: This parameter will be removed in a future version. Please use state instead.",
3404 + "deprecated": true
3405 + },
3406 + "user_id": {
3407 + "type": "string",
3408 + "default": "default",
3409 + "description": "The user id of the connected account"
3410 + },
3411 + "alias": {
3412 + "type": "string",
3413 + "description": "A human-readable alias for this connected account. Must be unique per entity and toolkit within the project."
3414 + },
3415 + "callback_url": {
3416 + "type": "string",
3417 + "format": "uri",
3418 + "description": "The URL to redirect to after connection completion"
3419 + },
3420 + "redirect_uri": {
3421 + "type": "string",
3422 + "format": "uri",
3423 + "description": "DEPRECATED: This parameter will be removed in a future version. Please use callback_url instead.",
3424 + "deprecated": true
3425 + },
3426 + "deprecated_is_v1_rerouted": {
3427 + "type": "boolean",
3428 + "default": false,
3429 + "description": "DEPRECATED: This parameter will be removed in a future version.",
3430 + "deprecated": true
3431 + }
3432 + }
3433 + },
3434 + "validate_credentials": {
3435 + "type": "boolean",
3436 + "default": false,
3437 + "description": "[EXPERIMENTAL] Whether to validate the provided credentials, validates only for API Key Auth scheme",
3438 + "x-experimental": true
3439 + }
3440 + },
3441 + "required": [
3442 + "auth_config",
3443 + "connection"
3444 + ]
3445 + }
3446 + }
3447 + }
3448 + },
3449 + "responses": {
3450 + "201": {
3451 + "description": "Successfully created connected account",
3452 + "content": {
3453 + "application/json": {
3454 + "schema": {
3455 + "type": "object",
3456 + "properties": {
3457 + "id": {
3458 + "type": "string",
3459 + "format": "connectedAccountId",
3460 + "description": "The id of the connected account"
3461 + },
3462 + "connectionData": {
3463 + "description": "The connection data of the connected account",
3464 + "type": "object",
3465 + "properties": {
3466 + "authScheme": {
3467 + "type": "string",
3468 + "enum": [
3469 + "OAUTH1",
3470 + "OAUTH2",
3471 + "API_KEY",
3472 + "BASIC",
3473 + "BEARER_TOKEN",
3474 + "GOOGLE_SERVICE_ACCOUNT",
3475 + "NO_AUTH",
3476 + "CALCOM_AUTH",
3477 + "BILLCOM_AUTH",
3478 + "BASIC_WITH_JWT",
3479 + "SERVICE_ACCOUNT",
3480 + "SAML",
3481 + "DCR_OAUTH",
3482 + "S2S_OAUTH2"
3483 + ]
3484 + },
3485 + "val": {
3486 + "type": "object",
3487 + "properties": {
3488 + "subdomain": {
3489 + "type": "string"
3490 + },
3491 + "your-domain": {
3492 + "type": "string"
3493 + },
3494 + "region": {
3495 + "type": "string"
3496 + },
3497 + "shop": {
3498 + "type": "string"
3499 + },
3500 + "account_url": {
3501 + "type": "string"
3502 + },
3503 + "COMPANYDOMAIN": {
3504 + "type": "string"
3505 + },
3506 + "extension": {
3507 + "type": "string"
3508 + },
3509 + "form_api_base_url": {
3510 + "type": "string"
3511 + },
3512 + "instanceEndpoint": {
3513 + "type": "string"
3514 + },
3515 + "api_url": {
3516 + "type": "string"
3517 + },
3518 + "borneo_dashboard_url": {
3519 + "type": "string"
3520 + },
3521 + "proxy_username": {
3522 + "type": "string"
3523 + },
3524 + "proxy_password": {
3525 + "type": "string"
3526 + },
3527 + "domain": {
3528 + "type": "string"
3529 + },
3530 + "version": {
3531 + "type": "string"
3532 + },
3533 + "dc": {
3534 + "type": "string"
3535 + },
3536 + "site_name": {
3537 + "type": "string"
3538 + },
3539 + "instanceName": {
3540 + "type": "string"
3541 + },
3542 + "account_id": {
3543 + "type": "string"
3544 + },
3545 + "your_server": {
3546 + "type": "string"
3547 + },
3548 + "server_location": {
3549 + "type": "string"
3550 + },
3551 + "base_url": {
3552 + "type": "string"
3553 + },
3554 + "status": {
3555 + "type": "string",
3556 + "enum": [
3557 + "INITIALIZING",
3558 + "INITIATED",
3559 + "ACTIVE",
3560 + "FAILED",
3561 + "EXPIRED",
3562 + "INACTIVE"
3563 + ]
3564 + },
3565 + "oauth_token": {
3566 + "type": "string"
3567 + },
3568 + "authUri": {
3569 + "type": "string"
3570 + },
3571 + "oauth_token_secret": {
3572 + "type": "string"
3573 + },
3574 + "redirectUrl": {
3575 + "type": "string"
3576 + },
3577 + "callbackUrl": {
3578 + "type": "string"
3579 + },
3580 + "oauth_verifier": {
3581 + "type": "string"
3582 + },
3583 + "consumer_key": {
3584 + "type": "string"
3585 + },
3586 + "callback_url": {
3587 + "type": "string"
3588 + },
3589 + "error": {
3590 + "type": "string"
3591 + },
3592 + "error_description": {
3593 + "type": "string"
3594 + },
3595 + "expired_at": {
3596 + "type": "string"
3597 + }
3598 + },
3599 + "required": [
3600 + "status"
3601 + ],
3602 + "additionalProperties": true
3603 + }
3604 + },
3605 + "required": [
3606 + "authScheme",
3607 + "val"
3608 + ],
3609 + "additionalProperties": true
3610 + },
3611 + "status": {
3612 + "type": "string",
3613 + "enum": [
3614 + "INITIALIZING",
3615 + "INITIATED",
3616 + "ACTIVE",
3617 + "FAILED",
3618 + "EXPIRED",
3619 + "INACTIVE"
3620 + ],
3621 + "description": "DEPRECATED: This field will be removed in a future version",
3622 + "deprecated": true
3623 + },
3624 + "redirect_url": {
3625 + "type": "string",
3626 + "nullable": true,
3627 + "description": "DEPRECATED: This field will be removed in a future version",
3628 + "deprecated": true
3629 + },
3630 + "redirect_uri": {
3631 + "type": "string",
3632 + "nullable": true,
3633 + "description": "DEPRECATED: This field will be removed in a future version",
3634 + "deprecated": true
3635 + },
3636 + "deprecated": {
3637 + "type": "object",
3638 + "properties": {
3639 + "uuid": {
3640 + "type": "string",
3641 + "format": "uuid",
3642 + "description": "The uuid of the connected account"
3643 + },
3644 + "authConfigUuid": {
3645 + "type": "string",
3646 + "format": "uuid",
3647 + "description": "The uuid of the auth config"
3648 + }
3649 + },
3650 + "required": [
3651 + "uuid",
3652 + "authConfigUuid"
3653 + ],
3654 + "description": "DEPRECATED: This field will be removed in a future version. Please use id and auth_config.id instead.",
3655 + "deprecated": true
3656 + }
3657 + },
3658 + "required": [
3659 + "id",
3660 + "connectionData",
3661 + "status",
3662 + "redirect_url",
3663 + "redirect_uri",
3664 + "deprecated"
3665 + ]
3666 + }
3667 + }
3668 + }
3669 + },
3670 + "400": {
3671 + "description": "Bad request",
3672 + "content": {
3673 + "application/json": {
3674 + "schema": {
3675 + "$ref": "#/components/schemas/Error"
3676 + }
3677 + }
3678 + }
3679 + },
3680 + "401": {
3681 + "description": "Unauthorized",
3682 + "content": {
3683 + "application/json": {
3684 + "schema": {
3685 + "$ref": "#/components/schemas/Error"
3686 + }
3687 + }
3688 + }
3689 + },
3690 + "404": {
3691 + "description": "Not found",
3692 + "content": {
3693 + "application/json": {
3694 + "schema": {
3695 + "$ref": "#/components/schemas/Error"
3696 + }
3697 + }
3698 + }
3699 + },
3700 + "500": {
3701 + "description": "Internal server error",
3702 + "content": {
3703 + "application/json": {
3704 + "schema": {
3705 + "$ref": "#/components/schemas/Error"
3706 + }
3707 + }
3708 + }
3709 + },
3710 + "501": {
3711 + "description": "Not implemented",
3712 + "content": {
3713 + "application/json": {
3714 + "schema": {
3715 + "$ref": "#/components/schemas/Error"
3716 + }
3717 + }
3718 + }
3719 + }
3720 + },
3721 + "x-api-version": "3.0"
3722 + }
3723 + },
3724 + "/api/v3/connected_accounts/{nanoid}": {
3725 + "get": {
3726 + "summary": "Get connected account details by ID",
3727 + "description": "Retrieves comprehensive details of a connected account, including authentication configuration, connection status, and all parameters needed for API requests.",
3728 + "tags": [
3729 + "Connected Accounts"
3730 + ],
3731 + "operationId": "getConnectedAccountsByNanoid",
3732 + "security": [
3733 + {
3734 + "ApiKeyAuth": []
3735 + },
3736 + {
3737 + "UserApiKeyAuth": []
3738 + }
3739 + ],
3740 + "parameters": [
3741 + {
3742 + "schema": {
3743 + "type": "string",
3744 + "format": "connectedAccountId"
3745 + },
3746 + "required": true,
3747 + "description": "The unique identifier (nanoid) of the connected account",
3748 + "example": "ca_1a2b3c4d5e6f",
3749 + "name": "nanoid",
3750 + "in": "path"
3751 + }
3752 + ],
3753 + "responses": {
3754 + "200": {
3755 + "description": "Successfully retrieved connected account details with all authentication parameters and connection status",
3756 + "content": {
3757 + "application/json": {
3758 + "schema": {
3759 + "type": "object",
3760 + "properties": {
3761 + "toolkit": {
3762 + "type": "object",
3763 + "properties": {
3764 + "slug": {
3765 + "type": "string",
3766 + "description": "The slug of the toolkit"
3767 + }
3768 + },
3769 + "required": [
3770 + "slug"
3771 + ]
3772 + },
3773 + "auth_config": {
3774 + "type": "object",
3775 + "properties": {
3776 + "id": {
3777 + "type": "string",
3778 + "format": "authConfigId",
3779 + "description": "The id of the auth config"
3780 + },
3781 + "auth_scheme": {
3782 + "type": "string",
3783 + "enum": [
3784 + "OAUTH2",
3785 + "OAUTH1",
3786 + "API_KEY",
3787 + "BASIC",
3788 + "BILLCOM_AUTH",
3789 + "BEARER_TOKEN",
3790 + "GOOGLE_SERVICE_ACCOUNT",
3791 + "NO_AUTH",
3792 + "BASIC_WITH_JWT",
3793 + "CALCOM_AUTH",
3794 + "SERVICE_ACCOUNT",
3795 + "SAML",
3796 + "DCR_OAUTH",
3797 + "S2S_OAUTH2"
3798 + ],
3799 + "description": "the authScheme is part of the connection state use it there",
3800 + "deprecated": true
3801 + },
3802 + "is_composio_managed": {
3803 + "type": "boolean",
3804 + "description": "Whether the auth config is managed by Composio"
3805 + },
3806 + "is_disabled": {
3807 + "type": "boolean",
3808 + "description": "Whether the auth config is disabled"
3809 + },
3810 + "deprecated": {
3811 + "type": "object",
3812 + "properties": {
3813 + "uuid": {
3814 + "type": "string",
3815 + "format": "uuid",
3816 + "description": "The uuid of the auth config"
3817 + }
3818 + },
3819 + "required": [
3820 + "uuid"
3821 + ],
3822 + "deprecated": true
3823 + }
3824 + },
3825 + "required": [
3826 + "id",
3827 + "auth_scheme",
3828 + "is_composio_managed",
3829 + "is_disabled"
3830 + ]
3831 + },
3832 + "id": {
3833 + "type": "string",
3834 + "format": "connectedAccountId",
3835 + "description": "The id of the connection"
3836 + },
3837 + "word_id": {
3838 + "type": "string",
3839 + "nullable": true,
3840 + "description": "A short, token-friendly identifier for multi-account disambiguation, typically toolkit-prefixed with 1-2 words (e.g., \"gmail_red-castle\")"
3841 + },
3842 + "alias": {
3843 + "type": "string",
3844 + "nullable": true,
3845 + "description": "A user-defined alias for the connected account"
3846 + },
3847 + "user_id": {
3848 + "type": "string",
3849 + "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back",
3850 + "deprecated": true
3851 + },
3852 + "status": {
3853 + "type": "string",
3854 + "enum": [
3855 + "INITIALIZING",
3856 + "INITIATED",
3857 + "ACTIVE",
3858 + "FAILED",
3859 + "EXPIRED",
3860 + "INACTIVE"
3861 + ],
3862 + "description": "The status of the connection"
3863 + },
3864 + "created_at": {
3865 + "type": "string",
3866 + "description": "The created at of the connection"
3867 + },
3868 + "updated_at": {
3869 + "type": "string",
3870 + "description": "The updated at of the connection"
3871 + },
3872 + "state": {
3873 + "description": "The state of the connection",
3874 + "type": "object",
3875 + "properties": {
3876 + "authScheme": {
3877 + "type": "string",
3878 + "enum": [
3879 + "OAUTH1",
3880 + "OAUTH2",
3881 + "API_KEY",
3882 + "BASIC",
3883 + "BEARER_TOKEN",
3884 + "GOOGLE_SERVICE_ACCOUNT",
3885 + "NO_AUTH",
3886 + "CALCOM_AUTH",
3887 + "BILLCOM_AUTH",
3888 + "BASIC_WITH_JWT",
3889 + "SERVICE_ACCOUNT",
3890 + "SAML",
3891 + "DCR_OAUTH",
3892 + "S2S_OAUTH2"
3893 + ]
3894 + },
3895 + "val": {
3896 + "type": "object",
3897 + "properties": {
3898 + "subdomain": {
3899 + "type": "string"
3900 + },
3901 + "your-domain": {
3902 + "type": "string"
3903 + },
3904 + "region": {
3905 + "type": "string"
3906 + },
3907 + "shop": {
3908 + "type": "string"
3909 + },
3910 + "account_url": {
3911 + "type": "string"
3912 + },
3913 + "COMPANYDOMAIN": {
3914 + "type": "string"
3915 + },
3916 + "extension": {
3917 + "type": "string"
3918 + },
3919 + "form_api_base_url": {
3920 + "type": "string"
3921 + },
3922 + "instanceEndpoint": {
3923 + "type": "string"
3924 + },
3925 + "api_url": {
3926 + "type": "string"
3927 + },
3928 + "borneo_dashboard_url": {
3929 + "type": "string"
3930 + },
3931 + "proxy_username": {
3932 + "type": "string"
3933 + },
3934 + "proxy_password": {
3935 + "type": "string"
3936 + },
3937 + "domain": {
3938 + "type": "string"
3939 + },
3940 + "version": {
3941 + "type": "string"
3942 + },
3943 + "dc": {
3944 + "type": "string"
3945 + },
3946 + "site_name": {
3947 + "type": "string"
3948 + },
3949 + "instanceName": {
3950 + "type": "string"
3951 + },
3952 + "account_id": {
3953 + "type": "string"
3954 + },
3955 + "your_server": {
3956 + "type": "string"
3957 + },
3958 + "server_location": {
3959 + "type": "string"
3960 + },
3961 + "base_url": {
3962 + "type": "string"
3963 + },
3964 + "status": {
3965 + "type": "string",
3966 + "enum": [
3967 + "INITIALIZING",
3968 + "INITIATED",
3969 + "ACTIVE",
3970 + "FAILED",
3971 + "EXPIRED",
3972 + "INACTIVE"
3973 + ]
3974 + },
3975 + "oauth_token": {
3976 + "type": "string"
3977 + },
3978 + "authUri": {
3979 + "type": "string"
3980 + },
3981 + "oauth_token_secret": {
3982 + "type": "string"
3983 + },
3984 + "redirectUrl": {
3985 + "type": "string"
3986 + },
3987 + "callbackUrl": {
3988 + "type": "string"
3989 + },
3990 + "oauth_verifier": {
3991 + "type": "string"
3992 + },
3993 + "consumer_key": {
3994 + "type": "string"
3995 + },
3996 + "callback_url": {
3997 + "type": "string"
3998 + },
3999 + "error": {
4000 + "type": "string"
4001 + },
4002 + "error_description": {
4003 + "type": "string"
4004 + },
4005 + "expired_at": {
4006 + "type": "string"
4007 + }
4008 + },
4009 + "required": [
4010 + "status"
4011 + ],
4012 + "additionalProperties": true
4013 + }
4014 + },
4015 + "required": [
4016 + "authScheme",
4017 + "val"
4018 + ],
4019 + "additionalProperties": true
4020 + },
4021 + "data": {
4022 + "type": "object",
4023 + "additionalProperties": {},
4024 + "description": "This is deprecated, use `state` instead",
4025 + "deprecated": true
4026 + },
4027 + "status_reason": {
4028 + "type": "string",
4029 + "nullable": true,
4030 + "description": "The reason the connection status changed. Possible reasons: Connection initiation did not complete within 10 minutes, Permanent auth error during token refresh, Max auth failures reached, OAuth callback failed during token exchange, Connection status updated by user, Auth config is disabled"
4031 + },
4032 + "is_disabled": {
4033 + "type": "boolean",
4034 + "description": "Whether the connection is disabled"
4035 + },
4036 + "test_request_endpoint": {
4037 + "type": "string",
4038 + "description": "The endpoint to make test request for verification"
4039 + },
4040 + "deprecated": {
4041 + "type": "object",
4042 + "properties": {
4043 + "labels": {
4044 + "type": "array",
4045 + "items": {
4046 + "type": "string"
4047 + },
4048 + "description": "The labels of the connection"
4049 + },
4050 + "uuid": {
4051 + "type": "string",
4052 + "format": "uuid",
4053 + "description": "The uuid of the connection"
4054 + }
4055 + },
4056 + "required": [
4057 + "labels",
4058 + "uuid"
4059 + ],
4060 + "deprecated": true
4061 + },
4062 + "params": {
4063 + "type": "object",
4064 + "additionalProperties": {},
4065 + "description": "The initialization data of the connection, including configuration parameters",
4066 + "deprecated": true
4067 + }
4068 + },
4069 + "required": [
4070 + "toolkit",
4071 + "auth_config",
4072 + "id",
4073 + "word_id",
4074 + "alias",
4075 + "user_id",
4076 + "status",
4077 + "created_at",
4078 + "updated_at",
4079 + "state",
4080 + "data",
4081 + "status_reason",
4082 + "is_disabled",
4083 + "params"
4084 + ]
4085 + }
4086 + }
4087 + }
4088 + },
4089 + "400": {
4090 + "description": "Bad request - Invalid nanoid format or other validation error",
4091 + "content": {
4092 + "application/json": {
4093 + "schema": {
4094 + "$ref": "#/components/schemas/Error"
4095 + }
4096 + }
4097 + }
4098 + },
4099 + "401": {
4100 + "description": "Unauthorized - Authentication failed",
4101 + "content": {
4102 + "application/json": {
4103 + "schema": {
4104 + "$ref": "#/components/schemas/Error"
4105 + }
4106 + }
4107 + }
4108 + },
4109 + "403": {
4110 + "description": "Forbidden - Insufficient permissions to access this connected account",
4111 + "content": {
4112 + "application/json": {
4113 + "schema": {
4114 + "$ref": "#/components/schemas/Error"
4115 + }
4116 + }
4117 + }
4118 + },
4119 + "404": {
4120 + "description": "Not found - Connected account does not exist or was deleted",
4121 + "content": {
4122 + "application/json": {
4123 + "schema": {
4124 + "$ref": "#/components/schemas/Error"
4125 + }
4126 + }
4127 + }
4128 + },
4129 + "500": {
4130 + "description": "Internal server error - Failed to retrieve connected account details",
4131 + "content": {
4132 + "application/json": {
4133 + "schema": {
4134 + "$ref": "#/components/schemas/Error"
4135 + }
4136 + }
4137 + }
4138 + },
4139 + "501": {
4140 + "description": "Not implemented - This operation is not supported for the requested connected account or authentication scheme",
4141 + "content": {
4142 + "application/json": {
4143 + "schema": {
4144 + "$ref": "#/components/schemas/Error"
4145 + }
4146 + }
4147 + }
4148 + }
4149 + },
4150 + "x-api-version": "3.0"
4151 + },
4152 + "delete": {
4153 + "summary": "Delete a connected account",
4154 + "description": "Soft-deletes a connected account by marking it as deleted in the database. This prevents the account from being used for API calls but preserves the record for audit purposes.",
4155 + "tags": [
4156 + "Connected Accounts"
4157 + ],
4158 + "operationId": "deleteConnectedAccountsByNanoid",
4159 + "security": [
4160 + {
4161 + "ApiKeyAuth": []
4162 + },
4163 + {
4164 + "UserApiKeyAuth": []
4165 + }
4166 + ],
4167 + "parameters": [
4168 + {
4169 + "schema": {
4170 + "type": "string",
4171 + "format": "connectedAccountId"
4172 + },
4173 + "required": true,
4174 + "description": "The unique identifier (nanoid) of the connected account",
4175 + "example": "ca_1a2b3c4d5e6f",
4176 + "name": "nanoid",
4177 + "in": "path"
4178 + }
4179 + ],
4180 + "responses": {
4181 + "200": {
4182 + "description": "Successfully deleted the connected account. The account is marked as deleted but retained in the database for historical purposes.",
4183 + "content": {
4184 + "application/json": {
4185 + "schema": {
4186 + "type": "object",
4187 + "properties": {
4188 + "success": {
4189 + "type": "boolean",
4190 + "description": "Indicates whether the connected account was successfully deleted"
4191 + }
4192 + },
4193 + "required": [
4194 + "success"
4195 + ],
4196 + "description": "Response returned after successfully deleting a connected account",
4197 + "example": {
4198 + "success": true
4199 + }
4200 + }
4201 + }
4202 + }
4203 + },
4204 + "400": {
4205 + "description": "Bad request - Invalid nanoid format or other validation error",
4206 + "content": {
4207 + "application/json": {
4208 + "schema": {
4209 + "$ref": "#/components/schemas/Error"
4210 + }
4211 + }
4212 + }
4213 + },
4214 + "401": {
4215 + "description": "Unauthorized - Authentication failed",
4216 + "content": {
4217 + "application/json": {
4218 + "schema": {
4219 + "$ref": "#/components/schemas/Error"
4220 + }
4221 + }
4222 + }
4223 + },
4224 + "403": {
4225 + "description": "Forbidden - Insufficient permissions to delete this connected account",
4226 + "content": {
4227 + "application/json": {
4228 + "schema": {
4229 + "$ref": "#/components/schemas/Error"
4230 + }
4231 + }
4232 + }
4233 + },
4234 + "404": {
4235 + "description": "Connected account not found - The specified account does not exist or has already been deleted",
4236 + "content": {
4237 + "application/json": {
4238 + "schema": {
4239 + "type": "object",
4240 + "properties": {}
4241 + }
4242 + }
4243 + }
4244 + },
4245 + "500": {
4246 + "description": "Internal server error - Failed to delete the connected account due to a server-side issue",
4247 + "content": {
4248 + "application/json": {
4249 + "schema": {
4250 + "$ref": "#/components/schemas/Error"
4251 + }
4252 + }
4253 + }
4254 + }
4255 + },
4256 + "x-api-version": "3.0"
4257 + },
4258 + "patch": {
4259 + "summary": "Update a connected account",
4260 + "description": "Update a connected account. Supports updating the alias and/or credentials. Only specified fields will be updated. Set a credential field to null to remove it. Alias must be unique within the same project, entity, and toolkit scope.",
4261 + "tags": [
4262 + "Connected Accounts"
4263 + ],
4264 + "operationId": "patchConnectedAccountsByNanoid",
4265 + "security": [
4266 + {
4267 + "ApiKeyAuth": []
4268 + },
4269 + {
4270 + "UserApiKeyAuth": []
4271 + }
4272 + ],
4273 + "parameters": [
4274 + {
4275 + "schema": {
4276 + "type": "string",
4277 + "format": "connectedAccountId"
4278 + },
4279 + "required": true,
4280 + "description": "The unique identifier (nanoid) of the connected account",
4281 + "example": "ca_1a2b3c4d5e6f",
4282 + "name": "nanoid",
4283 + "in": "path"
4284 + }
4285 + ],
4286 + "requestBody": {
4287 + "content": {
4288 + "application/json": {
4289 + "schema": {
4290 + "$ref": "#/components/schemas/PatchConnectedAccountBody"
4291 + },
4292 + "examples": {
4293 + "credentials": {
4294 + "summary": "Update credentials",
4295 + "value": {
4296 + "connection": {
4297 + "state": {
4298 + "authScheme": "BEARER_TOKEN",
4299 + "val": {
4300 + "token": "new_access_token"
4301 + }
4302 + }
4303 + }
4304 + }
4305 + },
4306 + "alias": {
4307 + "summary": "Update alias",
4308 + "value": {
4309 + "alias": "work-gmail"
4310 + }
4311 + }
4312 + }
4313 + }
4314 + }
4315 + },
4316 + "responses": {
4317 + "200": {
4318 + "description": "Successfully updated connected account",
4319 + "content": {
4320 + "application/json": {
4321 + "schema": {
4322 + "type": "object",
4323 + "properties": {
4324 + "success": {
4325 + "type": "boolean",
4326 + "description": "Whether the update was successful"
4327 + },
4328 + "id": {
4329 + "type": "string",
4330 + "format": "connectedAccountId",
4331 + "description": "The unique identifier of the updated connected account"
4332 + },
4333 + "status": {
4334 + "type": "string",
4335 + "description": "The current status of the connected account after the update (ACTIVE, EXPIRED, INACTIVE, etc.)"
4336 + }
4337 + },
4338 + "required": [
4339 + "success",
4340 + "id",
4341 + "status"
4342 + ],
4343 + "example": {
4344 + "success": true,
4345 + "id": "ca_1a2b3c4d5e6f",
4346 + "status": "ACTIVE"
4347 + }
4348 + }
4349 + }
4350 + }
4351 + },
4352 + "400": {
4353 + "description": "Bad request - Invalid nanoid, duplicate alias, or invalid credential values",
4354 + "content": {
4355 + "application/json": {
4356 + "schema": {
4357 + "$ref": "#/components/schemas/Error"
4358 + }
4359 + }
4360 + }
4361 + },
4362 + "401": {
4363 + "description": "Unauthorized - Authentication failed",
4364 + "content": {
4365 + "application/json": {
4366 + "schema": {
4367 + "$ref": "#/components/schemas/Error"
4368 + }
4369 + }
4370 + }
4371 + },
4372 + "403": {
4373 + "description": "Forbidden - Insufficient permissions to update this connected account",
4374 + "content": {
4375 + "application/json": {
4376 + "schema": {
4377 + "$ref": "#/components/schemas/Error"
4378 + }
4379 + }
4380 + }
4381 + },
4382 + "404": {
4383 + "description": "Not found - Connected account does not exist or was deleted",
4384 + "content": {
4385 + "application/json": {
4386 + "schema": {
4387 + "$ref": "#/components/schemas/Error"
4388 + }
4389 + }
4390 + }
4391 + },
4392 + "500": {
4393 + "description": "Internal server error - Failed to update connected account",
4394 + "content": {
4395 + "application/json": {
4396 + "schema": {
4397 + "$ref": "#/components/schemas/Error"
4398 + }
4399 + }
4400 + }
4401 + }
4402 + },
4403 + "x-api-version": "3.0"
4404 + }
4405 + },
4406 + "/api/v3/connected_accounts/{nanoId}/status": {
4407 + "patch": {
4408 + "summary": "Enable or disable a connected account",
4409 + "description": "Updates the status of a connected account to either enabled (active) or disabled (inactive). Disabled accounts cannot be used for API calls but remain in the database.",
4410 + "tags": [
4411 + "Connected Accounts"
4412 + ],
4413 + "operationId": "patchConnectedAccountsByNanoIdStatus",
4414 + "security": [
4415 + {
4416 + "ApiKeyAuth": []
4417 + },
4418 + {
4419 + "UserApiKeyAuth": []
4420 + }
4421 + ],
4422 + "parameters": [
4423 + {
4424 + "schema": {
4425 + "type": "string",
4426 + "format": "connectedAccountId"
4427 + },
4428 + "required": true,
4429 + "description": "The unique identifier of the connected account",
4430 + "example": "ca_1a2b3c4d5e6f",
4431 + "name": "nanoId",
4432 + "in": "path"
4433 + }
4434 + ],
4435 + "requestBody": {
4436 + "content": {
4437 + "application/json": {
4438 + "schema": {
4439 + "type": "object",
4440 + "properties": {
4441 + "enabled": {
4442 + "type": "boolean",
4443 + "description": "Set to true to enable the account or false to disable it"
4444 + }
4445 + },
4446 + "required": [
4447 + "enabled"
4448 + ],
4449 + "example": {
4450 + "enabled": true
4451 + }
4452 + }
4453 + }
4454 + }
4455 + },
4456 + "responses": {
4457 + "200": {
4458 + "description": "Successfully updated the connected account status. If enabled=true, the account status is set to ACTIVE; if enabled=false, the status is set to INACTIVE.",
4459 + "content": {
4460 + "application/json": {
4461 + "schema": {
4462 + "type": "object",
4463 + "properties": {
4464 + "success": {
4465 + "type": "boolean",
4466 + "description": "Indicates whether the connected account status was successfully updated"
4467 + }
4468 + },
4469 + "required": [
4470 + "success"
4471 + ],
4472 + "description": "Response returned after successfully updating a connected account status",
4473 + "example": {
4474 + "success": true
4475 + }
4476 + }
4477 + }
4478 + }
4479 + },
4480 + "400": {
4481 + "description": "Bad request - Invalid nanoid format or invalid request body",
4482 + "content": {
4483 + "application/json": {
4484 + "schema": {
4485 + "$ref": "#/components/schemas/Error"
4486 + }
4487 + }
4488 + }
4489 + },
4490 + "401": {
4491 + "description": "Unauthorized - Authentication failed",
4492 + "content": {
4493 + "application/json": {
4494 + "schema": {
4495 + "$ref": "#/components/schemas/Error"
4496 + }
4497 + }
4498 + }
4499 + },
4500 + "403": {
4501 + "description": "Forbidden - Insufficient permissions to update this connected account",
4502 + "content": {
4503 + "application/json": {
4504 + "schema": {
4505 + "$ref": "#/components/schemas/Error"
4506 + }
4507 + }
4508 + }
4509 + },
4510 + "404": {
4511 + "description": "Connected account not found - The specified account does not exist or has been deleted",
4512 + "content": {
4513 + "application/json": {
4514 + "schema": {
4515 + "type": "object",
4516 + "properties": {}
4517 + }
4518 + }
4519 + }
4520 + },
4521 + "500": {
4522 + "description": "Internal server error - Failed to update the connected account status due to a server-side issue",
4523 + "content": {
4524 + "application/json": {
4525 + "schema": {
4526 + "$ref": "#/components/schemas/Error"
4527 + }
4528 + }
4529 + }
4530 + }
4531 + },
4532 + "x-api-version": "3.0"
4533 + }
4534 + },
4535 + "/api/v3/connected_accounts/{nanoid}/refresh": {
4536 + "post": {
4537 + "summary": "Refresh authentication for a connected account",
4538 + "description": "Initiates a new authentication flow for a connected account when credentials have expired or become invalid. This may generate a new authentication URL for OAuth flows or refresh tokens for other auth schemes.",
4539 + "tags": [
4540 + "Connected Accounts"
4541 + ],
4542 + "operationId": "postConnectedAccountsByNanoidRefresh",
4543 + "security": [
4544 + {
4545 + "ApiKeyAuth": []
4546 + },
4547 + {
4548 + "UserApiKeyAuth": []
4549 + }
4550 + ],
4551 + "parameters": [
4552 + {
4553 + "schema": {
4554 + "type": "string",
4555 + "format": "connectedAccountId"
4556 + },
4557 + "required": true,
4558 + "description": "The unique identifier of the connected account",
4559 + "example": "ca_1a2b3c4d5e6f",
4560 + "name": "nanoid",
4561 + "in": "path"
4562 + },
4563 + {
4564 + "schema": {
4565 + "type": "string",
4566 + "format": "uri"
4567 + },
4568 + "required": false,
4569 + "name": "redirect_url",
4570 + "in": "query"
4571 + }
4572 + ],
4573 + "requestBody": {
4574 + "content": {
4575 + "application/json": {
4576 + "schema": {
4577 + "type": "object",
4578 + "properties": {
4579 + "redirect_url": {
4580 + "type": "string",
4581 + "format": "uri"
4582 + },
4583 + "validate_credentials": {
4584 + "type": "boolean",
4585 + "default": false,
4586 + "description": "[EXPERIMENTAL] Whether to validate the provided credentials, validates only for API Key Auth scheme",
4587 + "x-experimental": true
4588 + }
4589 + }
4590 + }
4591 + }
4592 + }
4593 + },
4594 + "responses": {
4595 + "200": {
4596 + "description": "Successfully refreshed the connected account authentication. For OAuth flows, a new redirect URL is provided.",
4597 + "content": {
4598 + "application/json": {
4599 + "schema": {
4600 + "type": "object",
4601 + "properties": {
4602 + "id": {
4603 + "type": "string",
4604 + "description": "The unique identifier of the connected account"
4605 + },
4606 + "status": {
4607 + "type": "string",
4608 + "enum": [
4609 + "INITIALIZING",
4610 + "INITIATED",
4611 + "ACTIVE",
4612 + "FAILED",
4613 + "EXPIRED",
4614 + "INACTIVE"
4615 + ],
4616 + "description": "The current status of the connected account (e.g., active, pending, failed)"
4617 + },
4618 + "redirect_url": {
4619 + "type": "string",
4620 + "nullable": true,
4621 + "description": "The URL to which the user should be redirected to complete the authentication process (null for auth schemes that do not require redirection)"
4622 + }
4623 + },
4624 + "required": [
4625 + "id",
4626 + "status",
4627 + "redirect_url"
4628 + ],
4629 + "description": "Response schema for a refreshed connected account authentication",
4630 + "example": {
4631 + "id": "ca_1a2b3c4d5e6f",
4632 + "status": "ACTIVE",
4633 + "redirect_url": "https://app.example.com/oauth/callback"
4634 + }
4635 + }
4636 + }
4637 + }
4638 + },
4639 + "400": {
4640 + "description": "Bad request - Invalid nanoid format or the account cannot be refreshed in its current state",
4641 + "content": {
4642 + "application/json": {
4643 + "schema": {
4644 + "$ref": "#/components/schemas/Error"
4645 + }
4646 + }
4647 + }
4648 + },
4649 + "401": {
4650 + "description": "Unauthorized - Authentication failed",
4651 + "content": {
4652 + "application/json": {
4653 + "schema": {
4654 + "$ref": "#/components/schemas/Error"
4655 + }
4656 + }
4657 + }
4658 + },
4659 + "403": {
4660 + "description": "Forbidden - Insufficient permissions to refresh this connected account",
4661 + "content": {
4662 + "application/json": {
4663 + "schema": {
4664 + "$ref": "#/components/schemas/Error"
4665 + }
4666 + }
4667 + }
4668 + },
4669 + "404": {
4670 + "description": "Not found - Connected account does not exist or was deleted",
4671 + "content": {
4672 + "application/json": {
4673 + "schema": {
4674 + "$ref": "#/components/schemas/Error"
4675 + }
4676 + }
4677 + }
4678 + },
4679 + "500": {
4680 + "description": "Internal server error - Failed to refresh the connected account authentication",
4681 + "content": {
4682 + "application/json": {
4683 + "schema": {
4684 + "$ref": "#/components/schemas/Error"
4685 + }
4686 + }
4687 + }
4688 + },
4689 + "501": {
4690 + "description": "Not implemented - This operation is not supported for the requested connected account or authentication scheme",
4691 + "content": {
4692 + "application/json": {
4693 + "schema": {
4694 + "$ref": "#/components/schemas/Error"
4695 + }
4696 + }
4697 + }
4698 + }
4699 + },
4700 + "x-api-version": "3.0"
4701 + }
4702 + },
4703 + "/api/v3/connected_accounts/link": {
4704 + "post": {
4705 + "summary": "Create a new auth link session",
4706 + "description": "Creates a new authentication link session that users can use to connect their accounts",
4707 + "tags": [
4708 + "Connected Accounts"
4709 + ],
4710 + "operationId": "postConnectedAccountsLink",
4711 + "security": [
4712 + {
4713 + "ApiKeyAuth": []
4714 + },
4715 + {
4716 + "UserApiKeyAuth": []
4717 + }
4718 + ],
4719 + "requestBody": {
4720 + "content": {
4721 + "application/json": {
4722 + "schema": {
4723 + "type": "object",
4724 + "properties": {
4725 + "auth_config_id": {
4726 + "type": "string",
4727 + "format": "authConfigId",
4728 + "description": "The auth config id to create a link for"
4729 + },
4730 + "user_id": {
4731 + "type": "string",
4732 + "minLength": 1,
4733 + "description": "The user id to create a link for"
4734 + },
4735 + "alias": {
4736 + "type": "string",
4737 + "description": "A human-readable alias for this connected account. Must be unique per entity and toolkit within the project."
4738 + },
4739 + "callback_url": {
4740 + "type": "string",
4741 + "description": "The callback url to create a link for"
4742 + },
4743 + "connection_data": {
4744 + "description": "Optional data to pre-fill connection fields with default values",
4745 + "type": "object",
4746 + "properties": {
4747 + "subdomain": {
4748 + "type": "string"
4749 + },
4750 + "your-domain": {
4751 + "type": "string"
4752 + },
4753 + "region": {
4754 + "type": "string"
4755 + },
4756 + "shop": {
4757 + "type": "string"
4758 + },
4759 + "account_url": {
4760 + "type": "string"
4761 + },
4762 + "COMPANYDOMAIN": {
4763 + "type": "string"
4764 + },
4765 + "extension": {
4766 + "type": "string"
4767 + },
4768 + "form_api_base_url": {
4769 + "type": "string"
4770 + },
4771 + "instanceEndpoint": {
4772 + "type": "string"
4773 + },
4774 + "api_url": {
4775 + "type": "string"
4776 + },
4777 + "borneo_dashboard_url": {
4778 + "type": "string"
4779 + },
4780 + "proxy_username": {
4781 + "type": "string"
4782 + },
4783 + "proxy_password": {
4784 + "type": "string"
4785 + },
4786 + "domain": {
4787 + "type": "string"
4788 + },
4789 + "version": {
4790 + "type": "string"
4791 + },
4792 + "dc": {
4793 + "type": "string"
4794 + },
4795 + "site_name": {
4796 + "type": "string"
4797 + },
4798 + "instanceName": {
4799 + "type": "string"
4800 + },
4801 + "account_id": {
4802 + "type": "string"
4803 + },
4804 + "your_server": {
4805 + "type": "string"
4806 + },
4807 + "server_location": {
4808 + "type": "string"
4809 + },
4810 + "base_url": {
4811 + "type": "string"
4812 + },
4813 + "oauth_token": {
4814 + "type": "string"
4815 + },
4816 + "authUri": {
4817 + "type": "string"
4818 + },
4819 + "oauth_token_secret": {
4820 + "type": "string"
4821 + },
4822 + "redirectUrl": {
4823 + "type": "string"
4824 + },
4825 + "callbackUrl": {
4826 + "type": "string"
4827 + },
4828 + "oauth_verifier": {
4829 + "type": "string"
4830 + },
4831 + "consumer_key": {
4832 + "type": "string"
4833 + },
4834 + "callback_url": {
4835 + "type": "string"
4836 + },
4837 + "error": {
4838 + "type": "string"
4839 + },
4840 + "error_description": {
4841 + "type": "string"
4842 + },
4843 + "expired_at": {
4844 + "type": "string"
4845 + },
4846 + "state_prefix": {
4847 + "type": "string",
4848 + "maxLength": 40,
4849 + "description": "The oauth2 state prefix for the connection"
4850 + },
4851 + "long_redirect_url": {
4852 + "type": "boolean",
4853 + "description": "Whether to return the redirect url without shortening"
4854 + },
4855 + "code_verifier": {
4856 + "type": "string"
4857 + },
4858 + "finalRedirectUri": {
4859 + "type": "string"
4860 + },
4861 + "webhook_signature": {
4862 + "type": "string"
4863 + },
4864 + "access_token": {
4865 + "type": "string"
4866 + },
4867 + "id_token": {
4868 + "type": "string"
4869 + },
4870 + "token_type": {
4871 + "type": "string"
4872 + },
4873 + "refresh_token": {
4874 + "type": "string",
4875 + "nullable": true
4876 + },
4877 + "expires_in": {
4878 + "anyOf": [
4879 + {
4880 + "type": "number"
4881 + },
4882 + {
4883 + "type": "string"
4884 + },
4885 + {
4886 + "nullable": true,
4887 + "type": "object"
4888 + }
4889 + ]
4890 + },
4891 + "scope": {
4892 + "anyOf": [
4893 + {
4894 + "type": "string"
4895 + },
4896 + {
4897 + "type": "array",
4898 + "items": {
4899 + "type": "string"
4900 + }
4901 + },
4902 + {
4903 + "nullable": true,
4904 + "type": "object"
4905 + }
4906 + ]
4907 + },
4908 + "authed_user": {
4909 + "type": "object",
4910 + "properties": {
4911 + "access_token": {
4912 + "type": "string"
4913 + },
4914 + "scope": {
4915 + "type": "string"
4916 + }
4917 + },
4918 + "description": "for slack user scopes"
4919 + },
4920 + "generic_api_key": {
4921 + "type": "string"
4922 + },
4923 + "api_key": {
4924 + "type": "string"
4925 + },
4926 + "bearer_token": {
4927 + "type": "string"
4928 + },
4929 + "basic_encoded": {
4930 + "type": "string"
4931 + },
4932 + "username": {
4933 + "type": "string"
4934 + },
4935 + "password": {
4936 + "type": "string"
4937 + },
4938 + "token": {
4939 + "type": "string"
4940 + },
4941 + "composio_link_redirect_url": {
4942 + "type": "string"
4943 + },
4944 + "credentials_json": {
4945 + "type": "string"
4946 + },
4947 + "sessionId": {
4948 + "type": "string"
4949 + },
4950 + "devKey": {
4951 + "type": "string"
4952 + },
4953 + "application_id": {
4954 + "type": "string"
4955 + },
4956 + "installation_id": {
4957 + "type": "string"
4958 + },
4959 + "private_key": {
4960 + "type": "string"
4961 + },
4962 + "client_id": {
4963 + "type": "string",
4964 + "description": "Dynamically registered client ID"
4965 + },
4966 + "client_secret": {
4967 + "type": "string",
4968 + "description": "Dynamically registered client secret"
4969 + },
4970 + "client_id_issued_at": {
4971 + "type": "number"
4972 + },
4973 + "client_secret_expires_at": {
4974 + "type": "number"
4975 + },
4976 + "expires_at": {
4977 + "type": "string"
4978 + }
4979 + },
4980 + "additionalProperties": true
4981 + }
4982 + },
4983 + "required": [
4984 + "auth_config_id",
4985 + "user_id"
4986 + ]
4987 + }
4988 + }
4989 + }
4990 + },
4991 + "responses": {
4992 + "201": {
4993 + "description": "Successfully created auth link",
4994 + "content": {
4995 + "application/json": {
4996 + "schema": {
4997 + "type": "object",
4998 + "properties": {
4999 + "link_token": {

This file is too large to show in full.

docs/public/openapi.json
+7838 -7590
@@ -1,9 +1,9 @@
1 {
2 "openapi": "3.0.0",
3 "info": {
4 - "version": "3.0.0",
5 - "title": "Composio Platform API",
6 - "description": "",
4 + "version": "3.1.0",
5 + "title": "Composio Platform API v3.1",
6 + "description": "Composio v3.1 API — all endpoints available under /api/v3.1/. Tool endpoints default to the latest tool version.",
7 "contact": {
8 "name": "Composio Support",
9 "url": "https://composio.dev/support",
@@ -124,242 +124,6 @@
124 }
125 },
126 "schemas": {
127 - "Error": {
128 - "type": "object",
129 - "properties": {
130 - "error": {
131 - "type": "object",
132 - "properties": {
133 - "message": {
134 - "type": "string"
135 - },
136 - "code": {
137 - "type": "number"
138 - },
139 - "slug": {
140 - "type": "string"
141 - },
142 - "status": {
143 - "type": "number"
144 - },
145 - "request_id": {
146 - "type": "string"
147 - },
148 - "suggested_fix": {
149 - "type": "string"
150 - },
151 - "errors": {
152 - "type": "array",
153 - "items": {
154 - "type": "string"
155 - }
156 - }
157 - },
158 - "required": [
159 - "message",
160 - "code",
161 - "slug",
162 - "status"
163 - ]
164 - }
165 - },
166 - "required": [
167 - "error"
168 - ]
169 - },
170 - "PatchConnectedAccountBody": {
171 - "type": "object",
172 - "properties": {
173 - "alias": {
174 - "type": "string",
175 - "description": "A human-readable alias for this connected account. Pass an empty string to clear the alias. Must be unique per entity and toolkit within the project."
176 - },
177 - "connection": {
178 - "type": "object",
179 - "properties": {
180 - "state": {
181 - "type": "object",
182 - "properties": {
183 - "authScheme": {
184 - "type": "string",
185 - "enum": [
186 - "BEARER_TOKEN",
187 - "API_KEY",
188 - "BASIC",
189 - "BASIC_WITH_JWT",
190 - "GOOGLE_SERVICE_ACCOUNT",
191 - "SERVICE_ACCOUNT"
192 - ],
193 - "description": "The auth scheme of the connected account. Must match the connection's actual auth scheme."
194 - },
195 - "val": {
196 - "type": "object",
197 - "properties": {
198 - "subdomain": {
199 - "type": "string",
200 - "nullable": true
201 - },
202 - "your-domain": {
203 - "type": "string",
204 - "nullable": true
205 - },
206 - "region": {
207 - "type": "string",
208 - "nullable": true
209 - },
210 - "shop": {
211 - "type": "string",
212 - "nullable": true
213 - },
214 - "account_url": {
215 - "type": "string",
216 - "nullable": true
217 - },
218 - "COMPANYDOMAIN": {
219 - "type": "string",
220 - "nullable": true
221 - },
222 - "extension": {
223 - "type": "string",
224 - "nullable": true
225 - },
226 - "form_api_base_url": {
227 - "type": "string",
228 - "nullable": true
229 - },
230 - "instanceEndpoint": {
231 - "type": "string",
232 - "nullable": true
233 - },
234 - "api_url": {
235 - "type": "string",
236 - "nullable": true
237 - },
238 - "borneo_dashboard_url": {
239 - "type": "string",
240 - "nullable": true
241 - },
242 - "proxy_username": {
243 - "type": "string",
244 - "nullable": true
245 - },
246 - "proxy_password": {
247 - "type": "string",
248 - "nullable": true
249 - },
250 - "domain": {
251 - "type": "string",
252 - "nullable": true
253 - },
254 - "version": {
255 - "type": "string",
256 - "nullable": true
257 - },
258 - "dc": {
259 - "type": "string",
260 - "nullable": true
261 - },
262 - "site_name": {
263 - "type": "string",
264 - "nullable": true
265 - },
266 - "instanceName": {
267 - "type": "string",
268 - "nullable": true
269 - },
270 - "account_id": {
271 - "type": "string",
272 - "nullable": true
273 - },
274 - "your_server": {
275 - "type": "string",
276 - "nullable": true
277 - },
278 - "server_location": {
279 - "type": "string",
280 - "nullable": true
281 - },
282 - "base_url": {
283 - "type": "string",
284 - "nullable": true
285 - },
286 - "token": {
287 - "type": "string",
288 - "nullable": true
289 - },
290 - "generic_api_key": {
291 - "type": "string",
292 - "nullable": true
293 - },
294 - "api_key": {
295 - "type": "string",
296 - "nullable": true
297 - },
298 - "bearer_token": {
299 - "type": "string",
300 - "nullable": true
301 - },
302 - "basic_encoded": {
303 - "type": "string",
304 - "nullable": true
305 - },
306 - "username": {
307 - "type": "string",
308 - "nullable": true
309 - },
310 - "password": {
311 - "type": "string",
312 - "nullable": true
313 - },
314 - "credentials_json": {
315 - "type": "string",
316 - "nullable": true
317 - },
318 - "application_id": {
319 - "type": "string",
320 - "nullable": true
321 - },
322 - "installation_id": {
323 - "type": "string",
324 - "nullable": true
325 - },
326 - "private_key": {
327 - "type": "string",
328 - "nullable": true
329 - }
330 - },
331 - "additionalProperties": {},
332 - "description": "Credential fields to update. Only provided fields are changed — omitted fields are preserved. Set a field to null to remove it."
333 - }
334 - },
335 - "required": [
336 - "authScheme",
337 - "val"
338 - ]
339 - }
340 - },
341 - "required": [
342 - "state"
343 - ]
344 - }
345 - }
346 - },
347 - "DeprecatedToolkitInfo": {
348 - "type": "object",
349 - "properties": {
350 - "toolkitId": {
351 - "type": "string"
352 - }
353 - },
354 - "required": [
355 - "toolkitId"
356 - ],
357 - "description": "Deprecated toolkit ID",
358 - "deprecated": true,
359 - "example": {
360 - "toolkitId": "550e8400-e29b-41d4-a716-446655440000"
361 - }
362 - },
127 "Tool": {
128 "type": "object",
129 "properties": {
@@ -644,27 +408,263 @@
408 "total_items"
409 ]
410 },
647 - "ToolRouterToolkitsListResponse": {
411 + "Error": {
412 "type": "object",
413 "properties": {
650 - "items": {
651 - "type": "array",
652 - "items": {
653 - "type": "object",
654 - "properties": {
655 - "name": {
656 - "type": "string",
657 - "description": "Display name of the toolkit"
658 - },
659 - "slug": {
660 - "type": "string",
661 - "description": "Unique slug identifier"
662 - },
663 - "enabled": {
664 - "type": "boolean",
665 - "description": "Whether the toolkit is enabled"
666 - },
667 - "is_no_auth": {
414 + "error": {
415 + "type": "object",
416 + "properties": {
417 + "message": {
418 + "type": "string"
419 + },
420 + "code": {
421 + "type": "number"
422 + },
423 + "slug": {
424 + "type": "string"
425 + },
426 + "status": {
427 + "type": "number"
428 + },
429 + "request_id": {
430 + "type": "string"
431 + },
432 + "suggested_fix": {
433 + "type": "string"
434 + },
435 + "errors": {
436 + "type": "array",
437 + "items": {
438 + "type": "string"
439 + }
440 + }
441 + },
442 + "required": [
443 + "message",
444 + "code",
445 + "slug",
446 + "status"
447 + ]
448 + }
449 + },
450 + "required": [
451 + "error"
452 + ]
453 + },
454 + "PatchConnectedAccountBody": {
455 + "type": "object",
456 + "properties": {
457 + "alias": {
458 + "type": "string",
459 + "description": "A human-readable alias for this connected account. Pass an empty string to clear the alias. Must be unique per entity and toolkit within the project."
460 + },
461 + "connection": {
462 + "type": "object",
463 + "properties": {
464 + "state": {
465 + "type": "object",
466 + "properties": {
467 + "authScheme": {
468 + "type": "string",
469 + "enum": [
470 + "BEARER_TOKEN",
471 + "API_KEY",
472 + "BASIC",
473 + "BASIC_WITH_JWT",
474 + "GOOGLE_SERVICE_ACCOUNT",
475 + "SERVICE_ACCOUNT"
476 + ],
477 + "description": "The auth scheme of the connected account. Must match the connection's actual auth scheme."
478 + },
479 + "val": {
480 + "type": "object",
481 + "properties": {
482 + "subdomain": {
483 + "type": "string",
484 + "nullable": true
485 + },
486 + "your-domain": {
487 + "type": "string",
488 + "nullable": true
489 + },
490 + "region": {
491 + "type": "string",
492 + "nullable": true
493 + },
494 + "shop": {
495 + "type": "string",
496 + "nullable": true
497 + },
498 + "account_url": {
499 + "type": "string",
500 + "nullable": true
501 + },
502 + "COMPANYDOMAIN": {
503 + "type": "string",
504 + "nullable": true
505 + },
506 + "extension": {
507 + "type": "string",
508 + "nullable": true
509 + },
510 + "form_api_base_url": {
511 + "type": "string",
512 + "nullable": true
513 + },
514 + "instanceEndpoint": {
515 + "type": "string",
516 + "nullable": true
517 + },
518 + "api_url": {
519 + "type": "string",
520 + "nullable": true
521 + },
522 + "borneo_dashboard_url": {
523 + "type": "string",
524 + "nullable": true
525 + },
526 + "proxy_username": {
527 + "type": "string",
528 + "nullable": true
529 + },
530 + "proxy_password": {
531 + "type": "string",
532 + "nullable": true
533 + },
534 + "domain": {
535 + "type": "string",
536 + "nullable": true
537 + },
538 + "version": {
539 + "type": "string",
540 + "nullable": true
541 + },
542 + "dc": {
543 + "type": "string",
544 + "nullable": true
545 + },
546 + "site_name": {
547 + "type": "string",
548 + "nullable": true
549 + },
550 + "instanceName": {
551 + "type": "string",
552 + "nullable": true
553 + },
554 + "account_id": {
555 + "type": "string",
556 + "nullable": true
557 + },
558 + "your_server": {
559 + "type": "string",
560 + "nullable": true
561 + },
562 + "server_location": {
563 + "type": "string",
564 + "nullable": true
565 + },
566 + "base_url": {
567 + "type": "string",
568 + "nullable": true
569 + },
570 + "token": {
571 + "type": "string",
572 + "nullable": true
573 + },
574 + "generic_api_key": {
575 + "type": "string",
576 + "nullable": true
577 + },
578 + "api_key": {
579 + "type": "string",
580 + "nullable": true
581 + },
582 + "bearer_token": {
583 + "type": "string",
584 + "nullable": true
585 + },
586 + "basic_encoded": {
587 + "type": "string",
588 + "nullable": true
589 + },
590 + "username": {
591 + "type": "string",
592 + "nullable": true
593 + },
594 + "password": {
595 + "type": "string",
596 + "nullable": true
597 + },
598 + "credentials_json": {
599 + "type": "string",
600 + "nullable": true
601 + },
602 + "application_id": {
603 + "type": "string",
604 + "nullable": true
605 + },
606 + "installation_id": {
607 + "type": "string",
608 + "nullable": true
609 + },
610 + "private_key": {
611 + "type": "string",
612 + "nullable": true
613 + }
614 + },
615 + "additionalProperties": {},
616 + "description": "Credential fields to update. Only provided fields are changed — omitted fields are preserved. Set a field to null to remove it."
617 + }
618 + },
619 + "required": [
620 + "authScheme",
621 + "val"
622 + ]
623 + }
624 + },
625 + "required": [
626 + "state"
627 + ]
628 + }
629 + }
630 + },
631 + "DeprecatedToolkitInfo": {
632 + "type": "object",
633 + "properties": {
634 + "toolkitId": {
635 + "type": "string"
636 + }
637 + },
638 + "required": [
639 + "toolkitId"
640 + ],
641 + "description": "Deprecated toolkit ID",
642 + "deprecated": true,
643 + "example": {
644 + "toolkitId": "550e8400-e29b-41d4-a716-446655440000"
645 + }
646 + },
647 + "ToolRouterToolkitsListResponse": {
648 + "type": "object",
649 + "properties": {
650 + "items": {
651 + "type": "array",
652 + "items": {
653 + "type": "object",
654 + "properties": {
655 + "name": {
656 + "type": "string",
657 + "description": "Display name of the toolkit"
658 + },
659 + "slug": {
660 + "type": "string",
661 + "description": "Unique slug identifier"
662 + },
663 + "enabled": {
664 + "type": "boolean",
665 + "description": "Whether the toolkit is enabled"
666 + },
667 + "is_no_auth": {
668 "type": "boolean",
669 "description": "Whether the toolkit is no-auth"
670 },
@@ -786,14 +786,14 @@
786 "parameters": {}
787 },
788 "paths": {
789 - "/api/v3/auth/session/info": {
789 + "/api/v3.1/tools": {
790 "get": {
791 - "summary": "Get current user session information",
792 - "description": "Retrieves detailed information about the current authenticated user session, including project details, organization membership, and API key information if applicable. This endpoint is useful for verifying authentication status and retrieving contextual information about the authenticated user and their access privileges.",
791 + "summary": "List available tools",
792 + "description": "Retrieve a paginated list of available tools with comprehensive filtering, sorting and search capabilities. Use query parameters to narrow down results by toolkit, tags, or search terms.",
793 "tags": [
794 - "Authentication"
794 + "Tools"
795 ],
796 - "operationId": "getAuthSessionInfo",
796 + "operationId": "getTools",
797 "security": [
798 {
799 "ApiKeyAuth": []
@@ -802,279 +802,182 @@
802 "UserApiKeyAuth": []
803 }
804 ],
805 + "parameters": [
806 + {
807 + "schema": {
808 + "type": "string"
809 + },
810 + "required": false,
811 + "description": "The slug of the toolkit to filter by",
812 + "in": "query",
813 + "name": "toolkit_slug"
814 + },
815 + {
816 + "schema": {
817 + "type": "string"
818 + },
819 + "required": false,
820 + "description": "Comma-separated list of specific tool slugs to retrieve (overrides other filters)",
821 + "in": "query",
822 + "name": "tool_slugs"
823 + },
824 + {
825 + "schema": {
826 + "oneOf": [
827 + {
828 + "type": "string"
829 + },
830 + {
831 + "type": "array",
832 + "items": {
833 + "type": "string"
834 + }
835 + }
836 + ]
837 + },
838 + "required": false,
839 + "description": "Comma-separated list of auth config IDs to filter tools by",
840 + "in": "query",
841 + "name": "auth_config_ids"
842 + },
843 + {
844 + "schema": {
845 + "type": "string",
846 + "enum": [
847 + "true",
848 + "false"
849 + ]
850 + },
851 + "required": false,
852 + "description": "Filter to only show important/featured tools (set to \"true\" to enable)",
853 + "in": "query",
854 + "name": "important"
855 + },
856 + {
857 + "schema": {
858 + "type": "array",
859 + "items": {
860 + "type": "string"
861 + }
862 + },
863 + "required": false,
864 + "description": "Filter tools by one or more tags (can be specified multiple times)",
865 + "in": "query",
866 + "name": "tags"
867 + },
868 + {
869 + "schema": {
870 + "type": "array",
871 + "nullable": true,
872 + "items": {
873 + "type": "string"
874 + },
875 + "description": "Filter tools by one or more scopes (can be specified multiple times)"
876 + },
877 + "required": false,
878 + "description": "Array of scopes to filter tools by)",
879 + "name": "scopes",
880 + "in": "query"
881 + },
882 + {
883 + "schema": {
884 + "type": "string"
885 + },
886 + "required": false,
887 + "description": "Full-text search query to filter tools by name, slug, or description. Applied as a soft filter on top of other filters.",
888 + "in": "query",
889 + "name": "query"
890 + },
891 + {
892 + "schema": {
893 + "type": "string"
894 + },
895 + "required": false,
896 + "description": "Deprecated: use \"query\" instead. Free-text search query to find tools by name, description, or functionality.",
897 + "in": "query",
898 + "name": "search",
899 + "deprecated": true
900 + },
901 + {
902 + "schema": {
903 + "type": "boolean",
904 + "default": true
905 + },
906 + "required": false,
907 + "description": "Include deprecated tools in the response",
908 + "in": "query",
909 + "name": "include_deprecated"
910 + },
911 + {
912 + "schema": {
913 + "oneOf": [
914 + {
915 + "type": "null"
916 + },
917 + {
918 + "type": "string"
919 + },
920 + {
921 + "type": "object",
922 + "additionalProperties": {
923 + "type": "string"
924 + },
925 + "description": "Object representation of parsed bracket notation"
926 + }
927 + ]
928 + },
929 + "required": false,
930 + "description": "Toolkit version specification. Use \"latest\" for latest versions or bracket notation for specific versions per toolkit.",
931 + "in": "query",
932 + "name": "toolkit_versions",
933 + "examples": {
934 + "latest_version": {
935 + "summary": "Latest version for all toolkits",
936 + "value": "latest"
937 + },
938 + "bracket_notation": {
939 + "summary": "Specific versions using bracket notation",
940 + "value": "Use: toolkit_versions[gmail]=20250930_00&toolkit_versions[slack]=20250929_00"
941 + },
942 + "null_value": {
943 + "summary": "No version specified (uses 00000000_00)",
944 + "value": null
945 + }
946 + }
947 + },
948 + {
949 + "schema": {
950 + "type": "number",
951 + "nullable": true
952 + },
953 + "required": false,
954 + "description": "Number of items per page, max allowed is 1000",
955 + "name": "limit",
956 + "in": "query"
957 + },
958 + {
959 + "schema": {
960 + "type": "string"
961 + },
962 + "required": false,
963 + "description": "Cursor for pagination. The cursor is a base64 encoded string of the page and limit. The page is the page number and the limit is the number of items per page. The cursor is used to paginate through the items. The cursor is not required for the first page.",
964 + "name": "cursor",
965 + "in": "query"
966 + }
967 + ],
968 "responses": {
969 "200": {
807 - "description": "Session is valid and active. Returns detailed information about the authenticated user, their project, and organization.",
970 + "description": "Successfully retrieved tools list with pagination information",
971 "content": {
972 "application/json": {
973 "schema": {
811 - "type": "object",
812 - "properties": {
813 - "project": {
814 - "type": "object",
815 - "nullable": true,
816 - "properties": {
817 - "auto_id": {
818 - "type": "number",
819 - "description": "Internal auto-incrementing ID for the project",
820 - "example": 12345
821 - },
822 - "id": {
823 - "type": "string",
824 - "description": "UUID identifier for the project",
825 - "example": "550e8400-e29b-41d4-a716-446655440000"
826 - },
827 - "org_id": {
828 - "type": "string",
829 - "description": "Organization UUID that this project belongs to",
830 - "example": "550e8400-e29b-41d4-a716-446655440001"
831 - },
832 - "name": {
833 - "type": "string",
834 - "description": "User-defined name for the project",
835 - "example": "Production API"
836 - },
837 - "email": {
838 - "type": "string",
839 - "description": "Email address used for project notifications",
840 - "example": "project-123@composio.dev"
841 - },
842 - "nano_id": {
843 - "type": "string",
844 - "format": "projectId",
845 - "description": "Short, URL-friendly unique identifier for the project",
846 - "example": "proj_abc123xyz456"
847 - },
848 - "created_at": {
849 - "type": "string",
850 - "description": "Date and time when the project was created",
851 - "example": "2023-05-16T14:30:00.000Z"
852 - },
853 - "updated_at": {
854 - "type": "string",
855 - "description": "Date and time when the project was last modified",
856 - "example": "2023-05-18T09:15:30.000Z"
857 - },
858 - "webhook_url": {
859 - "type": "string",
860 - "nullable": true,
861 - "description": "Endpoint URL for trigger webhook notifications",
862 - "example": "https://example.com/webhook"
863 - },
864 - "event_webhook_url": {
865 - "type": "string",
866 - "nullable": true,
867 - "description": "Endpoint URL for event webhook notifications",
868 - "example": "https://example.com/events"
869 - },
870 - "webhook_secret": {
871 - "type": "string",
872 - "nullable": true,
873 - "description": "Secret used to verify webhook signatures",
874 - "example": "whsec_a1b2c3d4e5f6g7h8i9j0"
875 - },
876 - "triggers_enabled": {
877 - "type": "boolean",
878 - "description": "Flag indicating if triggers are enabled for this project",
879 - "example": true
880 - },
881 - "last_subscribed_at": {
882 - "type": "string",
883 - "nullable": true,
884 - "description": "Date and time when the project last subscribed to updates",
885 - "example": "2023-05-17T10:00:00.000Z"
886 - },
887 - "deleted": {
888 - "type": "boolean",
889 - "description": "Flag indicating if the project has been deleted",
890 - "example": false
891 - },
892 - "is_new_webhook": {
893 - "type": "boolean",
894 - "description": "Deprecated: Please refer to webhook_version instead. True indicates if the webhook configuration is using the previous new format (V2). False indicates the oldest format (V1)",
895 - "example": true,
896 - "deprecated": true
897 - },
898 - "webhook_version": {
899 - "type": "string",
900 - "enum": [
901 - "V1",
902 - "V2",
903 - "V3"
904 - ],
905 - "description": "Version of the webhook configuration",
906 - "example": "V2"
907 - },
908 - "org": {
909 - "type": "object",
910 - "properties": {
911 - "id": {
912 - "type": "string",
913 - "format": "orgId",
914 - "description": "Short, URL-friendly unique identifier for the organization",
915 - "example": "org_abc123xyz456"
916 - },
917 - "name": {
918 - "type": "string",
919 - "description": "User-defined name for the organization",
920 - "example": "Acme Corp"
921 - },
922 - "plan": {
923 - "type": "string",
924 - "description": "Current subscription plan level",
925 - "example": "BUSINESS"
926 - }
927 - },
928 - "required": [
929 - "id",
930 - "name",
931 - "plan"
932 - ],
933 - "description": "Organization details"
934 - }
935 - },
936 - "required": [
937 - "auto_id",
938 - "id",
939 - "org_id",
940 - "name",
941 - "email",
942 - "nano_id",
943 - "created_at",
944 - "updated_at",
945 - "webhook_url",
946 - "event_webhook_url",
947 - "webhook_secret",
948 - "triggers_enabled",
949 - "last_subscribed_at",
950 - "deleted",
951 - "is_new_webhook",
952 - "webhook_version",
953 - "org"
954 - ],
955 - "description": "Details of the current active project (null if accessing with org-level credentials)"
956 - },
957 - "api_key": {
958 - "type": "object",
959 - "nullable": true,
960 - "properties": {
961 - "auto_id": {
962 - "type": "number",
963 - "description": "Internal auto-incrementing ID for the API key",
964 - "example": 7890
965 - },
966 - "id": {
967 - "type": "string",
968 - "description": "UUID identifier for the API key",
969 - "example": "550e8400-e29b-41d4-a716-446655440003"
970 - },
971 - "name": {
972 - "type": "string",
973 - "description": "User-defined name for the API key",
974 - "example": "Development Key"
975 - },
976 - "project_id": {
977 - "type": "string",
978 - "format": "projectId",
979 - "description": "Short, URL-friendly unique identifier for the associated project",
980 - "example": "proj_abc123xyz456"
981 - },
982 - "org_member_id": {
983 - "type": "string",
984 - "description": "UUID identifier for the organization member who owns this API key",
985 - "example": "550e8400-e29b-41d4-a716-446655440002"
986 - },
987 - "created_at": {
988 - "type": "string",
989 - "description": "Date and time when the API key was created",
990 - "example": "2023-05-01T10:00:00.000Z"
991 - },
992 - "updated_at": {
993 - "type": "string",
994 - "description": "Date and time when the API key was last modified",
995 - "example": "2023-05-01T10:00:00.000Z"
996 - },
997 - "deleted_at": {
998 - "type": "string",
999 - "nullable": true,
1000 - "description": "Date and time when the API key was deleted (if applicable)"
1001 - },
1002 - "key": {
1003 - "type": "string",
1004 - "description": "The actual API key value (usually only shown once during creation)",
1005 - "example": "sk_live_abc123xyz456"
1006 - },
1007 - "deleted": {
1008 - "type": "boolean",
1009 - "description": "Flag indicating if the API key has been deleted",
1010 - "example": false
1011 - }
1012 - },
1013 - "required": [
1014 - "auto_id",
1015 - "id",
1016 - "name",
1017 - "project_id",
1018 - "org_member_id",
1019 - "created_at",
1020 - "updated_at",
1021 - "deleted_at",
1022 - "key",
1023 - "deleted"
1024 - ],
1025 - "description": "Details of the API key used for authentication (null if using session auth)"
1026 - },
1027 - "org_member": {
1028 - "type": "object",
1029 - "properties": {
1030 - "id": {
1031 - "type": "string",
1032 - "description": "UUID identifier for the organization member",
1033 - "example": "550e8400-e29b-41d4-a716-446655440002"
1034 - },
1035 - "email": {
1036 - "type": "string",
1037 - "description": "Email address of the authenticated user",
1038 - "example": "user@example.com"
1039 - },
1040 - "name": {
1041 - "type": "string",
1042 - "description": "Display name of the authenticated user",
1043 - "example": "John Doe"
1044 - },
1045 - "role": {
1046 - "type": "string",
1047 - "description": "Access role of the authenticated user within the organization",
1048 - "example": "admin"
1049 - }
1050 - },
1051 - "required": [
1052 - "id",
1053 - "email",
1054 - "name",
1055 - "role"
1056 - ],
1057 - "description": "Information about the authenticated user",
1058 - "example": {
1059 - "id": "550e8400-e29b-41d4-a716-446655440002",
1060 - "email": "user@example.com",
1061 - "name": "John Doe",
1062 - "role": "admin"
1063 - }
1064 - }
1065 - },
1066 - "required": [
1067 - "project",
1068 - "api_key",
1069 - "org_member"
1070 - ],
1071 - "description": "Response containing user session information"
974 + "$ref": "#/components/schemas/ToolsPaginated"
975 }
976 }
977 }
978 },
979 "400": {
1077 - "description": "Bad request. The request format may be invalid or missing required parameters.",
980 + "description": "Bad request - Invalid query parameters",
981 "content": {
982 "application/json": {
983 "schema": {
@@ -1084,7 +987,7 @@
987 }
988 },
989 "401": {
1087 - "description": "Unauthorized. Authentication is required or the provided credentials are invalid or expired.",
990 + "description": "Unauthorized - Authentication credentials are missing or invalid",
991 "content": {
992 "application/json": {
993 "schema": {
@@ -1094,7 +997,7 @@
997 }
998 },
999 "403": {
1097 - "description": "Forbidden. The authenticated user does not have permission to access this resource.",
1000 + "description": "Forbidden - User does not have permission to access tools",
1001 "content": {
1002 "application/json": {
1003 "schema": {
@@ -1104,7 +1007,17 @@
1007 }
1008 },
1009 "404": {
1107 - "description": "Not found. The requested project, organization, or member resource could not be found.",
1010 + "description": "Not found - The requested resource was not found",
1011 + "content": {
1012 + "application/json": {
1013 + "schema": {
1014 + "$ref": "#/components/schemas/Error"
1015 + }
1016 + }
1017 + }
1018 + },
1019 + "429": {
1020 + "description": "Too many requests - Rate limit exceeded",
1021 "content": {
1022 "application/json": {
1023 "schema": {
@@ -1114,7 +1027,7 @@
1027 }
1028 },
1029 "500": {
1117 - "description": "Internal server error. An unexpected error occurred while processing the request.",
1030 + "description": "Internal server error - Something went wrong on the server",
1031 "content": {
1032 "application/json": {
1033 "schema": {
@@ -1123,17 +1036,18 @@
1036 }
1037 }
1038 }
1126 - }
1039 + },
1040 + "x-api-version": "3.1"
1041 }
1042 },
1129 - "/api/v3/auth_configs": {
1130 - "post": {
1131 - "summary": "Create new authentication configuration",
1132 - "description": "Creates a new auth config for a toolkit, allowing you to use your own OAuth credentials or API keys instead of Composio-managed authentication. This is required when you want to use custom OAuth apps (bring your own client ID/secret) or configure specific authentication parameters for a toolkit.",
1043 + "/api/v3.1/tools/enum": {
1044 + "get": {
1045 + "summary": "Get tool enum list",
1046 + "description": "Retrieve a list of all available tool enumeration values (tool slugs) from latest version of each toolkit. This endpoint returns a comma-separated string of tool slugs that can be used in other API calls.",
1047 "tags": [
1134 - "Auth Configs"
1048 + "Tools"
1049 ],
1136 - "operationId": "postAuthConfigs",
1050 + "operationId": "getToolsEnum",
1051 "security": [
1052 {
1053 "ApiKeyAuth": []
@@ -1142,305 +1056,33 @@
1056 "UserApiKeyAuth": []
1057 }
1058 ],
1145 - "requestBody": {
1146 - "content": {
1147 - "application/json": {
1148 - "schema": {
1149 - "type": "object",
1150 - "properties": {
1151 - "toolkit": {
1152 - "type": "object",
1153 - "properties": {
1154 - "slug": {
1155 - "type": "string",
1156 - "description": "Toolkit slug to create auth config for"
1157 - }
1158 - },
1159 - "required": [
1160 - "slug"
1161 - ]
1059 + "responses": {
1060 + "200": {
1061 + "description": "Successfully retrieved tool enum list",
1062 + "content": {
1063 + "application/json": {
1064 + "schema": {
1065 + "type": "array",
1066 + "items": {
1067 + "type": "string"
1068 },
1163 - "auth_config": {
1164 - "oneOf": [
1165 - {
1166 - "type": "object",
1167 - "properties": {
1168 - "type": {
1169 - "type": "string",
1170 - "enum": [
1171 - "use_composio_managed_auth"
1172 - ]
1173 - },
1174 - "name": {
1175 - "type": "string",
1176 - "description": "The name of the integration"
1177 - },
1178 - "credentials": {
1179 - "type": "object",
1180 - "properties": {
1181 - "scopes": {
1182 - "anyOf": [
1183 - {
1184 - "type": "string"
1185 - },
1186 - {
1187 - "type": "array",
1188 - "items": {
1189 - "type": "string"
1190 - }
1191 - }
1192 - ]
1193 - },
1194 - "user_scopes": {
1195 - "anyOf": [
1196 - {
1197 - "type": "string"
1198 - },
1199 - {
1200 - "type": "array",
1201 - "items": {
1202 - "type": "string"
1203 - }
1204 - }
1205 - ]
1206 - }
1207 - },
1208 - "default": {}
1209 - },
1210 - "tool_access_config": {
1211 - "type": "object",
1212 - "properties": {
1213 - "tools_for_connected_account_creation": {
1214 - "type": "array",
1215 - "items": {
1216 - "type": "string"
1217 - },
1218 - "default": [],
1219 - "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
1220 - }
1221 - }
1222 - },
1223 - "restrict_to_following_tools": {
1224 - "type": "array",
1225 - "items": {
1226 - "type": "string"
1227 - },
1228 - "default": [],
1229 - "description": "Use tool_access_config instead. This field will be deprecated in the future.",
1230 - "deprecated": true
1231 - },
1232 - "shared_credentials": {
1233 - "type": "object",
1234 - "additionalProperties": {},
1235 - "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
1236 - "x-experimental": true
1237 - },
1238 - "is_enabled_for_tool_router": {
1239 - "type": "boolean",
1240 - "description": "Whether this auth config is enabled for tool router"
1241 - }
1242 - },
1243 - "required": [
1244 - "type"
1245 - ]
1246 - },
1247 - {
1248 - "type": "object",
1249 - "properties": {
1250 - "type": {
1251 - "type": "string",
1252 - "enum": [
1253 - "use_custom_auth"
1254 - ]
1255 - },
1256 - "name": {
1257 - "type": "string",
1258 - "description": "The name of the integration"
1259 - },
1260 - "authScheme": {
1261 - "type": "string",
1262 - "enum": [
1263 - "OAUTH2",
1264 - "OAUTH1",
1265 - "API_KEY",
1266 - "BASIC",
1267 - "BILLCOM_AUTH",
1268 - "BEARER_TOKEN",
1269 - "GOOGLE_SERVICE_ACCOUNT",
1270 - "NO_AUTH",
1271 - "BASIC_WITH_JWT",
1272 - "CALCOM_AUTH",
1273 - "SERVICE_ACCOUNT",
1274 - "SAML",
1275 - "DCR_OAUTH",
1276 - "S2S_OAUTH2"
1277 - ]
1278 - },
1279 - "credentials": {
1280 - "type": "object",
1281 - "properties": {
1282 - "scopes": {
1283 - "anyOf": [
1284 - {
1285 - "type": "string"
1286 - },
1287 - {
1288 - "type": "array",
1289 - "items": {
1290 - "type": "string"
1291 - }
1292 - }
1293 - ]
1294 - },
1295 - "user_scopes": {
1296 - "anyOf": [
1297 - {
1298 - "type": "string"
1299 - },
1300 - {
1301 - "type": "array",
1302 - "items": {
1303 - "type": "string"
1304 - }
1305 - }
1306 - ]
1307 - }
1308 - },
1309 - "default": {}
1310 - },
1311 - "proxy_config": {
1312 - "type": "object",
1313 - "nullable": true,
1314 - "properties": {
1315 - "proxy_url": {
1316 - "type": "string",
1317 - "format": "uri",
1318 - "description": "The url of the auth proxy"
1319 - },
1320 - "proxy_auth_key": {
1321 - "type": "string",
1322 - "description": "The auth key for the auth proxy"
1323 - }
1324 - },
1325 - "required": [
1326 - "proxy_url"
1327 - ]
1328 - },
1329 - "restrict_to_following_tools": {
1330 - "type": "array",
1331 - "items": {
1332 - "type": "string"
1333 - },
1334 - "default": [],
1335 - "description": "Use tool_access_config instead. This field will be deprecated in the future.",
1336 - "deprecated": true
1337 - },
1338 - "tool_access_config": {
1339 - "type": "object",
1340 - "properties": {
1341 - "tools_for_connected_account_creation": {
1342 - "type": "array",
1343 - "items": {
1344 - "type": "string"
1345 - },
1346 - "default": [],
1347 - "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
1348 - }
1349 - }
1350 - },
1351 - "shared_credentials": {
1352 - "type": "object",
1353 - "additionalProperties": {},
1354 - "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
1355 - "x-experimental": true
1356 - },
1357 - "is_enabled_for_tool_router": {
1358 - "type": "boolean",
1359 - "description": "Whether this auth config is enabled for tool router"
1360 - }
1361 - },
1362 - "required": [
1363 - "type",
1364 - "authScheme"
1365 - ]
1366 - }
1367 - ],
1368 - "default": {
1369 - "type": "use_composio_managed_auth",
1370 - "credentials": {},
1371 - "restrict_to_following_tools": []
1372 - }
1373 - }
1374 - },
1375 - "required": [
1376 - "toolkit"
1377 - ]
1069 + "description": "JSON string containing all tool enum values from latest version of each toolkit"
1070 + }
1071 }
1072 }
1380 - }
1381 - },
1382 - "responses": {
1383 - "201": {
1384 - "description": "Successfully created auth config",
1073 + },
1074 + "400": {
1075 + "description": "Bad request - Invalid request parameters",
1076 "content": {
1077 "application/json": {
1078 "schema": {
1388 - "type": "object",
1389 - "properties": {
1390 - "toolkit": {
1391 - "type": "object",
1392 - "properties": {
1393 - "slug": {
1394 - "type": "string",
1395 - "description": "The unique key of the toolkit"
1396 - }
1397 - },
1398 - "required": [
1399 - "slug"
1400 - ]
1401 - },
1402 - "auth_config": {
1403 - "type": "object",
1404 - "properties": {
1405 - "id": {
1406 - "type": "string",
1407 - "format": "authConfigId",
1408 - "description": "The auth config id of the toolkit (must be a valid auth config id)"
1409 - },
1410 - "auth_scheme": {
1411 - "type": "string",
1412 - "description": "The authentication mode of the toolkit"
1413 - },
1414 - "is_composio_managed": {
1415 - "type": "boolean",
1416 - "description": "Whether the auth config is managed by Composio"
1417 - },
1418 - "restrict_to_following_tools": {
1419 - "type": "array",
1420 - "items": {
1421 - "type": "string"
1422 - },
1423 - "default": [],
1424 - "description": "The tools that the user can use with the auth config"
1425 - }
1426 - },
1427 - "required": [
1428 - "id",
1429 - "auth_scheme",
1430 - "is_composio_managed"
1431 - ]
1432 - }
1433 - },
1434 - "required": [
1435 - "toolkit",
1436 - "auth_config"
1437 - ]
1079 + "$ref": "#/components/schemas/Error"
1080 }
1081 }
1082 }
1083 },
1442 - "400": {
1443 - "description": "Bad request",
1084 + "401": {
1085 + "description": "Unauthorized - Authentication credentials are missing or invalid",
1086 "content": {
1087 "application/json": {
1088 "schema": {
@@ -1449,8 +1091,8 @@
1091 }
1092 }
1093 },
1452 - "401": {
1453 - "description": "Unauthorized",
1094 + "403": {
1095 + "description": "Forbidden - User does not have permission to access tool enums",
1096 "content": {
1097 "application/json": {
1098 "schema": {
@@ -1460,7 +1102,7 @@
1102 }
1103 },
1104 "404": {
1463 - "description": "Not found",
1105 + "description": "Not found - Tool enum list not found",
1106 "content": {
1107 "application/json": {
1108 "schema": {
@@ -1470,7 +1112,7 @@
1112 }
1113 },
1114 "500": {
1473 - "description": "Internal server error",
1115 + "description": "Internal server error - Something went wrong on the server",
1116 "content": {
1117 "application/json": {
1118 "schema": {
@@ -1479,15 +1121,18 @@
1121 }
1122 }
1123 }
1482 - }
1483 - },
1124 + },
1125 + "x-api-version": "3.1"
1126 + }
1127 + },
1128 + "/api/v3.1/tools/{tool_slug}": {
1129 "get": {
1485 - "summary": "List authentication configurations with optional filters",
1486 - "description": "Retrieves all auth configs for your project. Auth configs define how users authenticate with external services (OAuth, API keys, etc.). Use filters to find configs for specific toolkits or to distinguish between Composio-managed and custom configurations.",
1130 + "summary": "Get tool by slug",
1131 + "description": "Retrieve detailed information about a specific tool using its slug identifier. This endpoint returns full metadata about a tool including input/output parameters, versions, and toolkit information.",
1132 "tags": [
1488 - "Auth Configs"
1133 + "Tools"
1134 ],
1490 - "operationId": "getAuthConfigs",
1135 + "operationId": "getToolsByToolSlug",
1136 "security": [
1137 {
1138 "ApiKeyAuth": []
@@ -1497,365 +1142,656 @@
1142 }
1143 ],
1144 "parameters": [
1500 - {
1501 - "schema": {
1502 - "anyOf": [
1503 - {
1504 - "type": "string"
1505 - },
1506 - {
1507 - "type": "boolean"
1508 - }
1509 - ],
1510 - "description": "Whether to filter by composio managed auth configs"
1511 - },
1512 - "required": false,
1513 - "description": "Whether to filter by composio managed auth configs",
1514 - "name": "is_composio_managed",
1515 - "in": "query"
1516 - },
1145 {
1146 "schema": {
1147 "type": "string"
1148 },
1521 - "required": false,
1522 - "description": "Comma-separated list of toolkit slugs to filter auth configs by",
1523 - "in": "query",
1524 - "name": "toolkit_slug"
1149 + "required": true,
1150 + "description": "The unique slug identifier of the tool",
1151 + "name": "tool_slug",
1152 + "in": "path"
1153 },
1154 {
1155 "schema": {
1528 - "type": "string",
1529 - "description": "DEPRECATED: This parameter will be removed in a future version. Please use toolkit_slug instead.",
1530 - "deprecated": true
1156 + "type": "string"
1157 },
1158 "required": false,
1533 - "description": "The app id to filter by",
1534 - "name": "deprecated_app_id",
1159 + "description": "Optional version of the tool to retrieve",
1160 + "name": "version",
1161 "in": "query"
1162 },
1163 {
1164 "schema": {
1539 - "type": "string",
1540 - "description": "DEPRECATED: This parameter will be removed in a future version.",
1541 - "deprecated": true
1165 + "oneOf": [
1166 + {
1167 + "type": "null"
1168 + },
1169 + {
1170 + "type": "string"
1171 + },
1172 + {
1173 + "type": "object",
1174 + "additionalProperties": {
1175 + "type": "string"
1176 + },
1177 + "description": "Object representation of parsed bracket notation"
1178 + }
1179 + ]
1180 },
1181 "required": false,
1544 - "name": "deprecated_status",
1545 - "in": "query"
1182 + "description": "Toolkit version specification. Use \"latest\" for latest versions or bracket notation for specific versions per toolkit.",
1183 + "in": "query",
1184 + "name": "toolkit_versions",
1185 + "examples": {
1186 + "latest_version": {
1187 + "summary": "Latest version for all toolkits",
1188 + "value": "latest"
1189 + },
1190 + "bracket_notation": {
1191 + "summary": "Specific versions using bracket notation",
1192 + "value": "Use: toolkit_versions[gmail]=20250930_00&toolkit_versions[slack]=20250929_00"
1193 + },
1194 + "null_value": {
1195 + "summary": "No version specified (uses 00000000_00)",
1196 + "value": null
1197 + }
1198 + }
1199 + }
1200 + ],
1201 + "responses": {
1202 + "200": {
1203 + "description": "Successfully retrieved tool details",
1204 + "content": {
1205 + "application/json": {
1206 + "schema": {
1207 + "$ref": "#/components/schemas/Tool"
1208 + }
1209 + }
1210 + }
1211 },
1547 - {
1548 - "schema": {
1549 - "type": "boolean",
1550 - "nullable": true,
1551 - "default": false,
1552 - "description": "Show disabled auth configs"
1553 - },
1554 - "required": false,
1555 - "description": "Show disabled auth configs",
1556 - "name": "show_disabled",
1557 - "in": "query"
1212 + "400": {
1213 + "description": "Bad request - Invalid tool slug format",
1214 + "content": {
1215 + "application/json": {
1216 + "schema": {
1217 + "$ref": "#/components/schemas/Error"
1218 + }
1219 + }
1220 + }
1221 + },
1222 + "401": {
1223 + "description": "Unauthorized - Authentication credentials are missing or invalid",
1224 + "content": {
1225 + "application/json": {
1226 + "schema": {
1227 + "$ref": "#/components/schemas/Error"
1228 + }
1229 + }
1230 + }
1231 + },
1232 + "404": {
1233 + "description": "Not found - Tool with the specified slug does not exist",
1234 + "content": {
1235 + "application/json": {
1236 + "schema": {
1237 + "$ref": "#/components/schemas/Error"
1238 + }
1239 + }
1240 + }
1241 },
1242 + "500": {
1243 + "description": "Internal server error - Something went wrong on the server",
1244 + "content": {
1245 + "application/json": {
1246 + "schema": {
1247 + "$ref": "#/components/schemas/Error"
1248 + }
1249 + }
1250 + }
1251 + }
1252 + },
1253 + "x-api-version": "3.1"
1254 + }
1255 + },
1256 + "/api/v3.1/tools/execute/{tool_slug}": {
1257 + "post": {
1258 + "summary": "Execute tool",
1259 + "description": "Execute a specific tool operation with provided arguments and authentication. This is the primary endpoint for integrating with third-party services and executing tools. You can provide structured arguments or use natural language processing by providing a text description of what you want to accomplish.",
1260 + "tags": [
1261 + "Tools"
1262 + ],
1263 + "operationId": "postToolsExecuteByToolSlug",
1264 + "security": [
1265 {
1560 - "schema": {
1561 - "type": "string",
1562 - "description": "Search auth configs by name or id"
1563 - },
1564 - "required": false,
1565 - "description": "Search auth configs by name or id",
1566 - "name": "search",
1567 - "in": "query"
1266 + "ApiKeyAuth": []
1267 },
1268 + {
1269 + "UserApiKeyAuth": []
1270 + }
1271 + ],
1272 + "parameters": [
1273 {
1274 "schema": {
1571 - "type": "number",
1572 - "nullable": true
1275 + "type": "string"
1276 },
1574 - "required": false,
1575 - "description": "Number of items per page, max allowed is 1000",
1576 - "name": "limit",
1577 - "in": "query"
1277 + "required": true,
1278 + "description": "The tool slug to execute",
1279 + "name": "tool_slug",
1280 + "in": "path"
1281 },
1282 {
1283 "schema": {
1581 - "type": "string"
1284 + "type": "string",
1285 + "description": "JSON object containing custom headers to pass to LLM providers (OpenAI, Bedrock, etc.)",
1286 + "example": "{\"x-custom-header\": \"value\", \"authorization\": \"Bearer token\"}"
1287 },
1288 "required": false,
1584 - "description": "Cursor for pagination. The cursor is a base64 encoded string of the page and limit. The page is the page number and the limit is the number of items per page. The cursor is used to paginate through the items. The cursor is not required for the first page.",
1585 - "name": "cursor",
1586 - "in": "query"
1289 + "name": "x-llm-gateway-headers",
1290 + "in": "header"
1291 }
1292 ],
1589 - "responses": {
1590 - "200": {
1591 - "description": "Successfully fetched auth configs",
1592 - "content": {
1593 - "application/json": {
1594 - "schema": {
1595 - "type": "object",
1596 - "properties": {
1597 - "items": {
1598 - "type": "array",
1599 - "items": {
1600 - "type": "object",
1601 - "properties": {
1602 - "id": {
1603 - "type": "string",
1604 - "format": "authConfigId",
1605 - "description": "The unique ID of the authentication configuration"
1606 - },
1607 - "uuid": {
1608 - "type": "string",
1609 - "description": "The UUID of the authentication configuration (for backward compatibility)"
1610 - },
1611 - "type": {
1612 - "type": "string",
1613 - "enum": [
1614 - "default",
1615 - "custom"
1616 - ],
1617 - "description": "The type of the authentication configuration (custom or default)"
1618 - },
1619 - "toolkit": {
1620 - "type": "object",
1621 - "properties": {
1622 - "slug": {
1623 - "type": "string",
1624 - "description": "The unique identifier of the integration app"
1625 - },
1626 - "logo": {
1627 - "type": "string",
1628 - "description": "The URL to the integration app's logo image"
1629 - },
1630 - "auth_guide_url": {
1631 - "type": "string",
1632 - "nullable": true,
1633 - "description": "URL to a guide page with authentication setup instructions"
1634 - },
1635 - "auth_hint_url": {
1636 - "type": "string",
1637 - "nullable": true,
1638 - "description": "URL to a page where users can obtain or configure credentials"
1639 - }
1640 - },
1641 - "required": [
1642 - "slug",
1643 - "logo"
1644 - ],
1645 - "description": "Information about the associated integration"
1293 + "requestBody": {
1294 + "content": {
1295 + "application/json": {
1296 + "schema": {
1297 + "type": "object",
1298 + "properties": {
1299 + "connected_account_id": {
1300 + "type": "string",
1301 + "description": "Unique identifier for the connected account to use for authentication",
1302 + "example": "ca_1a2b3c4d5e6f"
1303 + },
1304 + "entity_id": {
1305 + "type": "string",
1306 + "description": "Deprecated: please use user_id instead. Entity identifier for multi-entity connected accounts (e.g. multiple repositories, organizations)",
1307 + "example": "repo-123",
1308 + "deprecated": true
1309 + },
1310 + "user_id": {
1311 + "type": "string",
1312 + "description": "User id for multi-user connected accounts (e.g. multiple users, organizations)",
1313 + "example": "user-123"
1314 + },
1315 + "version": {
1316 + "type": "string",
1317 + "description": "Tool version to execute (defaults to \"00000000_00\" if not specified)",
1318 + "example": "latest"
1319 + },
1320 + "custom_auth_params": {
1321 + "type": "object",
1322 + "properties": {
1323 + "base_url": {
1324 + "type": "string",
1325 + "description": "The base URL (root address) what you should use while making http requests to the connected account. For example, for gmail, it would be 'https://gmail.googleapis.com'"
1326 + },
1327 + "parameters": {
1328 + "type": "array",
1329 + "items": {
1330 + "type": "object",
1331 + "properties": {
1332 + "name": {
1333 + "type": "string",
1334 + "description": "The name of the parameter. For example, 'x-api-key', 'Content-Type', etc."
1335 + },
1336 + "in": {
1337 + "type": "string",
1338 + "enum": [
1339 + "query",
1340 + "header"
1341 + ],
1342 + "description": "The location of the parameter. Can be 'query' or 'header'."
1343 + },
1344 + "value": {
1345 + "anyOf": [
1346 + {
1347 + "type": "string"
1348 + },
1349 + {
1350 + "type": "number"
1351 + }
1352 + ],
1353 + "description": "The value of the parameter. For example, '1234567890', 'application/json', etc."
1354 + }
1355 },
1647 - "name": {
1648 - "type": "string",
1649 - "description": "The display name of the authentication configuration"
1356 + "required": [
1357 + "name",
1358 + "in",
1359 + "value"
1360 + ]
1361 + }
1362 + },
1363 + "body": {
1364 + "type": "object",
1365 + "additionalProperties": {},
1366 + "description": "The body to be sent to the endpoint for authentication. This is a JSON object. Note: This is very rarely needed and is only required by very few apps."
1367 + }
1368 + },
1369 + "description": "Custom authentication parameters for tools that support parameterized authentication",
1370 + "example": {
1371 + "base_url": "https://api.example.com",
1372 + "parameters": [
1373 + {
1374 + "name": "x-api-key",
1375 + "value": "secret-key",
1376 + "in": "header"
1377 + }
1378 + ]
1379 + }
1380 + },
1381 + "custom_connection_data": {
1382 + "description": "Custom connection data for tools that support custom connection data",
1383 + "example": {
1384 + "authScheme": "OAUTH2",
1385 + "toolkitSlug": "github",
1386 + "val": {
1387 + "access_token": "secret-token"
1388 + }
1389 + },
1390 + "type": "object",
1391 + "properties": {
1392 + "authScheme": {
1393 + "type": "string",
1394 + "enum": [
1395 + "OAUTH2",
1396 + "DCR_OAUTH",
1397 + "API_KEY",
1398 + "BASIC_WITH_JWT",
1399 + "BASIC",
1400 + "BEARER_TOKEN",
1401 + "OAUTH1",
1402 + "NO_AUTH",
1403 + "SERVICE_ACCOUNT",
1404 + "GOOGLE_SERVICE_ACCOUNT",
1405 + "S2S_OAUTH2"
1406 + ]
1407 + },
1408 + "toolkitSlug": {
1409 + "type": "string"
1410 + },
1411 + "val": {
1412 + "type": "object",
1413 + "properties": {
1414 + "subdomain": {
1415 + "type": "string"
1416 },
1651 - "auth_scheme": {
1652 - "type": "string",
1653 - "enum": [
1654 - "OAUTH2",
1655 - "OAUTH1",
1656 - "API_KEY",
1657 - "BASIC",
1658 - "BILLCOM_AUTH",
1659 - "BEARER_TOKEN",
1660 - "GOOGLE_SERVICE_ACCOUNT",
1661 - "NO_AUTH",
1662 - "BASIC_WITH_JWT",
1663 - "CALCOM_AUTH",
1664 - "SERVICE_ACCOUNT",
1665 - "SAML",
1666 - "DCR_OAUTH",
1667 - "S2S_OAUTH2"
1668 - ],
1669 - "description": "The authentication scheme used (e.g., OAuth2, API Key, etc.)"
1417 + "your-domain": {
1418 + "type": "string"
1419 },
1671 - "is_composio_managed": {
1672 - "type": "boolean",
1673 - "description": "Whether this authentication configuration is managed by Composio or the user"
1420 + "region": {
1421 + "type": "string"
1422 },
1675 - "credentials": {
1676 - "type": "object",
1677 - "additionalProperties": {},
1678 - "description": "The authentication credentials (tokens, keys, etc.) - may be partially hidden for security"
1423 + "shop": {
1424 + "type": "string"
1425 },
1680 - "proxy_config": {
1681 - "type": "object",
1682 - "nullable": true,
1683 - "properties": {
1684 - "proxy_url": {
1685 - "type": "string",
1686 - "format": "uri",
1687 - "description": "The url of the auth proxy"
1688 - },
1689 - "proxy_auth_key": {
1690 - "type": "string",
1691 - "description": "The auth key for the auth proxy"
1692 - }
1693 - },
1694 - "required": [
1695 - "proxy_url"
1696 - ]
1426 + "account_url": {
1427 + "type": "string"
1428 },
1698 - "status": {
1699 - "type": "string",
1700 - "enum": [
1701 - "ENABLED",
1702 - "DISABLED"
1703 - ],
1704 - "description": "Current status of the authentication configuration"
1429 + "COMPANYDOMAIN": {
1430 + "type": "string"
1431 },
1706 - "created_by": {
1707 - "type": "string",
1708 - "description": "The identifier of the user who created the auth config"
1432 + "extension": {
1433 + "type": "string"
1434 },
1710 - "created_at": {
1711 - "type": "string",
1712 - "description": "ISO 8601 date-time when the auth config was created"
1435 + "form_api_base_url": {
1436 + "type": "string"
1437 },
1714 - "last_updated_at": {
1715 - "type": "string",
1716 - "description": "ISO 8601 date-time when the auth config was last updated"
1438 + "instanceEndpoint": {
1439 + "type": "string"
1440 },
1718 - "no_of_connections": {
1719 - "type": "number",
1720 - "description": "The number of active connections using this auth config"
1441 + "api_url": {
1442 + "type": "string"
1443 },
1722 - "expected_input_fields": {
1723 - "type": "array",
1724 - "items": {
1725 - "nullable": true,
1726 - "type": "object"
1727 - },
1728 - "description": "Fields expected during connection initialization"
1444 + "borneo_dashboard_url": {
1445 + "type": "string"
1446 },
1730 - "restrict_to_following_tools": {
1731 - "type": "array",
1732 - "items": {
1733 - "type": "string"
1734 - },
1735 - "description": "Use tool_access_config instead. This field will be deprecated in the future.",
1736 - "deprecated": true
1447 + "proxy_username": {
1448 + "type": "string"
1449 },
1738 - "tool_access_config": {
1739 - "type": "object",
1740 - "properties": {
1741 - "tools_for_connected_account_creation": {
1742 - "type": "array",
1743 - "items": {
1744 - "type": "string"
1745 - },
1746 - "default": [],
1747 - "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
1748 - },
1749 - "tools_available_for_execution": {
1750 - "type": "array",
1751 - "items": {
1752 - "type": "string"
1753 - },
1754 - "default": [],
1755 - "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
1756 - }
1757 - }
1450 + "proxy_password": {
1451 + "type": "string"
1452 },
1759 - "shared_credentials": {
1760 - "type": "object",
1761 - "additionalProperties": {},
1762 - "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
1763 - "x-experimental": true
1453 + "domain": {
1454 + "type": "string"
1455 },
1765 - "is_enabled_for_tool_router": {
1766 - "type": "boolean",
1767 - "description": "Whether this auth config is enabled for tool router"
1456 + "version": {
1457 + "type": "string"
1458 },
1769 - "deprecated_params": {
1770 - "type": "object",
1771 - "properties": {
1772 - "default_connector_id": {
1773 - "type": "string",
1774 - "nullable": true,
1775 - "description": "Deprecated: Default connector ID"
1459 + "dc": {
1460 + "type": "string"
1461 + },
1462 + "site_name": {
1463 + "type": "string"
1464 + },
1465 + "instanceName": {
1466 + "type": "string"
1467 + },
1468 + "account_id": {
1469 + "type": "string"
1470 + },
1471 + "your_server": {
1472 + "type": "string"
1473 + },
1474 + "server_location": {
1475 + "type": "string"
1476 + },
1477 + "base_url": {
1478 + "type": "string"
1479 + },
1480 + "state_prefix": {
1481 + "type": "string",
1482 + "maxLength": 40,
1483 + "description": "The oauth2 state prefix for the connection"
1484 + },
1485 + "long_redirect_url": {
1486 + "type": "boolean",
1487 + "description": "Whether to return the redirect url without shortening"
1488 + },
1489 + "access_token": {
1490 + "type": "string"
1491 + },
1492 + "id_token": {
1493 + "type": "string"
1494 + },
1495 + "token_type": {
1496 + "type": "string"
1497 + },
1498 + "refresh_token": {
1499 + "type": "string",
1500 + "nullable": true
1501 + },
1502 + "expires_in": {
1503 + "anyOf": [
1504 + {
1505 + "type": "number"
1506 },
1777 - "member_uuid": {
1778 - "type": "string",
1779 - "description": "Deprecated: Member UUID"
1507 + {
1508 + "type": "string"
1509 },
1781 - "toolkit_id": {
1782 - "type": "string",
1783 - "description": "Deprecated: Toolkit ID"
1510 + {
1511 + "nullable": true,
1512 + "type": "object"
1513 + }
1514 + ]
1515 + },
1516 + "scope": {
1517 + "anyOf": [
1518 + {
1519 + "type": "string"
1520 },
1785 - "expected_input_fields": {
1521 + {
1522 "type": "array",
1523 "items": {
1788 - "type": "object",
1789 - "additionalProperties": {}
1790 - },
1791 - "description": "Deprecated: Fields expected during connection initialization"
1524 + "type": "string"
1525 + }
1526 + },
1527 + {
1528 + "nullable": true,
1529 + "type": "object"
1530 + }
1531 + ]
1532 + },
1533 + "webhook_signature": {
1534 + "type": "string"
1535 + },
1536 + "authed_user": {
1537 + "type": "object",
1538 + "properties": {
1539 + "access_token": {
1540 + "type": "string"
1541 + },
1542 + "scope": {
1543 + "type": "string"
1544 }
1545 },
1794 - "required": [
1795 - "default_connector_id"
1796 - ],
1797 - "description": "DEPRECATED: This parameter will be removed in a future version.",
1798 - "deprecated": true
1546 + "description": "for slack user scopes"
1547 + },
1548 + "client_id": {
1549 + "type": "string",
1550 + "description": "Dynamically registered client ID"
1551 + },
1552 + "client_secret": {
1553 + "type": "string",
1554 + "description": "Dynamically registered client secret"
1555 + },
1556 + "client_id_issued_at": {
1557 + "type": "number"
1558 + },
1559 + "client_secret_expires_at": {
1560 + "type": "number"
1561 + },
1562 + "generic_api_key": {
1563 + "type": "string"
1564 + },
1565 + "api_key": {
1566 + "type": "string"
1567 + },
1568 + "bearer_token": {
1569 + "type": "string"
1570 + },
1571 + "basic_encoded": {
1572 + "type": "string"
1573 + },
1574 + "username": {
1575 + "type": "string"
1576 + },
1577 + "password": {
1578 + "type": "string"
1579 + },
1580 + "token": {
1581 + "type": "string"
1582 + },
1583 + "oauth_token": {
1584 + "type": "string"
1585 + },
1586 + "oauth_token_secret": {
1587 + "type": "string"
1588 + },
1589 + "oauth_verifier": {
1590 + "type": "string"
1591 + },
1592 + "consumer_key": {
1593 + "type": "string"
1594 + },
1595 + "redirectUrl": {
1596 + "type": "string"
1597 + },
1598 + "callback_url": {
1599 + "type": "string"
1600 + },
1601 + "application_id": {
1602 + "type": "string"
1603 + },
1604 + "installation_id": {
1605 + "type": "string"
1606 + },
1607 + "private_key": {
1608 + "type": "string"
1609 + },
1610 + "credentials_json": {
1611 + "type": "string"
1612 + },
1613 + "expires_at": {
1614 + "type": "string"
1615 }
1616 },
1617 "required": [
1802 - "id",
1803 - "uuid",
1804 - "type",
1805 - "toolkit",
1806 - "name",
1807 - "status",
1808 - "no_of_connections",
1809 - "tool_access_config"
1810 - ]
1618 + "access_token"
1619 + ],
1620 + "additionalProperties": {}
1621 }
1622 },
1813 - "next_cursor": {
1814 - "type": "string",
1815 - "nullable": true
1816 - },
1817 - "total_pages": {
1818 - "type": "number"
1819 - },
1820 - "current_page": {
1821 - "type": "number"
1822 - },
1823 - "total_items": {
1824 - "type": "number"
1623 + "required": [
1624 + "authScheme",
1625 + "toolkitSlug",
1626 + "val"
1627 + ],
1628 + "additionalProperties": true
1629 + },
1630 + "arguments": {
1631 + "type": "object",
1632 + "additionalProperties": {},
1633 + "description": "Key-value pairs of arguments required by the tool (mutually exclusive with text)",
1634 + "example": {
1635 + "repository": "octocat/Hello-World",
1636 + "workflow_id": "main.yml",
1637 + "ref": "main",
1638 + "inputs": {
1639 + "environment": "production"
1640 + }
1641 }
1642 },
1827 - "required": [
1828 - "items",
1829 - "total_pages",
1830 - "current_page",
1831 - "total_items"
1832 - ]
1833 - }
1834 - }
1835 - }
1836 - },
1837 - "400": {
1838 - "description": "Bad request",
1839 - "content": {
1840 - "application/json": {
1841 - "schema": {
1842 - "$ref": "#/components/schemas/Error"
1643 + "text": {
1644 + "type": "string",
1645 + "description": "Natural language description of the task to perform (mutually exclusive with arguments)",
1646 + "example": "Trigger the main workflow in the octocat/Hello-World repository on the main branch for the production environment"
1647 + },
1648 + "allow_tracing": {
1649 + "type": "boolean",
1650 + "nullable": true,
1651 + "description": "Deprecated. Enable debug tracing for tool execution (useful for debugging)",
1652 + "deprecated": true,
1653 + "example": false
1654 + }
1655 }
1656 }
1657 }
1846 - },
1847 - "401": {
1848 - "description": "Unauthorized",
1658 + }
1659 + },
1660 + "responses": {
1661 + "200": {
1662 + "description": "Successfully executed action and received response",
1663 "content": {
1664 "application/json": {
1665 "schema": {
1852 - "$ref": "#/components/schemas/Error"
1853 - }
1854 - }
1666 + "type": "object",
1667 + "properties": {
1668 + "data": {
1669 + "type": "object",
1670 + "additionalProperties": {},
1671 + "description": "Tool execution output data that varies based on the specific tool",
1672 + "example": {
1673 + "run_id": 12345678,
1674 + "status": "queued",
1675 + "created_at": "2023-01-01T12:00:00Z",
1676 + "html_url": "https://github.com/octocat/Hello-World/actions/runs/12345678"
1677 + }
1678 + },
1679 + "error": {
1680 + "type": "string",
1681 + "nullable": true,
1682 + "description": "Error message if the tool execution was not successful (null if successful)"
1683 + },
1684 + "successful": {
1685 + "type": "boolean",
1686 + "description": "Indicates if the tool execution was successful",
1687 + "example": true
1688 + },
1689 + "session_info": {
1690 + "nullable": true,
1691 + "description": "Optional session information for tools that return session context",
1692 + "example": {
1693 + "session_id": "session-12345",
1694 + "expires_at": "2023-01-01T13:00:00Z"
1695 + },
1696 + "type": "object"
1697 + },
1698 + "log_id": {
1699 + "type": "string",
1700 + "description": "Unique identifier for the execution log (useful for debugging and support)",
1701 + "example": "log_abc123def456"
1702 + }
1703 + },
1704 + "required": [
1705 + "data",
1706 + "error",
1707 + "successful"
1708 + ]
1709 + }
1710 + }
1711 + }
1712 + },
1713 + "400": {
1714 + "description": "Bad request - Invalid request parameters, missing required arguments, or conflicting parameters",
1715 + "content": {
1716 + "application/json": {
1717 + "schema": {
1718 + "$ref": "#/components/schemas/Error"
1719 + }
1720 + }
1721 + }
1722 + },
1723 + "401": {
1724 + "description": "Unauthorized - Authentication credentials are missing or invalid",
1725 + "content": {
1726 + "application/json": {
1727 + "schema": {
1728 + "$ref": "#/components/schemas/Error"
1729 + }
1730 + }
1731 + }
1732 + },
1733 + "403": {
1734 + "description": "Forbidden - Connected account does not have permission to execute this tool or access the requested resource",
1735 + "content": {
1736 + "application/json": {
1737 + "schema": {
1738 + "$ref": "#/components/schemas/Error"
1739 + }
1740 + }
1741 }
1742 },
1743 "404": {
1858 - "description": "Not found",
1744 + "description": "Not found - Tool or connected account not found",
1745 + "content": {
1746 + "application/json": {
1747 + "schema": {
1748 + "$ref": "#/components/schemas/Error"
1749 + }
1750 + }
1751 + }
1752 + },
1753 + "408": {
1754 + "description": "Request timeout - Tool execution exceeded the maximum allowed time",
1755 + "content": {
1756 + "application/json": {
1757 + "schema": {
1758 + "$ref": "#/components/schemas/Error"
1759 + }
1760 + }
1761 + }
1762 + },
1763 + "410": {
1764 + "description": "Gone - Tool has been deprecated and is no longer available",
1765 + "content": {
1766 + "application/json": {
1767 + "schema": {
1768 + "$ref": "#/components/schemas/Error"
1769 + }
1770 + }
1771 + }
1772 + },
1773 + "413": {
1774 + "description": "Payload too large - Request or response payload exceeds size limits",
1775 + "content": {
1776 + "application/json": {
1777 + "schema": {
1778 + "$ref": "#/components/schemas/Error"
1779 + }
1780 + }
1781 + }
1782 + },
1783 + "422": {
1784 + "description": "Unprocessable entity - Invalid state of the connected account",
1785 + "content": {
1786 + "application/json": {
1787 + "schema": {
1788 + "$ref": "#/components/schemas/Error"
1789 + }
1790 + }
1791 + }
1792 + },
1793 + "429": {
1794 + "description": "Rate limit exceeded - Too many requests to the tool or underlying API",
1795 "content": {
1796 "application/json": {
1797 "schema": {
@@ -1865,7 +1801,37 @@
1801 }
1802 },
1803 "500": {
1868 - "description": "Internal server error",
1804 + "description": "Internal server error - Something went wrong on the server",
1805 + "content": {
1806 + "application/json": {
1807 + "schema": {
1808 + "$ref": "#/components/schemas/Error"
1809 + }
1810 + }
1811 + }
1812 + },
1813 + "501": {
1814 + "description": "Not implemented",
1815 + "content": {
1816 + "application/json": {
1817 + "schema": {
1818 + "$ref": "#/components/schemas/Error"
1819 + }
1820 + }
1821 + }
1822 + },
1823 + "502": {
1824 + "description": "Bad gateway - Error communicating with the tool provider API",
1825 + "content": {
1826 + "application/json": {
1827 + "schema": {
1828 + "$ref": "#/components/schemas/Error"
1829 + }
1830 + }
1831 + }
1832 + },
1833 + "503": {
1834 + "description": "Upstream service unavailable - Tool provider API is currently down or unavailable",
1835 "content": {
1836 "application/json": {
1837 "schema": {
@@ -1874,17 +1840,18 @@
1840 }
1841 }
1842 }
1877 - }
1843 + },
1844 + "x-api-version": "3.1"
1845 }
1846 },
1880 - "/api/v3/auth_configs/{nanoid}": {
1881 - "get": {
1882 - "summary": "Get single authentication configuration by ID",
1883 - "description": "Retrieves detailed information about a specific authentication configuration using its unique identifier.",
1847 + "/api/v3.1/tools/execute/{tool_slug}/input": {
1848 + "post": {
1849 + "summary": "Generate tool inputs from natural language",
1850 + "description": "Uses AI to translate a natural language description into structured arguments for a specific tool. This endpoint is useful when you want to let users describe what they want to do in plain language instead of providing structured parameters.",
1851 "tags": [
1885 - "Auth Configs"
1852 + "Tools"
1853 ],
1887 - "operationId": "getAuthConfigsByNanoid",
1854 + "operationId": "postToolsExecuteByToolSlugInput",
1855 "security": [
1856 {
1857 "ApiKeyAuth": []
@@ -1896,239 +1863,81 @@
1863 "parameters": [
1864 {
1865 "schema": {
1899 - "type": "string",
1900 - "format": "authConfigId",
1901 - "description": "The unique identifier of the authentication configuration to retrieve"
1866 + "type": "string"
1867 },
1868 "required": true,
1904 - "description": "The unique identifier of the authentication configuration to retrieve",
1905 - "name": "nanoid",
1869 + "description": "The tool slug to generate inputs for",
1870 + "name": "tool_slug",
1871 "in": "path"
1872 }
1873 ],
1874 + "requestBody": {
1875 + "content": {
1876 + "application/json": {
1877 + "schema": {
1878 + "type": "object",
1879 + "properties": {
1880 + "text": {
1881 + "type": "string",
1882 + "description": "Natural language description of what you want to accomplish with this tool",
1883 + "example": "I need to trigger the main workflow in the octocat/Hello-World repository to deploy to production"
1884 + },
1885 + "custom_description": {
1886 + "type": "string",
1887 + "description": "Custom description of the tool to help guide the LLM in generating more accurate inputs",
1888 + "example": "This tool triggers GitHub Actions workflows in a repository. It requires the repository name, workflow ID, and optional input parameters."
1889 + },
1890 + "system_prompt": {
1891 + "type": "string",
1892 + "description": "System prompt to control and guide the behavior of the LLM when generating inputs",
1893 + "example": "You are an expert assistant that generates precise GitHub Actions workflow parameters. Extract exact repository names, workflow IDs, and input values from user descriptions."
1894 + },
1895 + "version": {
1896 + "type": "string",
1897 + "description": "Tool version to use when generating inputs (defaults to \"latest\" if not specified)",
1898 + "example": "latest"
1899 + }
1900 + },
1901 + "required": [
1902 + "text"
1903 + ]
1904 + }
1905 + }
1906 + }
1907 + },
1908 "responses": {
1909 "200": {
1911 - "description": "Successfully fetched auth config",
1910 + "description": "Successfully generated structured inputs for the action based on natural language description",
1911 "content": {
1912 "application/json": {
1913 "schema": {
1914 "type": "object",
1915 "properties": {
1917 - "id": {
1918 - "type": "string",
1919 - "format": "authConfigId",
1920 - "description": "The unique ID of the authentication configuration"
1921 - },
1922 - "uuid": {
1923 - "type": "string",
1924 - "description": "The UUID of the authentication configuration (for backward compatibility)"
1916 + "arguments": {
1917 + "type": "object",
1918 + "additionalProperties": {},
1919 + "description": "Key-value pairs of arguments required by the tool to accomplish the described task",
1920 + "example": {
1921 + "repository": "octocat/Hello-World",
1922 + "workflow_id": "main.yml",
1923 + "ref": "main",
1924 + "inputs": {
1925 + "environment": "production"
1926 + }
1927 + }
1928 },
1926 - "type": {
1929 + "error": {
1930 "type": "string",
1928 - "enum": [
1929 - "default",
1930 - "custom"
1931 - ],
1932 - "description": "The type of the authentication configuration (custom or default)"
1933 - },
1934 - "toolkit": {
1935 - "type": "object",
1936 - "properties": {
1937 - "slug": {
1938 - "type": "string",
1939 - "description": "The unique identifier of the integration app"
1940 - },
1941 - "logo": {
1942 - "type": "string",
1943 - "description": "The URL to the integration app's logo image"
1944 - },
1945 - "auth_guide_url": {
1946 - "type": "string",
1947 - "nullable": true,
1948 - "description": "URL to a guide page with authentication setup instructions"
1949 - },
1950 - "auth_hint_url": {
1951 - "type": "string",
1952 - "nullable": true,
1953 - "description": "URL to a page where users can obtain or configure credentials"
1954 - }
1955 - },
1956 - "required": [
1957 - "slug",
1958 - "logo"
1959 - ],
1960 - "description": "Information about the associated integration"
1961 - },
1962 - "name": {
1963 - "type": "string",
1964 - "description": "The display name of the authentication configuration"
1965 - },
1966 - "auth_scheme": {
1967 - "type": "string",
1968 - "enum": [
1969 - "OAUTH2",
1970 - "OAUTH1",
1971 - "API_KEY",
1972 - "BASIC",
1973 - "BILLCOM_AUTH",
1974 - "BEARER_TOKEN",
1975 - "GOOGLE_SERVICE_ACCOUNT",
1976 - "NO_AUTH",
1977 - "BASIC_WITH_JWT",
1978 - "CALCOM_AUTH",
1979 - "SERVICE_ACCOUNT",
1980 - "SAML",
1981 - "DCR_OAUTH",
1982 - "S2S_OAUTH2"
1983 - ],
1984 - "description": "The authentication scheme used (e.g., OAuth2, API Key, etc.)"
1985 - },
1986 - "is_composio_managed": {
1987 - "type": "boolean",
1988 - "description": "Whether this authentication configuration is managed by Composio or the user"
1989 - },
1990 - "credentials": {
1991 - "type": "object",
1992 - "additionalProperties": {},
1993 - "description": "The authentication credentials (tokens, keys, etc.) - may be partially hidden for security"
1994 - },
1995 - "proxy_config": {
1996 - "type": "object",
1997 - "nullable": true,
1998 - "properties": {
1999 - "proxy_url": {
2000 - "type": "string",
2001 - "format": "uri",
2002 - "description": "The url of the auth proxy"
2003 - },
2004 - "proxy_auth_key": {
2005 - "type": "string",
2006 - "description": "The auth key for the auth proxy"
2007 - }
2008 - },
2009 - "required": [
2010 - "proxy_url"
2011 - ]
2012 - },
2013 - "status": {
2014 - "type": "string",
2015 - "enum": [
2016 - "ENABLED",
2017 - "DISABLED"
2018 - ],
2019 - "description": "Current status of the authentication configuration"
2020 - },
2021 - "created_by": {
2022 - "type": "string",
2023 - "description": "The identifier of the user who created the auth config"
2024 - },
2025 - "created_at": {
2026 - "type": "string",
2027 - "description": "ISO 8601 date-time when the auth config was created"
2028 - },
2029 - "last_updated_at": {
2030 - "type": "string",
2031 - "description": "ISO 8601 date-time when the auth config was last updated"
2032 - },
2033 - "no_of_connections": {
2034 - "type": "number",
2035 - "description": "The number of active connections using this auth config"
2036 - },
2037 - "expected_input_fields": {
2038 - "type": "array",
2039 - "items": {
2040 - "nullable": true,
2041 - "type": "object"
2042 - },
2043 - "description": "Fields expected during connection initialization"
2044 - },
2045 - "restrict_to_following_tools": {
2046 - "type": "array",
2047 - "items": {
2048 - "type": "string"
2049 - },
2050 - "description": "Use tool_access_config instead. This field will be deprecated in the future.",
2051 - "deprecated": true
2052 - },
2053 - "tool_access_config": {
2054 - "type": "object",
2055 - "properties": {
2056 - "tools_for_connected_account_creation": {
2057 - "type": "array",
2058 - "items": {
2059 - "type": "string"
2060 - },
2061 - "default": [],
2062 - "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
2063 - },
2064 - "tools_available_for_execution": {
2065 - "type": "array",
2066 - "items": {
2067 - "type": "string"
2068 - },
2069 - "default": [],
2070 - "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
2071 - }
2072 - }
2073 - },
2074 - "shared_credentials": {
2075 - "type": "object",
2076 - "additionalProperties": {},
2077 - "description": "[EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config",
2078 - "x-experimental": true
2079 - },
2080 - "is_enabled_for_tool_router": {
2081 - "type": "boolean",
2082 - "description": "Whether this auth config is enabled for tool router"
2083 - },
2084 - "deprecated_params": {
2085 - "type": "object",
2086 - "properties": {
2087 - "default_connector_id": {
2088 - "type": "string",
2089 - "nullable": true,
2090 - "description": "Deprecated: Default connector ID"
2091 - },
2092 - "member_uuid": {
2093 - "type": "string",
2094 - "description": "Deprecated: Member UUID"
2095 - },
2096 - "toolkit_id": {
2097 - "type": "string",
2098 - "description": "Deprecated: Toolkit ID"
2099 - },
2100 - "expected_input_fields": {
2101 - "type": "array",
2102 - "items": {
2103 - "type": "object",
2104 - "additionalProperties": {}
2105 - },
2106 - "description": "Deprecated: Fields expected during connection initialization"
2107 - }
2108 - },
2109 - "required": [
2110 - "default_connector_id"
2111 - ],
2112 - "description": "DEPRECATED: This parameter will be removed in a future version.",
2113 - "deprecated": true
1931 + "description": "Error message if the arguments could not be generated (null if successful)",
1932 + "example": "Unable to determine the repository name from the provided description"
1933 }
2115 - },
2116 - "required": [
2117 - "id",
2118 - "uuid",
2119 - "type",
2120 - "toolkit",
2121 - "name",
2122 - "status",
2123 - "no_of_connections",
2124 - "tool_access_config"
2125 - ]
1934 + }
1935 }
1936 }
1937 }
1938 },
1939 "400": {
2131 - "description": "Bad request - Invalid auth config ID format",
1940 + "description": "Bad request - Invalid input parameters or insufficient description to generate tool arguments",
1941 "content": {
1942 "application/json": {
1943 "schema": {
@@ -2138,7 +1947,7 @@
1947 }
1948 },
1949 "401": {
2141 - "description": "Unauthorized - Authentication required",
1950 + "description": "Unauthorized - Authentication credentials are missing or invalid",
1951 "content": {
1952 "application/json": {
1953 "schema": {
@@ -2148,7 +1957,27 @@
1957 }
1958 },
1959 "404": {
2151 - "description": "Not found - Auth configuration does not exist",
1960 + "description": "Not found - The specified tool does not exist",
1961 + "content": {
1962 + "application/json": {
1963 + "schema": {
1964 + "$ref": "#/components/schemas/Error"
1965 + }
1966 + }
1967 + }
1968 + },
1969 + "422": {
1970 + "description": "Unprocessable entity - Invalid state of the connected account",
1971 + "content": {
1972 + "application/json": {
1973 + "schema": {
1974 + "$ref": "#/components/schemas/Error"
1975 + }
1976 + }
1977 + }
1978 + },
1979 + "429": {
1980 + "description": "Too many requests - Rate limit exceeded for natural language processing",
1981 "content": {
1982 "application/json": {
1983 "schema": {
@@ -2158,7 +1987,7 @@
1987 }
1988 },
1989 "500": {
2161 - "description": "Internal server error - Something went wrong on the server",
1990 + "description": "Internal server error - AI processing failed or other server error occurred",
1991 "content": {
1992 "application/json": {
1993 "schema": {
@@ -2167,15 +1996,18 @@
1996 }
1997 }
1998 }
2170 - }
2171 - },
2172 - "patch": {
2173 - "summary": "Update an authentication configuration",
2174 - "description": "Modifies an existing authentication configuration with new credentials or other settings. Only specified fields will be updated.",
1999 + },
2000 + "x-api-version": "3.1"
2001 + }
2002 + },
2003 + "/api/v3.1/tools/execute/proxy": {
2004 + "post": {
2005 + "summary": "Execute proxy request",
2006 + "description": "Proxy an HTTP request to a third-party API using connected account credentials. This endpoint allows making authenticated API calls to external services while abstracting away authentication details.",
2007 "tags": [
2176 - "Auth Configs"
2008 + "Tools"
2009 ],
2178 - "operationId": "patchAuthConfigsByNanoid",
2010 + "operationId": "postToolsExecuteProxy",
2011 "security": [
2012 {
2013 "ApiKeyAuth": []
@@ -2184,275 +2016,452 @@
2016 "UserApiKeyAuth": []
2017 }
2018 ],
2187 - "parameters": [
2188 - {
2189 - "schema": {
2190 - "type": "string",
2191 - "format": "authConfigId",
2192 - "description": "The unique identifier of the authentication configuration to update"
2193 - },
2194 - "required": true,
2195 - "description": "The unique identifier of the authentication configuration to update",
2196 - "name": "nanoid",
2197 - "in": "path"
2198 - }
2199 - ],
2019 "requestBody": {
2020 "content": {
2021 "application/json": {
2022 "schema": {
2204 - "oneOf": [
2205 - {
2206 - "type": "object",
2207 - "properties": {
2208 - "type": {
2209 - "type": "string",
2210 - "enum": [
2211 - "custom"
2212 - ]
2213 - },
2214 - "name": {
2215 - "type": "string",
2216 - "minLength": 1,
2217 - "description": "The display name of the authentication configuration"
2218 - },
2219 - "credentials": {
2220 - "type": "object",
2221 - "properties": {
2222 - "scopes": {
2223 - "anyOf": [
2224 - {
2225 - "type": "string"
2226 - },
2227 - {
2228 - "type": "array",
2229 - "items": {
2230 - "type": "string"
2231 - }
2232 - }
2233 - ]
2234 - },
2235 - "user_scopes": {
2236 - "anyOf": [
2237 - {
2238 - "type": "string"
2239 - },
2240 - {
2241 - "type": "array",
2242 - "items": {
2243 - "type": "string"
2244 - }
2245 - }
2246 - ]
2247 - }
2248 - }
2249 - },
2250 - "proxy_config": {
2023 + "type": "object",
2024 + "properties": {
2025 + "connected_account_id": {
2026 + "type": "string",
2027 + "format": "connectedAccountId",
2028 + "description": "The ID of the connected account to use for authentication (if not provided, will use the default account for the project)",
2029 + "example": "ca_1a2b3c4d5e6f"
2030 + },
2031 + "endpoint": {
2032 + "type": "string",
2033 + "description": "The API endpoint to call (absolute URL or path relative to base URL of the connected account)",
2034 + "example": "/api/v1/resources"
2035 + },
2036 + "method": {
2037 + "type": "string",
2038 + "enum": [
2039 + "GET",
2040 + "POST",
2041 + "PUT",
2042 + "DELETE",
2043 + "PATCH",
2044 + "HEAD"
2045 + ],
2046 + "description": "The HTTP method to use for the request",
2047 + "example": "GET"
2048 + },
2049 + "body": {
2050 + "nullable": true,
2051 + "description": "The request body (for POST, PUT, and PATCH requests)",
2052 + "example": {
2053 + "name": "New Resource",
2054 + "description": "This is a new resource"
2055 + },
2056 + "type": "object"
2057 + },
2058 + "binary_body": {
2059 + "anyOf": [
2060 + {
2061 "type": "object",
2252 - "nullable": true,
2062 "properties": {
2254 - "proxy_url": {
2063 + "url": {
2064 "type": "string",
2065 "format": "uri",
2257 - "description": "The url of the auth proxy"
2066 + "description": "URL to fetch binary content from"
2067 },
2259 - "proxy_auth_key": {
2068 + "content_type": {
2069 "type": "string",
2261 - "description": "The auth key for the auth proxy"
2070 + "description": "Content-Type header to use for the request"
2071 }
2072 },
2073 "required": [
2265 - "proxy_url"
2074 + "url"
2075 ]
2076 },
2268 - "restrict_to_following_tools": {
2269 - "type": "array",
2270 - "items": {
2271 - "type": "string"
2272 - },
2273 - "description": "Use tool_access_config instead. This field will be deprecated in the future.",
2274 - "deprecated": true
2275 - },
2276 - "tool_access_config": {
2077 + {
2078 "type": "object",
2079 "properties": {
2279 - "tools_for_connected_account_creation": {
2280 - "type": "array",
2281 - "items": {
2282 - "type": "string"
2283 - },
2284 - "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
2080 + "base64": {
2081 + "type": "string",
2082 + "minLength": 1,
2083 + "description": "Base64-encoded binary data"
2084 },
2286 - "tools_available_for_execution": {
2287 - "type": "array",
2288 - "items": {
2289 - "type": "string"
2290 - },
2291 - "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
2085 + "content_type": {
2086 + "type": "string",
2087 + "description": "Content-Type header to use for the request"
2088 }
2089 + },
2090 + "required": [
2091 + "base64"
2092 + ]
2093 + }
2094 + ],
2095 + "description": "Binary body to send. For binary upload via URL: use {url: \"https://...\", content_type?: \"...\"}. For binary upload via base64: use {base64: \"...\", content_type?: \"...\"}."
2096 + },
2097 + "parameters": {
2098 + "type": "array",
2099 + "items": {
2100 + "type": "object",
2101 + "properties": {
2102 + "name": {
2103 + "type": "string",
2104 + "description": "Parameter name",
2105 + "example": "x-api-key"
2106 + },
2107 + "value": {
2108 + "type": "string",
2109 + "description": "Parameter value",
2110 + "example": "abc123def456"
2111 + },
2112 + "type": {
2113 + "type": "string",
2114 + "enum": [
2115 + "header",
2116 + "query"
2117 + ],
2118 + "description": "Parameter type (header or query)",
2119 + "example": "header"
2120 }
2121 },
2295 - "shared_credentials": {
2296 - "type": "object",
2297 - "additionalProperties": {},
2298 - "description": "Shared credentials that will be inherited by connected accounts. For eg: this can be used to share the API key for a tool with all connected accounts using this auth config."
2122 + "required": [
2123 + "name",
2124 + "value",
2125 + "type"
2126 + ]
2127 + },
2128 + "description": "Additional HTTP headers or query parameters to include in the request",
2129 + "example": [
2130 + {
2131 + "name": "x-api-key",
2132 + "value": "abc123def456",
2133 + "type": "header"
2134 },
2300 - "is_enabled_for_tool_router": {
2301 - "type": "boolean",
2302 - "description": "Whether this auth config is enabled for tool router"
2135 + {
2136 + "name": "filter",
2137 + "value": "active",
2138 + "type": "query"
2139 }
2304 - },
2305 - "required": [
2306 - "type"
2140 ]
2141 },
2309 - {
2142 + "custom_connection_data": {
2143 + "deprecated": true,
2144 "type": "object",
2145 "properties": {
2312 - "type": {
2146 + "authScheme": {
2147 "type": "string",
2148 "enum": [
2315 - "default"
2149 + "OAUTH2",
2150 + "DCR_OAUTH",
2151 + "API_KEY",
2152 + "BASIC_WITH_JWT",
2153 + "BASIC",
2154 + "BEARER_TOKEN",
2155 + "OAUTH1",
2156 + "NO_AUTH",
2157 + "SERVICE_ACCOUNT",
2158 + "GOOGLE_SERVICE_ACCOUNT",
2159 + "S2S_OAUTH2"
2160 ]
2161 },
2318 - "name": {
2319 - "type": "string",
2320 - "minLength": 1,
2321 - "description": "The display name of the authentication configuration"
2162 + "toolkitSlug": {
2163 + "type": "string"
2164 },
2323 - "scopes": {
2324 - "anyOf": [
2325 - {
2165 + "val": {
2166 + "type": "object",
2167 + "properties": {
2168 + "subdomain": {
2169 "type": "string"
2170 },
2328 - {
2329 - "type": "array",
2330 - "items": {
2331 - "type": "string"
2332 - }
2333 - }
2334 - ]
2335 - },
2336 - "user_scopes": {
2337 - "anyOf": [
2338 - {
2171 + "your-domain": {
2172 "type": "string"
2173 },
2341 - {
2342 - "type": "array",
2343 - "items": {
2344 - "type": "string"
2345 - }
2346 - }
2347 - ]
2348 - },
2349 - "restrict_to_following_tools": {
2350 - "type": "array",
2351 - "items": {
2352 - "type": "string"
2353 - },
2354 - "description": "Use tool_access_config instead. This field will be deprecated in the future.",
2355 - "deprecated": true
2356 - },
2357 - "tool_access_config": {
2358 - "type": "object",
2359 - "properties": {
2360 - "tools_for_connected_account_creation": {
2361 - "type": "array",
2362 - "items": {
2363 - "type": "string"
2364 - },
2365 - "description": "Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes."
2174 + "region": {
2175 + "type": "string"
2176 },
2367 - "tools_available_for_execution": {
2368 - "type": "array",
2369 - "items": {
2370 - "type": "string"
2371 - },
2372 - "description": "The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config."
2373 - }
2374 - }
2375 - },
2376 - "shared_credentials": {
2377 - "type": "object",
2378 - "additionalProperties": {},
2379 - "description": "Shared credentials that will be inherited by connected accounts. For eg: this can be used to share the API key for a tool with all connected accounts using this auth config."
2380 - },
2381 - "is_enabled_for_tool_router": {
2382 - "type": "boolean",
2383 - "description": "Whether this auth config is enabled for tool router"
2384 - }
2385 - },
2386 - "required": [
2387 - "type"
2388 - ]
2389 - }
2390 - ]
2391 - },
2392 - "examples": {
2393 - "standardUpdate": {
2394 - "summary": "Standard credential update",
2395 - "value": {
2396 - "auth_config": {
2397 - "credentials": {
2398 - "api_key": "YOUR_NEW_API_KEY",
2399 - "client_secret": "YOUR_NEW_CLIENT_SECRET"
2400 - },
2401 - "restrict_to_following_tools": [
2402 - "GMAIL_SEND_EMAIL",
2403 - "GMAIL_FETCH_EMAILS"
2404 - ]
2405 - }
2177 + "shop": {
2178 + "type": "string"
2179 + },
2180 + "account_url": {
2181 + "type": "string"
2182 + },
2183 + "COMPANYDOMAIN": {
2184 + "type": "string"
2185 + },
2186 + "extension": {
2187 + "type": "string"
2188 + },
2189 + "form_api_base_url": {
2190 + "type": "string"
2191 + },
2192 + "instanceEndpoint": {
2193 + "type": "string"
2194 + },
2195 + "api_url": {
2196 + "type": "string"
2197 + },
2198 + "borneo_dashboard_url": {
2199 + "type": "string"
2200 + },
2201 + "proxy_username": {
2202 + "type": "string"
2203 + },
2204 + "proxy_password": {
2205 + "type": "string"
2206 + },
2207 + "domain": {
2208 + "type": "string"
2209 + },
2210 + "version": {
2211 + "type": "string"
2212 + },
2213 + "dc": {
2214 + "type": "string"
2215 + },
2216 + "site_name": {
2217 + "type": "string"
2218 + },
2219 + "instanceName": {
2220 + "type": "string"
2221 + },
2222 + "account_id": {
2223 + "type": "string"
2224 + },
2225 + "your_server": {
2226 + "type": "string"
2227 + },
2228 + "server_location": {
2229 + "type": "string"
2230 + },
2231 + "base_url": {
2232 + "type": "string"
2233 + },
2234 + "state_prefix": {
2235 + "type": "string",
2236 + "maxLength": 40,
2237 + "description": "The oauth2 state prefix for the connection"
2238 + },
2239 + "long_redirect_url": {
2240 + "type": "boolean",
2241 + "description": "Whether to return the redirect url without shortening"
2242 + },
2243 + "access_token": {
2244 + "type": "string"
2245 + },
2246 + "id_token": {
2247 + "type": "string"
2248 + },
2249 + "token_type": {
2250 + "type": "string"
2251 + },
2252 + "refresh_token": {
2253 + "type": "string",
2254 + "nullable": true
2255 + },
2256 + "expires_in": {
2257 + "anyOf": [
2258 + {
2259 + "type": "number"
2260 + },
2261 + {
2262 + "type": "string"
2263 + },
2264 + {
2265 + "nullable": true,
2266 + "type": "object"
2267 + }
2268 + ]
2269 + },
2270 + "scope": {
2271 + "anyOf": [
2272 + {
2273 + "type": "string"
2274 + },
2275 + {
2276 + "type": "array",
2277 + "items": {
2278 + "type": "string"
2279 + }
2280 + },
2281 + {
2282 + "nullable": true,
2283 + "type": "object"
2284 + }
2285 + ]
2286 + },
2287 + "webhook_signature": {
2288 + "type": "string"
2289 + },
2290 + "authed_user": {
2291 + "type": "object",
2292 + "properties": {
2293 + "access_token": {
2294 + "type": "string"
2295 + },
2296 + "scope": {
2297 + "type": "string"
2298 + }
2299 + },
2300 + "description": "for slack user scopes"
2301 + },
2302 + "client_id": {
2303 + "type": "string",
2304 + "description": "Dynamically registered client ID"
2305 + },
2306 + "client_secret": {
2307 + "type": "string",
2308 + "description": "Dynamically registered client secret"
2309 + },
2310 + "client_id_issued_at": {
2311 + "type": "number"
2312 + },
2313 + "client_secret_expires_at": {
2314 + "type": "number"
2315 + },
2316 + "generic_api_key": {
2317 + "type": "string"
2318 + },
2319 + "api_key": {
2320 + "type": "string"
2321 + },
2322 + "bearer_token": {
2323 + "type": "string"
2324 + },
2325 + "basic_encoded": {
2326 + "type": "string"
2327 + },
2328 + "username": {
2329 + "type": "string"
2330 + },
2331 + "password": {
2332 + "type": "string"
2333 + },
2334 + "token": {
2335 + "type": "string"
2336 + },
2337 + "oauth_token": {
2338 + "type": "string"
2339 + },
2340 + "oauth_token_secret": {
2341 + "type": "string"
2342 + },
2343 + "oauth_verifier": {
2344 + "type": "string"
2345 + },
2346 + "consumer_key": {
2347 + "type": "string"
2348 + },
2349 + "redirectUrl": {
2350 + "type": "string"
2351 + },
2352 + "callback_url": {
2353 + "type": "string"
2354 + },
2355 + "application_id": {
2356 + "type": "string"
2357 + },
2358 + "installation_id": {
2359 + "type": "string"
2360 + },
2361 + "private_key": {
2362 + "type": "string"
2363 + },
2364 + "credentials_json": {
2365 + "type": "string"
2366 + },
2367 + "expires_at": {
2368 + "type": "string"
2369 + }
2370 + },
2371 + "required": [
2372 + "access_token"
2373 + ],
2374 + "additionalProperties": {}
2375 + }
2376 + },
2377 + "required": [
2378 + "authScheme",
2379 + "toolkitSlug",
2380 + "val"
2381 + ],
2382 + "additionalProperties": true
2383 }
2407 - }
2384 + },
2385 + "required": [
2386 + "endpoint",
2387 + "method"
2388 + ]
2389 }
2390 }
2391 }
2392 },
2393 "responses": {
2394 "200": {
2414 - "description": "Successfully updated auth config",
2395 + "description": "Successfully executed proxy request and received response",
2396 "content": {
2397 "application/json": {
2398 "schema": {
2399 "type": "object",
2419 - "properties": {}
2420 - }
2421 - }
2422 - }
2423 - },
2424 - "400": {
2425 - "description": "Bad request - Invalid input or credentials format",
2426 - "content": {
2427 - "application/json": {
2428 - "schema": {
2429 - "$ref": "#/components/schemas/Error"
2430 - }
2431 - }
2432 - }
2433 - },
2434 - "401": {
2435 - "description": "Unauthorized - Authentication required",
2436 - "content": {
2437 - "application/json": {
2438 - "schema": {
2439 - "$ref": "#/components/schemas/Error"
2440 - }
2441 - }
2442 - }
2443 - },
2444 - "404": {
2445 - "description": "Not found - Auth configuration does not exist",
2446 - "content": {
2447 - "application/json": {
2448 - "schema": {
2449 - "$ref": "#/components/schemas/Error"
2400 + "properties": {
2401 + "data": {
2402 + "nullable": true,
2403 + "description": "The response data returned from the proxied API",
2404 + "example": {
2405 + "id": "123",
2406 + "name": "Resource Name",
2407 + "created_at": "2023-01-01T00:00:00Z"
2408 + },
2409 + "type": "object"
2410 + },
2411 + "binary_data": {
2412 + "type": "object",
2413 + "properties": {
2414 + "url": {
2415 + "type": "string",
2416 + "description": "URL to download binary content"
2417 + },
2418 + "content_type": {
2419 + "type": "string",
2420 + "description": "Content-Type of the binary data"
2421 + },
2422 + "size": {
2423 + "type": "number",
2424 + "description": "File size in bytes"
2425 + },
2426 + "expires_at": {
2427 + "type": "string",
2428 + "description": "ISO 8601 timestamp when the URL expires"
2429 + }
2430 + },
2431 + "required": [
2432 + "url",
2433 + "content_type",
2434 + "size"
2435 + ],
2436 + "description": "Binary body response data. Present when the response is a binary file."
2437 + },
2438 + "status": {
2439 + "type": "number",
2440 + "description": "The HTTP status code returned from the proxied API",
2441 + "example": 200
2442 + },
2443 + "headers": {
2444 + "type": "object",
2445 + "additionalProperties": {
2446 + "type": "string"
2447 + },
2448 + "description": "The HTTP headers returned from the proxied API",
2449 + "example": {
2450 + "content-type": "application/json",
2451 + "cache-control": "no-cache",
2452 + "host": "api.example.com"
2453 + }
2454 + }
2455 + },
2456 + "required": [
2457 + "status"
2458 + ]
2459 }
2460 }
2461 }
2462 },
2454 - "500": {
2455 - "description": "Internal server error - Something went wrong on the server",
2463 + "400": {
2464 + "description": "Bad request - Invalid request parameters or body format",
2465 "content": {
2466 "application/json": {
2467 "schema": {
@@ -2460,51 +2469,9 @@
2469 }
2470 }
2471 }
2463 - }
2464 - }
2465 - },
2466 - "delete": {
2467 - "summary": "Delete an authentication configuration",
2468 - "description": "Soft-deletes an authentication configuration by marking it as deleted in the database. This operation cannot be undone.",
2469 - "tags": [
2470 - "Auth Configs"
2471 - ],
2472 - "operationId": "deleteAuthConfigsByNanoid",
2473 - "security": [
2474 - {
2475 - "ApiKeyAuth": []
2476 - },
2477 - {
2478 - "UserApiKeyAuth": []
2479 - }
2480 - ],
2481 - "parameters": [
2482 - {
2483 - "schema": {
2484 - "type": "string",
2485 - "format": "authConfigId",
2486 - "description": "The unique identifier of the authentication configuration to delete"
2487 - },
2488 - "required": true,
2489 - "description": "The unique identifier of the authentication configuration to delete",
2490 - "name": "nanoid",
2491 - "in": "path"
2492 - }
2493 - ],
2494 - "responses": {
2495 - "200": {
2496 - "description": "Successfully deleted auth config",
2497 - "content": {
2498 - "application/json": {
2499 - "schema": {
2500 - "type": "object",
2501 - "properties": {}
2502 - }
2503 - }
2504 - }
2472 },
2506 - "400": {
2507 - "description": "Bad request - Invalid auth config ID format",
2473 + "401": {
2474 + "description": "Unauthorized - Authentication credentials are missing or invalid",
2475 "content": {
2476 "application/json": {
2477 "schema": {
@@ -2513,8 +2480,8 @@
2480 }
2481 }
2482 },
2516 - "401": {
2517 - "description": "Unauthorized - Authentication required",
2483 + "403": {
2484 + "description": "Forbidden - Connected account does not have permission to access the requested resource",
2485 "content": {
2486 "application/json": {
2487 "schema": {
@@ -2524,18 +2491,17 @@
2491 }
2492 },
2493 "404": {
2527 - "description": "Auth config not found - The specified configuration does not exist or was already deleted",
2494 + "description": "Not found - Resource not found or connected account not found",
2495 "content": {
2496 "application/json": {
2497 "schema": {
2531 - "type": "object",
2532 - "properties": {}
2498 + "$ref": "#/components/schemas/Error"
2499 }
2500 }
2501 }
2502 },
2537 - "500": {
2538 - "description": "Internal server error - Something went wrong on the server",
2503 + "422": {
2504 + "description": "Unprocessable entity - Invalid state of the connected account",
2505 "content": {
2506 "application/json": {
2507 "schema": {
@@ -2543,67 +2509,19 @@
2509 }
2510 }
2511 }
2546 - }
2547 - }
2548 - }
2549 - },
2550 - "/api/v3/auth_configs/{nanoid}/{status}": {
2551 - "patch": {
2552 - "summary": "Enable or disable an authentication configuration",
2553 - "description": "Updates the status of an authentication configuration to either enabled or disabled. Disabled configurations cannot be used for new connections.",
2554 - "tags": [
2555 - "Auth Configs"
2556 - ],
2557 - "operationId": "patchAuthConfigsByNanoidByStatus",
2558 - "security": [
2559 - {
2560 - "ApiKeyAuth": []
2561 - },
2562 - {
2563 - "UserApiKeyAuth": []
2564 - }
2565 - ],
2566 - "parameters": [
2567 - {
2568 - "schema": {
2569 - "type": "string",
2570 - "format": "authConfigId",
2571 - "description": "The unique identifier of the authentication configuration to update"
2572 - },
2573 - "required": true,
2574 - "description": "The unique identifier of the authentication configuration to update",
2575 - "name": "nanoid",
2576 - "in": "path"
2512 },
2578 - {
2579 - "schema": {
2580 - "type": "string",
2581 - "enum": [
2582 - "ENABLED",
2583 - "DISABLED"
2584 - ],
2585 - "description": "The new status to set for the auth configuration"
2586 - },
2587 - "required": true,
2588 - "description": "The new status to set for the auth configuration",
2589 - "name": "status",
2590 - "in": "path"
2591 - }
2592 - ],
2593 - "responses": {
2594 - "200": {
2595 - "description": "Successfully updated auth config status",
2513 + "429": {
2514 + "description": "Too many requests - Rate limit exceeded on the connected account or proxy service",
2515 "content": {
2516 "application/json": {
2517 "schema": {
2599 - "type": "object",
2600 - "properties": {}
2518 + "$ref": "#/components/schemas/Error"
2519 }
2520 }
2521 }
2522 },
2605 - "400": {
2606 - "description": "Bad request - Invalid auth config ID or status value",
2523 + "500": {
2524 + "description": "Internal server error - Something went wrong on the server",
2525 "content": {
2526 "application/json": {
2527 "schema": {
@@ -2612,8 +2530,8 @@
2530 }
2531 }
2532 },
2615 - "401": {
2616 - "description": "Unauthorized - Authentication required",
2533 + "501": {
2534 + "description": "Not implemented - This operation is not supported for the requested connected account or authentication scheme",
2535 "content": {
2536 "application/json": {
2537 "schema": {
@@ -2622,8 +2540,8 @@
2540 }
2541 }
2542 },
2625 - "404": {
2626 - "description": "Not found - Auth configuration does not exist",
2543 + "502": {
2544 + "description": "Bad gateway - Error communicating with the upstream API",
2545 "content": {
2546 "application/json": {
2547 "schema": {
@@ -2632,8 +2550,8 @@
2550 }
2551 }
2552 },
2635 - "500": {
2636 - "description": "Internal server error - Something went wrong on the server",
2553 + "504": {
2554 + "description": "Gateway timeout - Upstream API timed out",
2555 "content": {
2556 "application/json": {
2557 "schema": {
@@ -2642,17 +2560,18 @@
2560 }
2561 }
2562 }
2645 - }
2563 + },
2564 + "x-api-version": "3.1"
2565 }
2566 },
2648 - "/api/v3/connected_accounts": {
2649 - "get": {
2650 - "summary": "List connected accounts with optional filters",
2651 - "description": "Retrieves all connected accounts for your project. Connected accounts represent authenticated user connections to external services (e.g., a user's Gmail account, Slack workspace). Filter by toolkit, status, user ID, or auth config to find specific connections.",
2567 + "/api/v3.1/tools/scopes/required": {
2568 + "post": {
2569 + "summary": "Get required scopes for tools",
2570 + "description": "Resolves required scopes for the specified tools at a given toolkit version. All requested tools must belong to the same toolkit. Returns the flat scope union plus per-tool structured scope requirements when available.",
2571 "tags": [
2653 - "Connected Accounts"
2572 + "Tools"
2573 ],
2655 - "operationId": "getConnectedAccounts",
2574 + "operationId": "postToolsScopesRequired",
2575 "security": [
2576 {
2577 "ApiKeyAuth": []
@@ -2661,498 +2580,120 @@
2580 "UserApiKeyAuth": []
2581 }
2582 ],
2664 - "parameters": [
2665 - {
2666 - "schema": {
2667 - "type": "array",
2668 - "nullable": true,
2669 - "items": {
2670 - "type": "string"
2671 - },
2672 - "description": "The toolkit slugs of the connected accounts"
2673 - },
2674 - "required": false,
2675 - "description": "The toolkit slugs of the connected accounts",
2676 - "name": "toolkit_slugs",
2677 - "in": "query"
2678 - },
2679 - {
2680 - "schema": {
2681 - "type": "array",
2682 - "nullable": true,
2683 - "items": {
2684 - "type": "string",
2685 - "enum": [
2686 - "INITIALIZING",
2687 - "INITIATED",
2688 - "ACTIVE",
2689 - "FAILED",
2690 - "EXPIRED",
2691 - "INACTIVE"
2583 + "requestBody": {
2584 + "content": {
2585 + "application/json": {
2586 + "schema": {
2587 + "type": "object",
2588 + "properties": {
2589 + "tools": {
2590 + "type": "array",
2591 + "items": {
2592 + "type": "string"
2593 + },
2594 + "minItems": 1,
2595 + "description": "Tool slugs to resolve scopes for. All tools must belong to the same toolkit.",
2596 + "example": [
2597 + "GMAIL_FETCH_EMAILS",
2598 + "GMAIL_SEND_EMAIL"
2599 + ]
2600 + },
2601 + "version": {
2602 + "type": "string",
2603 + "description": "Toolkit version to resolve scopes against for the requested toolkit. Defaults to the pinned HTTP version when omitted.",
2604 + "example": "latest"
2605 + }
2606 + },
2607 + "required": [
2608 + "tools"
2609 ]
2693 - },
2694 - "description": "The status of the connected account"
2695 - },
2696 - "required": false,
2697 - "description": "The status of the connected account",
2698 - "name": "statuses",
2699 - "in": "query"
2700 - },
2701 - {
2702 - "schema": {
2703 - "type": "string",
2704 - "nullable": true,
2705 - "description": "The cursor to paginate through the connected accounts"
2706 - },
2707 - "required": false,
2708 - "description": "The cursor to paginate through the connected accounts",
2709 - "name": "cursor",
2710 - "in": "query"
2711 - },
2712 - {
2713 - "schema": {
2714 - "type": "number",
2715 - "nullable": true,
2716 - "description": "The limit of the connected accounts to return"
2717 - },
2718 - "required": false,
2719 - "description": "The limit of the connected accounts to return",
2720 - "name": "limit",
2721 - "in": "query"
2722 - },
2723 - {
2724 - "schema": {
2725 - "type": "array",
2726 - "nullable": true,
2727 - "items": {
2728 - "type": "string"
2729 - },
2730 - "description": "The user ids of the connected accounts"
2731 - },
2732 - "required": false,
2733 - "description": "The user ids of the connected accounts",
2734 - "name": "user_ids",
2735 - "in": "query"
2736 - },
2737 - {
2738 - "schema": {
2739 - "type": "array",
2740 - "nullable": true,
2741 - "items": {
2742 - "type": "string",
2743 - "format": "authConfigId"
2744 - },
2745 - "description": "The auth config ids of the connected accounts"
2746 - },
2747 - "required": false,
2748 - "description": "The auth config ids of the connected accounts",
2749 - "name": "auth_config_ids",
2750 - "in": "query"
2751 - },
2752 - {
2753 - "schema": {
2754 - "type": "array",
2755 - "nullable": true,
2756 - "items": {
2757 - "type": "string",
2758 - "format": "connectedAccountId"
2759 - },
2760 - "description": "The connected account ids to filter by"
2761 - },
2762 - "required": false,
2763 - "description": "The connected account ids to filter by",
2764 - "name": "connected_account_ids",
2765 - "in": "query"
2766 - },
2767 - {
2768 - "schema": {
2769 - "type": "string",
2770 - "enum": [
2771 - "created_at",
2772 - "updated_at"
2773 - ],
2774 - "default": "created_at",
2775 - "description": "The order by of the connected accounts"
2776 - },
2777 - "required": false,
2778 - "description": "The order by of the connected accounts",
2779 - "name": "order_by",
2780 - "in": "query"
2781 - },
2782 - {
2783 - "schema": {
2784 - "type": "string",
2785 - "enum": [
2786 - "asc",
2787 - "desc"
2788 - ],
2789 - "default": "desc",
2790 - "description": "The order direction of the connected accounts"
2791 - },
2792 - "required": false,
2793 - "description": "The order direction of the connected accounts",
2794 - "name": "order_direction",
2795 - "in": "query"
2610 + }
2611 + }
2612 }
2797 - ],
2613 + },
2614 "responses": {
2615 "200": {
2800 - "description": "Successfully retrieved connected accounts",
2616 + "description": "Successfully retrieved scopes for the specified tools",
2617 "content": {
2618 "application/json": {
2619 "schema": {
2620 "type": "object",
2621 "properties": {
2806 - "items": {
2622 + "scopes_required": {
2623 + "type": "array",
2624 + "items": {
2625 + "type": "string"
2626 + },
2627 + "description": "A combined list of all unique scopes required by the specified tools",
2628 + "example": [
2629 + "channels:read",
2630 + "chat:write",
2631 + "https://www.googleapis.com/auth/gmail.modify",
2632 + "repo",
2633 + "user:email"
2634 + ]
2635 + },
2636 + "per_tool_requirements": {
2637 "type": "array",
2638 "items": {
2639 "type": "object",
2640 "properties": {
2811 - "toolkit": {
2812 - "type": "object",
2813 - "properties": {
2814 - "slug": {
2815 - "type": "string",
2816 - "description": "The slug of the toolkit"
2817 - }
2818 - },
2819 - "required": [
2820 - "slug"
2821 - ]
2641 + "tool": {
2642 + "type": "string"
2643 },
2823 - "auth_config": {
2644 + "scope_requirements": {
2645 "type": "object",
2646 + "nullable": true,
2647 "properties": {
2826 - "id": {
2827 - "type": "string",
2828 - "format": "authConfigId",
2829 - "description": "The id of the auth config"
2830 - },
2831 - "auth_scheme": {
2832 - "type": "string",
2833 - "enum": [
2834 - "OAUTH2",
2835 - "OAUTH1",
2836 - "API_KEY",
2837 - "BASIC",
2838 - "BILLCOM_AUTH",
2839 - "BEARER_TOKEN",
2840 - "GOOGLE_SERVICE_ACCOUNT",
2841 - "NO_AUTH",
2842 - "BASIC_WITH_JWT",
2843 - "CALCOM_AUTH",
2844 - "SERVICE_ACCOUNT",
2845 - "SAML",
2846 - "DCR_OAUTH",
2847 - "S2S_OAUTH2"
2848 - ],
2849 - "description": "the authScheme is part of the connection state use it there",
2850 - "deprecated": true
2851 - },
2852 - "is_composio_managed": {
2853 - "type": "boolean",
2854 - "description": "Whether the auth config is managed by Composio"
2855 - },
2856 - "is_disabled": {
2857 - "type": "boolean",
2858 - "description": "Whether the auth config is disabled"
2859 - },
2860 - "deprecated": {
2861 - "type": "object",
2862 - "properties": {
2863 - "uuid": {
2864 - "type": "string",
2865 - "format": "uuid",
2866 - "description": "The uuid of the auth config"
2867 - }
2868 - },
2869 - "required": [
2870 - "uuid"
2871 - ],
2872 - "deprecated": true
2648 + "all_of": {
2649 + "type": "array",
2650 + "items": {
2651 + "anyOf": [
2652 + {
2653 + "type": "string"
2654 + },
2655 + {
2656 + "type": "object",
2657 + "properties": {
2658 + "any_of": {
2659 + "type": "array",
2660 + "items": {
2661 + "type": "string"
2662 + },
2663 + "minItems": 1
2664 + }
2665 + },
2666 + "required": [
2667 + "any_of"
2668 + ]
2669 + }
2670 + ]
2671 + }
2672 }
2673 },
2674 "required": [
2876 - "id",
2877 - "auth_scheme",
2878 - "is_composio_managed",
2879 - "is_disabled"
2675 + "all_of"
2676 ]
2881 - },
2882 - "id": {
2883 - "type": "string",
2884 - "format": "connectedAccountId",
2885 - "description": "The id of the connection"
2886 - },
2887 - "word_id": {
2888 - "type": "string",
2889 - "nullable": true,
2890 - "description": "A short, token-friendly identifier for multi-account disambiguation, typically toolkit-prefixed with 1-2 words (e.g., \"gmail_red-castle\")"
2891 - },
2892 - "alias": {
2893 - "type": "string",
2894 - "nullable": true,
2895 - "description": "A user-defined alias for the connected account"
2896 - },
2897 - "user_id": {
2898 - "type": "string",
2899 - "description": "This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back",
2900 - "deprecated": true
2901 - },
2902 - "status": {
2903 - "type": "string",
2904 - "enum": [
2905 - "INITIALIZING",
2906 - "INITIATED",
2907 - "ACTIVE",
2908 - "FAILED",
2909 - "EXPIRED",
2910 - "INACTIVE"
2911 - ],
2912 - "description": "The status of the connection"
2913 - },
2914 - "created_at": {
2915 - "type": "string",
2916 - "description": "The created at of the connection"
2917 - },
2918 - "updated_at": {
2919 - "type": "string",
2920 - "description": "The updated at of the connection"
2921 - },
2922 - "state": {
2923 - "description": "The state of the connection",
2924 - "type": "object",
2925 - "properties": {
2926 - "authScheme": {
2927 - "type": "string",
2928 - "enum": [
2929 - "OAUTH1",
2930 - "OAUTH2",
2931 - "API_KEY",
2932 - "BASIC",
2933 - "BEARER_TOKEN",
2934 - "GOOGLE_SERVICE_ACCOUNT",
2935 - "NO_AUTH",
2936 - "CALCOM_AUTH",
2937 - "BILLCOM_AUTH",
2938 - "BASIC_WITH_JWT",
2939 - "SERVICE_ACCOUNT",
2940 - "SAML",
2941 - "DCR_OAUTH",
2942 - "S2S_OAUTH2"
2943 - ]
2944 - },
2945 - "val": {
2946 - "type": "object",
2947 - "properties": {
2948 - "subdomain": {
2949 - "type": "string"
2950 - },
2951 - "your-domain": {
2952 - "type": "string"
2953 - },
2954 - "region": {
2955 - "type": "string"
2956 - },
2957 - "shop": {
2958 - "type": "string"
2959 - },
2960 - "account_url": {
2961 - "type": "string"
2962 - },
2963 - "COMPANYDOMAIN": {
2964 - "type": "string"
2965 - },
2966 - "extension": {
2967 - "type": "string"
2968 - },
2969 - "form_api_base_url": {
2970 - "type": "string"
2971 - },
2972 - "instanceEndpoint": {
2973 - "type": "string"
2974 - },
2975 - "api_url": {
2976 - "type": "string"
2977 - },
2978 - "borneo_dashboard_url": {
2979 - "type": "string"
2980 - },
2981 - "proxy_username": {
2982 - "type": "string"
2983 - },
2984 - "proxy_password": {
2985 - "type": "string"
2986 - },
2987 - "domain": {
2988 - "type": "string"
2989 - },
2990 - "version": {
2991 - "type": "string"
2992 - },
2993 - "dc": {
2994 - "type": "string"
2995 - },
2996 - "site_name": {
2997 - "type": "string"
2998 - },
2999 - "instanceName": {
3000 - "type": "string"
3001 - },
3002 - "account_id": {
3003 - "type": "string"
3004 - },
3005 - "your_server": {
3006 - "type": "string"
3007 - },
3008 - "server_location": {
3009 - "type": "string"
3010 - },
3011 - "base_url": {
3012 - "type": "string"
3013 - },
3014 - "status": {
3015 - "type": "string",
3016 - "enum": [
3017 - "INITIALIZING",
3018 - "INITIATED",
3019 - "ACTIVE",
3020 - "FAILED",
3021 - "EXPIRED",
3022 - "INACTIVE"
3023 - ]
3024 - },
3025 - "oauth_token": {
3026 - "type": "string"
3027 - },
3028 - "authUri": {
3029 - "type": "string"
3030 - },
3031 - "oauth_token_secret": {
3032 - "type": "string"
3033 - },
3034 - "redirectUrl": {
3035 - "type": "string"
3036 - },
3037 - "callbackUrl": {
3038 - "type": "string"
3039 - },
3040 - "oauth_verifier": {
3041 - "type": "string"
3042 - },
3043 - "consumer_key": {
3044 - "type": "string"
3045 - },
3046 - "callback_url": {
3047 - "type": "string"
3048 - },
3049 - "error": {
3050 - "type": "string"
3051 - },
3052 - "error_description": {
3053 - "type": "string"
3054 - },
3055 - "expired_at": {
3056 - "type": "string"
3057 - }
3058 - },
3059 - "required": [
3060 - "status"
3061 - ],
3062 - "additionalProperties": true
3063 - }
3064 - },
3065 - "required": [
3066 - "authScheme",
3067 - "val"
3068 - ],
3069 - "additionalProperties": true
3070 - },
3071 - "data": {
3072 - "type": "object",
3073 - "additionalProperties": {},
3074 - "description": "This is deprecated, use `state` instead",
3075 - "deprecated": true
3076 - },
3077 - "status_reason": {
3078 - "type": "string",
3079 - "nullable": true,
3080 - "description": "The reason the connection status changed. Possible reasons: Connection initiation did not complete within 10 minutes, Permanent auth error during token refresh, Max auth failures reached, OAuth callback failed during token exchange, Connection status updated by user, Auth config is disabled"
3081 - },
3082 - "is_disabled": {
3083 - "type": "boolean",
3084 - "description": "Whether the connection is disabled"
3085 - },
3086 - "test_request_endpoint": {
3087 - "type": "string",
3088 - "description": "The endpoint to make test request for verification"
3089 - },
3090 - "deprecated": {
3091 - "type": "object",
3092 - "properties": {
3093 - "labels": {
3094 - "type": "array",
3095 - "items": {
3096 - "type": "string"
3097 - },
3098 - "description": "The labels of the connection"
3099 - },
3100 - "uuid": {
3101 - "type": "string",
3102 - "format": "uuid",
3103 - "description": "The uuid of the connection"
3104 - }
3105 - },
3106 - "required": [
3107 - "labels",
3108 - "uuid"
3109 - ],
3110 - "deprecated": true
2677 }
2678 },
2679 "required": [
3114 - "toolkit",
3115 - "auth_config",
3116 - "id",
3117 - "word_id",
3118 - "alias",
3119 - "user_id",
3120 - "status",
3121 - "created_at",
3122 - "updated_at",
3123 - "state",
3124 - "data",
3125 - "status_reason",
3126 - "is_disabled"
2680 + "tool",
2681 + "scope_requirements"
2682 ]
3128 - }
3129 - },
3130 - "next_cursor": {
3131 - "type": "string",
3132 - "nullable": true
3133 - },
3134 - "total_pages": {
3135 - "type": "number"
3136 - },
3137 - "current_page": {
3138 - "type": "number"
3139 - },
3140 - "total_items": {
3141 - "type": "number"
2683 + },
2684 + "description": "Per-tool structured scope requirements. Null scope_requirements marks unmigrated legacy tools."
2685 }
2686 },
2687 "required": [
3145 - "items",
3146 - "total_pages",
3147 - "current_page",
3148 - "total_items"
2688 + "scopes_required",
2689 + "per_tool_requirements"
2690 ]
2691 }
2692 }
2693 }
2694 },
2695 "400": {
3155 - "description": "Bad request",
2696 + "description": "Bad request - Invalid body parameters or tools from different toolkits",
2697 "content": {
2698 "application/json": {
2699 "schema": {
@@ -3162,7 +2703,7 @@
2703 }
2704 },
2705 "401": {
3165 - "description": "Unauthorized",
2706 + "description": "Unauthorized - Authentication credentials are missing or invalid",
2707 "content": {
2708 "application/json": {
2709 "schema": {
@@ -3172,17 +2713,7 @@
2713 }
2714 },
2715 "404": {
3175 - "description": "Not found",
3176 - "content": {
3177 - "application/json": {
3178 - "schema": {
3179 - "$ref": "#/components/schemas/Error"
3180 - }
3181 - }
3182 - }
3183 - },
3184 - "422": {
3185 - "description": "Unprocessable entity",
2716 + "description": "Not found - One or more tools could not be resolved for the requested version",
2717 "content": {
2718 "application/json": {
2719 "schema": {
@@ -3192,7 +2723,7 @@
2723 }
2724 },
2725 "500": {
3195 - "description": "Internal server error",
2726 + "description": "Internal server error - Something went wrong on the server",
2727 "content": {
2728 "application/json": {
2729 "schema": {
@@ -3201,15 +2732,18 @@
2732 }
2733 }
2734 }
3204 - }
3205 - },
3206 - "post": {
3207 - "summary": "Create a new connected account",
3208 - "description": "Initiates a new connection to an external service for a user. For OAuth-based toolkits, this returns a redirect URL to complete authentication. For API key-based toolkits, provide the credentials directly in the request body. Use the `user_id` field to associate the connection with a specific user in your system.",
2735 + },
2736 + "x-api-version": "3.1"
2737 + }
2738 + },
2739 + "/api/v3.1/auth/session/info": {
2740 + "get": {
2741 + "summary": "Get current user session information",
2742 + "description": "Retrieves detailed information about the current authenticated user session, including project details, organization membership, and API key information if applicable. This endpoint is useful for verifying authentication status and retrieving contextual information about the authenticated user and their access privileges.",
2743 "tags": [
3210 - "Connected Accounts"
2744 + "Authentication"
2745 ],
3212 - "operationId": "postConnectedAccounts",
2746 + "operationId": "getAuthSessionInfo",
2747 "security": [
2748 {
2749 "ApiKeyAuth": []
@@ -3218,449 +2752,279 @@
2752 "UserApiKeyAuth": []
2753 }
2754 ],
3221 - "requestBody": {
3222 - "content": {
3223 - "application/json": {
3224 - "schema": {
3225 - "type": "object",
3226 - "properties": {
3227 - "auth_config": {
3228 - "type": "object",
3229 - "properties": {
3230 - "id": {
3231 - "type": "string",
3232 - "format": "authConfigId",
3233 - "description": "The auth config id of the app (must be a valid auth config id)"
3234 - }
3235 - },
3236 - "required": [
3237 - "id"
3238 - ]
3239 - },
3240 - "connection": {
3241 - "type": "object",
3242 - "properties": {
3243 - "state": {
3244 - "description": "The state of the connected account",
3245 - "type": "object",
3246 - "properties": {
3247 - "authScheme": {
3248 - "type": "string",
3249 - "enum": [
3250 - "OAUTH1",
3251 - "OAUTH2",
3252 - "API_KEY",
3253 - "BASIC",
3254 - "BEARER_TOKEN",
3255 - "GOOGLE_SERVICE_ACCOUNT",
3256 - "NO_AUTH",
3257 - "CALCOM_AUTH",
3258 - "BILLCOM_AUTH",
3259 - "BASIC_WITH_JWT",
3260 - "SERVICE_ACCOUNT",
3261 - "SAML",
3262 - "DCR_OAUTH",
3263 - "S2S_OAUTH2"
3264 - ]
3265 - },
3266 - "val": {
3267 - "type": "object",
3268 - "properties": {
3269 - "subdomain": {
3270 - "type": "string"
3271 - },
3272 - "your-domain": {
3273 - "type": "string"
3274 - },
3275 - "region": {
3276 - "type": "string"
3277 - },
3278 - "shop": {
3279 - "type": "string"
3280 - },
3281 - "account_url": {
3282 - "type": "string"
3283 - },
3284 - "COMPANYDOMAIN": {
3285 - "type": "string"
3286 - },
3287 - "extension": {
3288 - "type": "string"
3289 - },
3290 - "form_api_base_url": {
3291 - "type": "string"
3292 - },
3293 - "instanceEndpoint": {
3294 - "type": "string"
3295 - },
3296 - "api_url": {
3297 - "type": "string"
3298 - },
3299 - "borneo_dashboard_url": {
3300 - "type": "string"
3301 - },
3302 - "proxy_username": {
3303 - "type": "string"
3304 - },
3305 - "proxy_password": {
3306 - "type": "string"
3307 - },
3308 - "domain": {
3309 - "type": "string"
3310 - },
3311 - "version": {
3312 - "type": "string"
3313 - },
3314 - "dc": {
3315 - "type": "string"
3316 - },
3317 - "site_name": {
3318 - "type": "string"
3319 - },
3320 - "instanceName": {
3321 - "type": "string"
3322 - },
3323 - "account_id": {
3324 - "type": "string"
3325 - },
3326 - "your_server": {
3327 - "type": "string"
3328 - },
3329 - "server_location": {
3330 - "type": "string"
3331 - },
3332 - "base_url": {
3333 - "type": "string"
3334 - },
3335 - "status": {
3336 - "type": "string",
3337 - "enum": [
3338 - "INITIALIZING",
3339 - "INITIATED",
3340 - "ACTIVE",
3341 - "FAILED",
3342 - "EXPIRED",
3343 - "INACTIVE"
3344 - ]
3345 - },
3346 - "oauth_token": {
3347 - "type": "string"
3348 - },
3349 - "authUri": {
3350 - "type": "string"
3351 - },
3352 - "oauth_token_secret": {
3353 - "type": "string"
3354 - },
3355 - "redirectUrl": {
3356 - "type": "string"
3357 - },
3358 - "callbackUrl": {
3359 - "type": "string"
3360 - },
3361 - "oauth_verifier": {
3362 - "type": "string"
3363 - },
3364 - "consumer_key": {
3365 - "type": "string"
3366 - },
3367 - "callback_url": {
3368 - "type": "string"
3369 - },
3370 - "error": {
3371 - "type": "string"
3372 - },
3373 - "error_description": {
3374 - "type": "string"
3375 - },
3376 - "expired_at": {
3377 - "type": "string"
3378 - }
3379 - },
3380 - "required": [
3381 - "status"
3382 - ],
3383 - "additionalProperties": true
3384 - }
3385 - },
3386 - "required": [
3387 - "authScheme",
3388 - "val"
3389 - ],
3390 - "additionalProperties": true
3391 - },
3392 - "data": {
3393 - "type": "object",
3394 - "additionalProperties": {},
3395 - "description": "DEPRECATED: This parameter will be removed in a future version. Please use state instead.",
3396 - "deprecated": true
3397 - },
3398 - "user_id": {
3399 - "type": "string",
3400 - "default": "default",
3401 - "description": "The user id of the connected account"
3402 - },
3403 - "alias": {
3404 - "type": "string",
3405 - "description": "A human-readable alias for this connected account. Must be unique per entity and toolkit within the project."
3406 - },
3407 - "callback_url": {
3408 - "type": "string",
3409 - "format": "uri",
3410 - "description": "The URL to redirect to after connection completion"
3411 - },
3412 - "redirect_uri": {
3413 - "type": "string",
3414 - "format": "uri",
3415 - "description": "DEPRECATED: This parameter will be removed in a future version. Please use callback_url instead.",
3416 - "deprecated": true
3417 - },
3418 - "deprecated_is_v1_rerouted": {
3419 - "type": "boolean",
3420 - "default": false,
3421 - "description": "DEPRECATED: This parameter will be removed in a future version.",
3422 - "deprecated": true
3423 - }
3424 - }
3425 - },
3426 - "validate_credentials": {
3427 - "type": "boolean",
3428 - "default": false,
3429 - "description": "[EXPERIMENTAL] Whether to validate the provided credentials, validates only for API Key Auth scheme",
3430 - "x-experimental": true
3431 - }
3432 - },
3433 - "required": [
3434 - "auth_config",
3435 - "connection"
3436 - ]
3437 - }
3438 - }
3439 - }
3440 - },
2755 "responses": {
3442 - "201": {
3443 - "description": "Successfully created connected account",
2756 + "200": {
2757 + "description": "Session is valid and active. Returns detailed information about the authenticated user, their project, and organization.",
2758 "content": {
2759 "application/json": {
2760 "schema": {
2761 "type": "object",
2762 "properties": {
3449 - "id": {
3450 - "type": "string",
3451 - "format": "connectedAccountId",
3452 - "description": "The id of the connected account"
3453 - },
3454 - "connectionData": {
3455 - "description": "The connection data of the connected account",
2763 + "project": {
2764 "type": "object",
2765 + "nullable": true,
2766 "properties": {
3458 - "authScheme": {
2767 + "auto_id": {
2768 + "type": "number",
2769 + "description": "Internal auto-incrementing ID for the project",
2770 + "example": 12345
2771 + },
2772 + "id": {
2773 "type": "string",
3460 - "enum": [
3461 - "OAUTH1",
3462 - "OAUTH2",
3463 - "API_KEY",
3464 - "BASIC",
3465 - "BEARER_TOKEN",
3466 - "GOOGLE_SERVICE_ACCOUNT",
3467 - "NO_AUTH",
3468 - "CALCOM_AUTH",
3469 - "BILLCOM_AUTH",
3470 - "BASIC_WITH_JWT",
3471 - "SERVICE_ACCOUNT",
3472 - "SAML",
3473 - "DCR_OAUTH",
3474 - "S2S_OAUTH2"
3475 - ]
2774 + "description": "UUID identifier for the project",
2775 + "example": "550e8400-e29b-41d4-a716-446655440000"
2776 },
3477 - "val": {
3478 - "type": "object",
3479 - "properties": {
3480 - "subdomain": {
3481 - "type": "string"
3482 - },
3483 - "your-domain": {
3484 - "type": "string"
3485 - },
3486 - "region": {
3487 - "type": "string"
3488 - },
3489 - "shop": {
3490 - "type": "string"
3491 - },
3492 - "account_url": {
3493 - "type": "string"
3494 - },
3495 - "COMPANYDOMAIN": {
3496 - "type": "string"
3497 - },
3498 - "extension": {
3499 - "type": "string"
3500 - },
3501 - "form_api_base_url": {
3502 - "type": "string"
3503 - },
3504 - "instanceEndpoint": {
3505 - "type": "string"
3506 - },
3507 - "api_url": {
3508 - "type": "string"
3509 - },
3510 - "borneo_dashboard_url": {
3511 - "type": "string"
3512 - },
3513 - "proxy_username": {
3514 - "type": "string"
3515 - },
3516 - "proxy_password": {
3517 - "type": "string"
3518 - },
3519 - "domain": {
3520 - "type": "string"
3521 - },
3522 - "version": {
3523 - "type": "string"
3524 - },
3525 - "dc": {
3526 - "type": "string"
3527 - },
3528 - "site_name": {
3529 - "type": "string"
3530 - },
3531 - "instanceName": {
3532 - "type": "string"
3533 - },
3534 - "account_id": {
3535 - "type": "string"
3536 - },
3537 - "your_server": {
3538 - "type": "string"
3539 - },
3540 - "server_location": {
3541 - "type": "string"
3542 - },
3543 - "base_url": {
3544 - "type": "string"
3545 - },
3546 - "status": {
2777 + "org_id": {
2778 + "type": "string",
2779 + "description": "Organization UUID that this project belongs to",
2780 + "example": "550e8400-e29b-41d4-a716-446655440001"
2781 + },
2782 + "name": {
2783 + "type": "string",
2784 + "description": "User-defined name for the project",
2785 + "example": "Production API"
2786 + },
2787 + "email": {
2788 + "type": "string",
2789 + "description": "Email address used for project notifications",
2790 + "example": "project-123@composio.dev"
2791 + },
2792 + "nano_id": {
2793 + "type": "string",
2794 + "format": "projectId",
2795 + "description": "Short, URL-friendly unique identifier for the project",
2796 + "example": "proj_abc123xyz456"
2797 + },
2798 + "created_at": {
2799 + "type": "string",
2800 + "description": "Date and time when the project was created",
2801 + "example": "2023-05-16T14:30:00.000Z"
2802 + },
2803 + "updated_at": {
2804 + "type": "string",
2805 + "description": "Date and time when the project was last modified",
2806 + "example": "2023-05-18T09:15:30.000Z"
2807 + },
2808 + "webhook_url": {
2809 + "type": "string",
2810 + "nullable": true,
2811 + "description": "Endpoint URL for trigger webhook notifications",
2812 + "example": "https://example.com/webhook"
2813 + },
2814 + "event_webhook_url": {
2815 + "type": "string",
2816 + "nullable": true,
2817 + "description": "Endpoint URL for event webhook notifications",
2818 + "example": "https://example.com/events"
2819 + },
2820 + "webhook_secret": {
2821 + "type": "string",
2822 + "nullable": true,
2823 + "description": "Secret used to verify webhook signatures",
2824 + "example": "whsec_a1b2c3d4e5f6g7h8i9j0"
2825 + },
2826 + "triggers_enabled": {
2827 + "type": "boolean",
2828 + "description": "Flag indicating if triggers are enabled for this project",
2829 + "example": true
2830 + },
2831 + "last_subscribed_at": {
2832 + "type": "string",
2833 + "nullable": true,
2834 + "description": "Date and time when the project last subscribed to updates",
2835 + "example": "2023-05-17T10:00:00.000Z"
2836 + },
2837 + "deleted": {
2838 + "type": "boolean",
2839 + "description": "Flag indicating if the project has been deleted",
2840 + "example": false
2841 + },
2842 + "is_new_webhook": {
2843 + "type": "boolean",
2844 + "description": "Deprecated: Please refer to webhook_version instead. True indicates if the webhook configuration is using the previous new format (V2). False indicates the oldest format (V1)",
2845 + "example": true,
2846 + "deprecated": true
2847 + },
2848 + "webhook_version": {
2849 + "type": "string",
2850 + "enum": [
2851 + "V1",
2852 + "V2",
2853 + "V3"
2854 + ],
2855 + "description": "Version of the webhook configuration",
2856 + "example": "V2"
2857 + },
2858 + "org": {
2859 + "type": "object",
2860 + "properties": {
2861 + "id": {
2862 "type": "string",
3548 - "enum": [
3549 - "INITIALIZING",
3550 - "INITIATED",
3551 - "ACTIVE",
3552 - "FAILED",
3553 - "EXPIRED",
3554 - "INACTIVE"
3555 - ]
3556 - },
3557 - "oauth_token": {
3558 - "type": "string"
3559 - },
3560 - "authUri": {
3561 - "type": "string"
3562 - },
3563 - "oauth_token_secret": {
3564 - "type": "string"
3565 - },
3566 - "redirectUrl": {
3567 - "type": "string"
3568 - },
3569 - "callbackUrl": {
3570 - "type": "string"
3571 - },
3572 - "oauth_verifier": {
3573 - "type": "string"
3574 - },
3575 - "consumer_key": {
3576 - "type": "string"
3577 - },
3578 - "callback_url": {
3579 - "type": "string"
3580 - },
3581 - "error": {
3582 - "type": "string"
2863 + "format": "orgId",
2864 + "description": "Short, URL-friendly unique identifier for the organization",
2865 + "example": "org_abc123xyz456"
2866 },
3584 - "error_description": {
3585 - "type": "string"
2867 + "name": {
2868 + "type": "string",
2869 + "description": "User-defined name for the organization",
2870 + "example": "Acme Corp"
2871 },
3587 - "expired_at": {
3588 - "type": "string"
2872 + "plan": {
2873 + "type": "string",
2874 + "description": "Current subscription plan level",
2875 + "example": "BUSINESS"
2876 }
2877 },
2878 "required": [
3592 - "status"
2879 + "id",
2880 + "name",
2881 + "plan"
2882 ],
3594 - "additionalProperties": true
2883 + "description": "Organization details"
2884 }
2885 },
2886 "required": [
3598 - "authScheme",
3599 - "val"
3600 - ],
3601 - "additionalProperties": true
3602 - },
3603 - "status": {
3604 - "type": "string",
3605 - "enum": [
3606 - "INITIALIZING",
3607 - "INITIATED",
3608 - "ACTIVE",
3609 - "FAILED",
3610 - "EXPIRED",
3611 - "INACTIVE"
2887 + "auto_id",
2888 + "id",
2889 + "org_id",
2890 + "name",
2891 + "email",
2892 + "nano_id",
2893 + "created_at",
2894 + "updated_at",
2895 + "webhook_url",
2896 + "event_webhook_url",
2897 + "webhook_secret",
2898 + "triggers_enabled",
2899 + "last_subscribed_at",
2900 + "deleted",
2901 + "is_new_webhook",
2902 + "webhook_version",
2903 + "org"
2904 ],
3613 - "description": "DEPRECATED: This field will be removed in a future version",
3614 - "deprecated": true
3615 - },
3616 - "redirect_url": {
3617 - "type": "string",
3618 - "nullable": true,
3619 - "description": "DEPRECATED: This field will be removed in a future version",
3620 - "deprecated": true
3621 - },
3622 - "redirect_uri": {
3623 - "type": "string",
3624 - "nullable": true,
3625 - "description": "DEPRECATED: This field will be removed in a future version",
3626 - "deprecated": true
2905 + "description": "Details of the current active project (null if accessing with org-level credentials)"
2906 },
3628 - "deprecated": {
2907 + "api_key": {
2908 "type": "object",
2909 + "nullable": true,
2910 "properties": {
3631 - "uuid": {
2911 + "auto_id": {
2912 + "type": "number",
2913 + "description": "Internal auto-incrementing ID for the API key",
2914 + "example": 7890
2915 + },
2916 + "id": {
2917 "type": "string",
3633 - "format": "uuid",
3634 - "description": "The uuid of the connected account"
2918 + "description": "UUID identifier for the API key",
2919 + "example": "550e8400-e29b-41d4-a716-446655440003"
2920 },
3636 - "authConfigUuid": {
2921 + "name": {
2922 "type": "string",
3638 - "format": "uuid",
3639 - "description": "The uuid of the auth config"
3640 - }
3641 - },
3642 - "required": [
3643 - "uuid",
3644 - "authConfigUuid"
3645 - ],
3646 - "description": "DEPRECATED: This field will be removed in a future version. Please use id and auth_config.id instead.",
3647 - "deprecated": true
2923 + "description": "User-defined name for the API key",
2924 + "example": "Development Key"
2925 + },
2926 + "project_id": {
2927 + "type": "string",
2928 + "format": "projectId",
2929 + "description": "Short, URL-friendly unique identifier for the associated project",
2930 + "example": "proj_abc123xyz456"
2931 + },
2932 + "org_member_id": {
2933 + "type": "string",
2934 + "description": "UUID identifier for the organization member who owns this API key",
2935 + "example": "550e8400-e29b-41d4-a716-446655440002"
2936 + },
2937 + "created_at": {
2938 + "type": "string",
2939 + "description": "Date and time when the API key was created",
2940 + "example": "2023-05-01T10:00:00.000Z"
2941 + },
2942 + "updated_at": {
2943 + "type": "string",
2944 + "description": "Date and time when the API key was last modified",
2945 + "example": "2023-05-01T10:00:00.000Z"
2946 + },
2947 + "deleted_at": {
2948 + "type": "string",
2949 + "nullable": true,
2950 + "description": "Date and time when the API key was deleted (if applicable)"
2951 + },
2952 + "key": {
2953 + "type": "string",
2954 + "description": "The actual API key value (usually only shown once during creation)",
2955 + "example": "sk_live_abc123xyz456"
2956 + },
2957 + "deleted": {
2958 + "type": "boolean",
2959 + "description": "Flag indicating if the API key has been deleted",
2960 + "example": false
2961 + }
2962 + },
2963 + "required": [
2964 + "auto_id",
2965 + "id",
2966 + "name",
2967 + "project_id",
2968 + "org_member_id",
2969 + "created_at",
2970 + "updated_at",
2971 + "deleted_at",
2972 + "key",
2973 + "deleted"
2974 + ],
2975 + "description": "Details of the API key used for authentication (null if using session auth)"
2976 + },
2977 + "org_member": {
2978 + "type": "object",
2979 + "properties": {
2980 + "id": {
2981 + "type": "string",
2982 + "description": "UUID identifier for the organization member",

This file is too large to show in full.

docs/scripts/fetch-openapi.mjs
+93 -134
@@ -1,6 +1,8 @@
1 /**
2 - * Fetches and filters the OpenAPI spec for fumadocs
3 - * Mirrors the filtering done in fern/apis/openapi-overrides.yml
2 + * Fetches and filters the OpenAPI specs for fumadocs.
3 + * Outputs two separate spec files:
4 + * - public/openapi.json (v3.1 — latest, clean operationIds)
5 + * - public/openapi-v3.json (v3.0)
6 *
7 * Run: bun run scripts/fetch-openapi.mjs
8 */
@@ -9,7 +11,8 @@ import { writeFileSync } from 'node:fs';
11 import { fileURLToPath } from 'node:url';
12 import { dirname, join } from 'node:path';
13
12 -const OPENAPI_URL = process.env.OPENAPI_SPEC_URL || 'https://backend.composio.dev/api/v3/openapi.json';
14 +const OPENAPI_V3_URL = process.env.OPENAPI_SPEC_URL || 'https://backend.composio.dev/api/v3/openapi.json';
15 +const OPENAPI_V31_URL = process.env.OPENAPI_V31_SPEC_URL || 'https://backend.composio.dev/api/v3.1/openapi.json';
16
17 // Tags to ignore (internal/admin)
18 const IGNORED_TAGS = [
@@ -20,25 +23,26 @@ const IGNORED_TAGS = [
23 'x-internal',
24 ];
25
23 -async function fetchAndFilterSpec() {
24 - console.log(`Fetching OpenAPI spec from ${OPENAPI_URL}...`);
25 -
26 - const response = await fetch(OPENAPI_URL);
26 +async function fetchSpec(url) {
27 + console.log(`Fetching OpenAPI spec from ${url}...`);
28 + const response = await fetch(url);
29 if (!response.ok) {
28 - throw new Error(`Failed to fetch: ${response.status}`);
30 + throw new Error(`Failed to fetch ${url}: ${response.status}`);
31 }
32 + return response.json();
33 +}
34
31 - const spec = await response.json();
32 -
33 - // Filter paths
35 +/**
36 + * Filter paths: remove ignored/internal tags, keep first tag only.
37 + */
38 +function filterPaths(paths) {
39 const filteredPaths = {};
40 let removedCount = 0;
41
37 - for (const [path, methods] of Object.entries(spec.paths)) {
42 + for (const [path, methods] of Object.entries(paths)) {
43 const filteredMethods = {};
44
45 for (const [method, operation] of Object.entries(methods)) {
41 - // Skip if all tags are ignored
46 const tags = operation.tags || [];
47 const hasValidTag = tags.some(tag => !IGNORED_TAGS.includes(tag));
48
@@ -47,13 +51,11 @@ async function fetchAndFilterSpec() {
51 continue;
52 }
53
50 - // Skip if marked as internal (property or tag)
54 if (operation['x-internal'] === true || tags.includes('x-internal')) {
55 removedCount++;
56 continue;
57 }
58
56 - // Keep only the first tag to avoid duplicates in sidebar
59 if (tags.length > 1) {
60 operation.tags = [tags[0]];
61 }
@@ -66,32 +68,27 @@ async function fetchAndFilterSpec() {
68 }
69 }
70
69 - // For endpoints that exist under multiple API versions (e.g. /api/v3/ and /api/v3.1/),
70 - // only keep the latest version to avoid duplicate sidebar entries.
71 - const versionedPaths = new Map();
72 - for (const path of Object.keys(filteredPaths)) {
73 - const match = path.match(/^\/api\/v([\d.]+)\/(.+)$/);
74 - if (!match) continue;
75 - const [, version, rest] = match;
76 - if (!versionedPaths.has(rest)) versionedPaths.set(rest, []);
77 - versionedPaths.get(rest).push({ version, fullPath: path });
78 - }
71 + return { filteredPaths, removedCount };
72 +}
73
80 - let versionDedupCount = 0;
81 - for (const entries of versionedPaths.values()) {
82 - if (entries.length <= 1) continue;
83 - entries.sort((a, b) => parseFloat(b.version) - parseFloat(a.version));
84 - for (const entry of entries.slice(1)) {
85 - delete filteredPaths[entry.fullPath];
86 - versionDedupCount++;
74 +/**
75 + * Strip version prefixes from operationIds (e.g. getV3_1Tools → getTools).
76 + */
77 +function cleanOperationIds(paths) {
78 + for (const methods of Object.values(paths)) {
79 + for (const operation of Object.values(methods)) {
80 + if (operation.operationId) {
81 + // Remove V3_1, V3_0, etc. prefixes from operationId
82 + operation.operationId = operation.operationId.replace(/V\d+_\d+/g, '');
83 + }
84 }
85 }
89 - if (versionDedupCount > 0) {
90 - console.log(`Removed ${versionDedupCount} endpoints superseded by newer API versions`);
91 - }
92 -
93 - spec.paths = filteredPaths;
86 +}
87
88 +/**
89 + * Post-process a spec: remove CookieAuth, normalize unions, fix nullable.
90 + */
91 +function postProcessSpec(spec) {
92 // Filter tags list
93 if (spec.tags) {
94 spec.tags = spec.tags.filter(tag => !IGNORED_TAGS.includes(tag.name));
@@ -100,175 +97,137 @@ async function fetchAndFilterSpec() {
97 // Remove CookieAuth from security schemes
98 if (spec.components?.securitySchemes?.CookieAuth) {
99 delete spec.components.securitySchemes.CookieAuth;
103 - console.log('Removed CookieAuth from securitySchemes');
100 }
101
102 // Remove CookieAuth from all endpoint security arrays
107 - let cookieAuthRemovedCount = 0;
103 for (const methods of Object.values(spec.paths)) {
104 for (const operation of Object.values(methods)) {
105 if (operation.security) {
111 - const originalLength = operation.security.length;
106 operation.security = operation.security.filter(sec => !('CookieAuth' in sec));
113 - if (operation.security.length < originalLength) {
114 - cookieAuthRemovedCount++;
115 - }
116 - // Remove empty security array
107 if (operation.security.length === 0) {
108 delete operation.security;
109 }
110 }
111 }
112 }
123 - console.log(`Removed CookieAuth from ${cookieAuthRemovedCount} endpoint security definitions`);
113
125 - console.log(`Removed ${removedCount} endpoints/operations`);
126 - console.log(`Final spec has ${Object.keys(filteredPaths).length} paths`);
127 -
128 - // Normalize overly complex anyOf/oneOf schemas (e.g., connection_data with 68 object variants)
129 - // Merges similar object schemas into a single object with all properties
130 - let unionNormalizedCount = 0;
131 -
132 - // Helper to merge two property schemas, combining enums if present
114 + // Normalize overly complex anyOf/oneOf schemas
115 const mergePropertySchemas = (existing, incoming) => {
116 if (!existing) return JSON.parse(JSON.stringify(incoming));
135 -
117 const merged = JSON.parse(JSON.stringify(existing));
137 -
138 - // Merge enum values if both have enums
118 if (existing.enum && incoming.enum) {
140 - const enumSet = new Set([...existing.enum, ...incoming.enum]);
141 - merged.enum = [...enumSet];
119 + merged.enum = [...new Set([...existing.enum, ...incoming.enum])];
120 }
143 -
144 - // Recursively merge nested properties for objects
121 if (existing.properties && incoming.properties) {
122 merged.properties = { ...existing.properties };
123 for (const [key, val] of Object.entries(incoming.properties)) {
124 merged.properties[key] = mergePropertySchemas(merged.properties[key], val);
125 }
126 }
151 -
127 return merged;
128 };
129
130 const normalizeUnionSchemas = (obj) => {
131 if (!obj || typeof obj !== 'object') return;
157 -
158 - // Check for anyOf or oneOf with many similar object schemas
132 for (const unionKey of ['anyOf', 'oneOf']) {
133 if (obj[unionKey] && Array.isArray(obj[unionKey]) && obj[unionKey].length > 5) {
161 - const objectSchemas = obj[unionKey].filter(
162 - (schema) => schema.type === 'object' && schema.properties
163 - );
164 -
165 - // If most variants are objects, merge them
134 + const objectSchemas = obj[unionKey].filter(s => s.type === 'object' && s.properties);
135 if (objectSchemas.length > 5 && objectSchemas.length >= obj[unionKey].length * 0.8) {
136 const mergedProperties = {};
137 const allRequired = new Set();
169 -
170 - // Collect all properties from all variants, merging enums
138 for (const schema of objectSchemas) {
139 for (const [propName, propSchema] of Object.entries(schema.properties || {})) {
140 mergedProperties[propName] = mergePropertySchemas(mergedProperties[propName], propSchema);
141 }
175 - // Track required fields (only if required in ALL variants)
142 if (schema.required) {
177 - for (const req of schema.required) {
178 - allRequired.add(req);
179 - }
143 + for (const req of schema.required) allRequired.add(req);
144 }
145 }
182 -
183 - // Check which fields are required in ALL object schemas
184 - const universallyRequired = [];
185 - for (const req of allRequired) {
186 - const requiredInAll = objectSchemas.every(
187 - (schema) => schema.required && schema.required.includes(req)
188 - );
189 - if (requiredInAll) {
190 - universallyRequired.push(req);
191 - }
192 - }
193 -
194 - // Replace union with merged object schema
146 + const universallyRequired = [...allRequired].filter(req =>
147 + objectSchemas.every(s => s.required && s.required.includes(req))
148 + );
149 delete obj[unionKey];
150 obj.type = 'object';
151 obj.properties = mergedProperties;
198 - if (universallyRequired.length > 0) {
199 - obj.required = universallyRequired;
200 - }
152 + if (universallyRequired.length > 0) obj.required = universallyRequired;
153 obj.additionalProperties = true;
202 -
203 - unionNormalizedCount++;
204 - console.log(
205 - ` Merged ${unionKey} with ${objectSchemas.length} object variants into single object with ${Object.keys(mergedProperties).length} properties`
206 - );
154 }
155 }
156 }
210 -
211 - // Recurse into all properties
157 for (const val of Object.values(obj)) {
213 - if (Array.isArray(val)) {
214 - val.forEach((item) => normalizeUnionSchemas(item));
215 - } else {
216 - normalizeUnionSchemas(val);
217 - }
158 + if (Array.isArray(val)) val.forEach(item => normalizeUnionSchemas(item));
159 + else normalizeUnionSchemas(val);
160 }
161 };
162 normalizeUnionSchemas(spec);
221 - if (unionNormalizedCount > 0) {
222 - console.log(`Normalized ${unionNormalizedCount} complex union schemas`);
223 - }
163
225 - // Fix invalid OpenAPI 3.0: "nullable: true" without "type" is invalid
226 - // See: https://swagger.io/docs/specification/data-models/data-types/#null
227 - let nullableFixCount = 0;
164 + // Fix invalid OpenAPI 3.0: "nullable: true" without "type"
165 const fixNullableWithoutType = (obj, parentKey = '') => {
166 if (!obj || typeof obj !== 'object') return;
230 -
231 - // Check if this schema has nullable but no type definition
167 if (obj.nullable === true && !obj.type && !obj.$ref && !obj.oneOf && !obj.anyOf && !obj.allOf) {
233 - // For additionalProperties, just remove nullable (allows any type)
168 if (parentKey === 'additionalProperties') {
169 delete obj.nullable;
236 - }
237 - // For schemas with an object example, infer type: object
238 - else if (obj.example && typeof obj.example === 'object' && !Array.isArray(obj.example)) {
170 + } else if (obj.example && typeof obj.example === 'object' && !Array.isArray(obj.example)) {
171 obj.type = 'object';
240 - }
241 - // For schemas with an array example, infer type: array
242 - else if (obj.example && Array.isArray(obj.example)) {
172 + } else if (obj.example && Array.isArray(obj.example)) {
173 obj.type = 'array';
244 - }
245 - // Default: add type: object (most common case for flexible schemas)
246 - else {
174 + } else {
175 obj.type = 'object';
176 }
249 - nullableFixCount++;
177 }
251 -
252 - // Recurse into all properties
178 for (const [key, val] of Object.entries(obj)) {
254 - if (Array.isArray(val)) {
255 - val.forEach((item) => fixNullableWithoutType(item, key));
256 - } else {
257 - fixNullableWithoutType(val, key);
258 - }
179 + if (Array.isArray(val)) val.forEach(item => fixNullableWithoutType(item, key));
180 + else fixNullableWithoutType(val, key);
181 }
182 };
183 fixNullableWithoutType(spec);
262 - if (nullableFixCount > 0) {
263 - console.log(`Fixed ${nullableFixCount} schemas with nullable but no type`);
184 +}
185 +
186 +async function fetchAndFilterSpec() {
187 + // Fetch both specs in parallel
188 + const [v3Raw, v31Raw] = await Promise.all([
189 + fetchSpec(OPENAPI_V3_URL),
190 + fetchSpec(OPENAPI_V31_URL),
191 + ]);
192 +
193 + // --- v3.1 spec (latest, default) ---
194 + const v31Spec = JSON.parse(JSON.stringify(v31Raw));
195 + const v31Filtered = filterPaths(v31Spec.paths);
196 + v31Spec.paths = v31Filtered.filteredPaths;
197 + // Clean operationIds: getV3_1Tools → getTools (so URLs are clean)
198 + cleanOperationIds(v31Spec.paths);
199 + // Annotate all operations with version
200 + for (const methods of Object.values(v31Spec.paths)) {
201 + for (const op of Object.values(methods)) {
202 + op['x-api-version'] = '3.1';
203 + }
204 }
205 + postProcessSpec(v31Spec);
206 + console.log(`v3.1: ${Object.keys(v31Spec.paths).length} paths`);
207 +
208 + // --- v3.0 spec ---
209 + const v3Spec = JSON.parse(JSON.stringify(v3Raw));
210 + const v3Filtered = filterPaths(v3Spec.paths);
211 + v3Spec.paths = v3Filtered.filteredPaths;
212 + cleanOperationIds(v3Spec.paths);
213 + for (const methods of Object.values(v3Spec.paths)) {
214 + for (const op of Object.values(methods)) {
215 + op['x-api-version'] = '3.0';
216 + }
217 + }
218 + postProcessSpec(v3Spec);
219 + console.log(`v3.0: ${Object.keys(v3Spec.paths).length} paths`);
220
266 - // Write to public directory for fumadocs to fetch
221 + // Write both spec files
222 const __dirname = dirname(fileURLToPath(import.meta.url));
268 - const outputPath = join(__dirname, '../public/openapi.json');
269 - writeFileSync(outputPath, JSON.stringify(spec, null, 2));
223
271 - console.log(`Written to ${outputPath}`);
224 + const v31Path = join(__dirname, '../public/openapi.json');
225 + writeFileSync(v31Path, JSON.stringify(v31Spec, null, 2));
226 + console.log(`Written v3.1 spec to ${v31Path}`);
227 +
228 + const v3Path = join(__dirname, '../public/openapi-v3.json');
229 + writeFileSync(v3Path, JSON.stringify(v3Spec, null, 2));
230 + console.log(`Written v3.0 spec to ${v3Path}`);
231 }
232
233 fetchAndFilterSpec().catch(console.error);
docs/scripts/generate-api-index.ts
+109 -68
@@ -1,18 +1,32 @@
1 /**
2 - * Generates simple markdown index pages for each OpenAPI tag.
3 - * These pages provide:
4 - * - Tag description from OpenAPI spec
5 - * - Links to all endpoints in that tag
2 + * Generates markdown index pages for each OpenAPI tag.
3 + * Reads both v3.1 and v3.0 specs and generates a table that
4 + * uses the ApiEndpointsTable component to switch versions dynamically.
5 *
6 * Run: bun scripts/generate-api-index.ts
7 */
8
10 -import { readFileSync, writeFileSync, mkdirSync } from 'fs';
9 +import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'fs';
10 import { join } from 'path';
11
12 +interface OpenAPIOperation {
13 + summary?: string;
14 + tags?: string[];
15 + description?: string;
16 + operationId?: string;
17 + 'x-api-version'?: string;
18 +}
19 +
20 interface OpenAPISpec {
21 tags: Array<{ name: string; description?: string }>;
15 - paths: Record<string, Record<string, { summary?: string; tags?: string[]; description?: string; operationId?: string }>>;
22 + paths: Record<string, Record<string, OpenAPIOperation>>;
23 +}
24 +
25 +interface OperationEntry {
26 + summary: string;
27 + method: string;
28 + path: string;
29 + operationId: string;
30 }
31
32 function slugify(text: string): string {
@@ -22,83 +36,113 @@ function slugify(text: string): string {
36 .replace(/^-|-$/g, '');
37 }
38
25 -function generateIndexPages() {
26 - // Read OpenAPI spec
27 - const specPath = join(process.cwd(), 'public/openapi.json');
28 - const spec: OpenAPISpec = JSON.parse(readFileSync(specPath, 'utf-8'));
29 -
30 - // Build tag -> operations map
31 - const tagOperations: Record<string, Array<{ summary: string; description?: string; method: string; path: string; operationId: string }>> = {};
32 - const tagDescriptions: Record<string, string> = {};
39 +function getOperationsByTag(spec: OpenAPISpec): Record<string, OperationEntry[]> {
40 + const tagOps: Record<string, OperationEntry[]> = {};
41
34 - // Get tag descriptions
42 for (const tag of spec.tags) {
36 - tagDescriptions[tag.name] = tag.description || '';
37 - tagOperations[tag.name] = [];
38 - }
39 -
40 - // For endpoints that exist under multiple API versions (e.g. /api/v3/ and /api/v3.1/),
41 - // only show the latest version. Extract version from path like /api/v3.1/tools/... → "3.1"
42 - const supersededPaths: Set<string> = new Set();
43 - const versionedPaths = new Map<string, { version: string; fullPath: string }[]>();
44 -
45 - for (const path of Object.keys(spec.paths)) {
46 - const match = path.match(/^\/api\/v([\d.]+)\/(.+)$/);
47 - if (!match) continue;
48 - const [, version, rest] = match;
49 - if (!versionedPaths.has(rest)) versionedPaths.set(rest, []);
50 - versionedPaths.get(rest)!.push({ version, fullPath: path });
43 + tagOps[tag.name] = [];
44 }
45
53 - for (const entries of versionedPaths.values()) {
54 - if (entries.length <= 1) continue;
55 - // Sort by version descending; keep only the latest
56 - entries.sort((a, b) => parseFloat(b.version) - parseFloat(a.version));
57 - for (const entry of entries.slice(1)) {
58 - supersededPaths.add(entry.fullPath);
59 - }
60 - }
61 -
62 - // Group operations by tag
46 for (const [path, methods] of Object.entries(spec.paths)) {
64 - // Skip endpoints superseded by a newer API version
65 - if (supersededPaths.has(path)) continue;
47 for (const [method, operation] of Object.entries(methods)) {
48 if (operation.tags) {
49 for (const tag of operation.tags) {
69 - if (!tagOperations[tag]) {
70 - tagOperations[tag] = [];
71 - }
72 - const summaryFallback = operation.summary || `${method.toUpperCase()} ${path}`;
73 - tagOperations[tag].push({
74 - summary: summaryFallback,
75 - description: operation.description,
50 + if (!tagOps[tag]) tagOps[tag] = [];
51 + tagOps[tag].push({
52 + summary: operation.summary || `${method.toUpperCase()} ${path}`,
53 method: method.toUpperCase(),
54 path,
78 - operationId: operation.operationId || slugify(summaryFallback),
55 + operationId: operation.operationId || slugify(operation.summary || path),
56 });
57 }
58 }
59 }
60 }
61
85 - // Generate MDX files for each tag as index.mdx inside folders
62 + return tagOps;
63 +}
64 +
65 +function generateIndexPages() {
66 + const specV31Path = join(process.cwd(), 'public/openapi.json');
67 + const specV3Path = join(process.cwd(), 'public/openapi-v3.json');
68 +
69 + const specV31: OpenAPISpec = JSON.parse(readFileSync(specV31Path, 'utf-8'));
70 + const v31Ops = getOperationsByTag(specV31);
71 +
72 + let v3Ops: Record<string, OperationEntry[]> = {};
73 + if (existsSync(specV3Path)) {
74 + const specV3: OpenAPISpec = JSON.parse(readFileSync(specV3Path, 'utf-8'));
75 + v3Ops = getOperationsByTag(specV3);
76 + }
77 +
78 + // Collect tag descriptions from v3.1 spec
79 + const tagDescriptions: Record<string, string> = {};
80 + for (const tag of specV31.tags) {
81 + tagDescriptions[tag.name] = tag.description || '';
82 + }
83 +
84 const outputDir = join(process.cwd(), 'content/reference/api-reference');
85
88 - for (const [tagName, operations] of Object.entries(tagOperations)) {
89 - if (operations.length === 0) continue;
86 + // Get all unique tag names
87 + const allTags = new Set([...Object.keys(v31Ops), ...Object.keys(v3Ops)]);
88 +
89 + for (const tagName of allTags) {
90 + const ops31 = v31Ops[tagName] || [];
91 + const ops3 = v3Ops[tagName] || [];
92 + if (ops31.length === 0 && ops3.length === 0) continue;
93
94 const tagSlug = slugify(tagName);
95 const tagDescription = tagDescriptions[tagName] || `${tagName} API endpoints`;
96
94 - // Generate endpoint table
95 - const tableRows = operations.map(op => {
96 - const url = `/reference/api-reference/${tagSlug}/${op.operationId}`;
97 + // Only generate v3.1 index page if the tag has v3.1 operations
98 + if (ops31.length > 0) {
99 + const v3ByOpId: Record<string, OperationEntry> = {};
100 + for (const op of ops3) {
101 + v3ByOpId[op.operationId] = op;
102 + }
103 +
104 + const endpoints = ops31.map(op => {
105 + const v3Op = v3ByOpId[op.operationId];
106 + return {
107 + method: op.method,
108 + pathV31: op.path,
109 + pathV3: v3Op ? v3Op.path : op.path.replace('/v3.1/', '/v3/'),
110 + summary: op.summary,
111 + href: `/reference/api-reference/${tagSlug}/${op.operationId}`,
112 + };
113 + });
114 +
115 + const content = `---
116 +title: ${tagName}
117 +description: "${tagDescription}"
118 +---
119 +
120 +{/* Auto-generated from OpenAPI spec. Do not edit directly. */}
121 +
122 +${tagDescription}
123 +
124 +## Endpoints
125
98 - return `| \`${op.method} ${op.path}\` | [${op.summary}](${url}) |`;
99 - }).join('\n');
126 +<ApiEndpointsTable endpoints={${JSON.stringify(endpoints)}} />
127 +`;
128
101 - const content = `---
129 + const folderPath = join(outputDir, tagSlug);
130 + mkdirSync(folderPath, { recursive: true });
131 + writeFileSync(join(folderPath, 'index.mdx'), content);
132 + console.log(`Generated: ${tagSlug}/index.mdx`);
133 + }
134 +
135 + // Also generate v3 index page with v3-specific hrefs
136 + if (ops3.length > 0) {
137 + const v3Endpoints = ops3.map(op => ({
138 + method: op.method,
139 + pathV31: op.path.replace('/v3/', '/v3.1/'),
140 + pathV3: op.path,
141 + summary: op.summary,
142 + href: `/reference/v3/api-reference/${tagSlug}/${op.operationId}`,
143 + }));
144 +
145 + const v3Content = `---
146 title: ${tagName}
147 description: "${tagDescription}"
148 ---
@@ -109,17 +153,14 @@ ${tagDescription}
153
154 ## Endpoints
155
112 -| Endpoint | Quick Link |
113 -|----------|------------|
114 -${tableRows}
156 +<ApiEndpointsTable endpoints={${JSON.stringify(v3Endpoints)}} />
157 `;
158
117 - // Create folder and write index.mdx inside
118 - const folderPath = join(outputDir, tagSlug);
119 - mkdirSync(folderPath, { recursive: true });
120 - const filePath = join(folderPath, 'index.mdx');
121 - writeFileSync(filePath, content);
122 - console.log(`Generated: ${tagSlug}/index.mdx`);
159 + const v3FolderPath = join(process.cwd(), 'content/reference/v3/api-reference', tagSlug);
160 + mkdirSync(v3FolderPath, { recursive: true });
161 + writeFileSync(join(v3FolderPath, 'index.mdx'), v3Content);
162 + console.log(`Generated: v3/api-reference/${tagSlug}/index.mdx`);
163 + }
164 }
165
166 console.log('Done generating API index pages');