@composio/core 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/{CustomTool-BMlZfJVz.mjs → CustomTool-B-_VjWpy.mjs} +1 -1
  2. package/dist/{CustomTool-CB5vm1Jc.d.mts → CustomTool-BHOYxLZX.d.mts} +1 -1
  3. package/dist/{FileModifierErrors-BqFmpRsm.mjs → FileModifierErrors-CdGSABoq.mjs} +1 -1
  4. package/dist/{SsrfErrors-C91YhASE.mjs → SsrfErrors-DiQldIdC.mjs} +18 -7
  5. package/dist/{Telemetry-HlftxMx6.mjs → Telemetry-JRJJYS4I.mjs} +2 -2
  6. package/dist/{cancellation-CXpfmiVo.mjs → cancellation-DV8CIi52.mjs} +2 -2
  7. package/dist/{composio-DLGaeN70.d.mts → composio-BTZsFajb.d.mts} +3149 -117
  8. package/dist/{customTool.types-BAmEh3MB.d.mts → customTool.types-D_w21L56.d.mts} +784 -56
  9. package/dist/docs/reference/sdk-reference/typescript/auth-configs.mdx +10 -10
  10. package/dist/docs/reference/sdk-reference/typescript/composio.mdx +7 -3
  11. package/dist/docs/reference/sdk-reference/typescript/connected-accounts.mdx +101 -18
  12. package/dist/docs/reference/sdk-reference/typescript/custom-toolkits.mdx +123 -0
  13. package/dist/docs/reference/sdk-reference/typescript/experimental.mdx +9 -2
  14. package/dist/docs/reference/sdk-reference/typescript/index.mdx +8 -0
  15. package/dist/docs/reference/sdk-reference/typescript/keyring.mdx +56 -0
  16. package/dist/docs/reference/sdk-reference/typescript/logs.mdx +78 -0
  17. package/dist/docs/reference/sdk-reference/typescript/mcp.mdx +15 -15
  18. package/dist/docs/reference/sdk-reference/typescript/meta.json +9 -1
  19. package/dist/docs/reference/sdk-reference/typescript/session-configs.mdx +83 -0
  20. package/dist/docs/reference/sdk-reference/typescript/session-files.mdx +10 -10
  21. package/dist/docs/reference/sdk-reference/typescript/session.mdx +86 -27
  22. package/dist/docs/reference/sdk-reference/typescript/sessions.mdx +26 -6
  23. package/dist/docs/reference/sdk-reference/typescript/toolkits.mdx +149 -12
  24. package/dist/docs/reference/sdk-reference/typescript/tools.mdx +18 -18
  25. package/dist/docs/reference/sdk-reference/typescript/triggers.mdx +25 -25
  26. package/dist/docs/reference/sdk-reference/typescript/usage.mdx +78 -0
  27. package/dist/docs/reference/sdk-reference/typescript/webhook-endpoints.mdx +162 -0
  28. package/dist/docs/reference/sdk-reference/typescript/webhook-subscriptions.mdx +218 -0
  29. package/dist/docs/reference/sdk-reference/typescript/webhooks.mdx +20 -0
  30. package/dist/{errors-BuEKehbI.mjs → errors-Dyiu3ifQ.mjs} +127 -4
  31. package/dist/experimental/index.d.mts +2 -2
  32. package/dist/experimental/index.mjs +1 -1
  33. package/dist/{fileUtils.node-L7XD8UPr.mjs → fileUtils.node-DNLhLg0W.mjs} +4 -4
  34. package/dist/index.d.mts +281 -55
  35. package/dist/index.mjs +3552 -949
  36. package/dist/models/Files.node.mjs +2 -2
  37. package/dist/{sensitiveFileUploadPaths-B6pBt9lO.mjs → sensitiveFileUploadPaths-BlLp-Yo2.mjs} +1 -1
  38. package/dist/{ssrfGuard.node-B9xQB4za.mjs → ssrfGuard.node-BZ270bcu.mjs} +1 -1
  39. package/dist/{types-CxLPO0Xq.d.mts → types-CgRsUGqm.d.mts} +2 -2
  40. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
  41. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
  42. package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
  43. package/dist/utils/modifiers/FileToolModifier.node.mjs +5 -5
  44. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
  45. package/dist/utils/ssrfGuard.node.mjs +1 -1
  46. package/dist/utils/ssrfGuard.workerd.mjs +1 -1
  47. package/package.json +4 -2
  48. package/src/composio.ts +215 -10
  49. package/src/errors/ConnectedAccountsErrors.ts +47 -0
  50. package/src/errors/SDKErrors.ts +52 -0
  51. package/src/errors/ToolRouterErrors.ts +61 -0
  52. package/src/errors/index.ts +3 -0
  53. package/src/index.ts +13 -0
  54. package/src/lib/sessionConfigConflict.ts +43 -0
  55. package/src/lib/toolRouterMcp.ts +132 -0
  56. package/src/lib/toolRouterParams.ts +149 -37
  57. package/src/lib/toolRouterSourceSessionConfig.ts +12 -0
  58. package/src/models/ConnectedAccounts.ts +118 -2
  59. package/src/models/CustomToolkits.ts +169 -0
  60. package/src/models/Experimental.ts +27 -0
  61. package/src/models/Keyring.ts +65 -0
  62. package/src/models/Logs.ts +101 -0
  63. package/src/models/RemoteFile.ts +25 -8
  64. package/src/models/SessionConfigs.ts +117 -0
  65. package/src/models/ToolRouter.ts +61 -17
  66. package/src/models/ToolRouterSession.ts +149 -14
  67. package/src/models/Toolkits.ts +180 -0
  68. package/src/models/Tools.ts +10 -6
  69. package/src/models/Triggers.ts +3 -88
  70. package/src/models/Usage.ts +119 -0
  71. package/src/models/Webhooks.ts +520 -0
  72. package/src/services/pusher/Pusher.ts +17 -6
  73. package/src/types/authConfigs.types.ts +2 -0
  74. package/src/types/connectedAccounts.types.ts +54 -0
  75. package/src/types/customToolkits.types.ts +102 -0
  76. package/src/types/keyring.types.ts +32 -0
  77. package/src/types/logs.types.ts +108 -0
  78. package/src/types/sessionConfigs.types.ts +81 -0
  79. package/src/types/tool.types.ts +2 -0
  80. package/src/types/toolRouter.types.ts +352 -16
  81. package/src/types/toolkit.types.ts +144 -0
  82. package/src/types/usage.types.ts +81 -0
  83. package/src/types/webhooks.types.ts +143 -0
  84. package/src/utils/constants.ts +1 -5
  85. package/src/utils/logger.ts +39 -7
  86. package/src/utils/safePath.ts +172 -0
  87. package/src/utils/sdk.ts +385 -22
  88. package/src/utils/transformers/connectedAccounts.ts +37 -2
  89. package/src/utils/transformers/customToolkits.ts +98 -0
  90. package/src/utils/transformers/keyring.ts +24 -0
  91. package/src/utils/transformers/logs.ts +85 -0
  92. package/src/utils/transformers/sessionConfigs.ts +54 -0
  93. package/src/utils/transformers/toolRouterResponseTransform.ts +6 -0
  94. package/src/utils/transformers/toolkits.ts +106 -3
  95. package/src/utils/transformers/triggers.ts +2 -2
  96. package/src/utils/transformers/usage.ts +77 -0
  97. package/src/utils/transformers/webhooks.ts +139 -0
@@ -19,7 +19,7 @@ const result = await composio.authConfigs.list();
19
19
  Create a new auth config
20
20
 
21
21
  ```typescript
22
- async create(toolkit: string, options?: CreateAuthConfigParams, requestOptions?: ComposioRequestOptions): Promise<CreateAuthConfigResponse>
22
+ async create(toolkit: string, options?: { authScheme: 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'CIMD_OAUTH' | 'S2S_OAUTH2'; credentials: Record<string, string | number | boolean>; isEnabledForToolRouter?: boolean; name?: string; proxyConfig?: { proxyAuthKey?: string; proxyUrl: string }; toolAccessConfig?: { toolsForConnectedAccountCreation?: string[] }; type: 'use_custom_auth' } | { credentials?: objectOutputType<{ scopes: ZodOptional<ZodUnion<...>>; user_scopes: ZodOptional<ZodUnion<...>> }, ZodTypeAny, 'passthrough'>; isEnabledForToolRouter?: boolean; name?: string; toolAccessConfig?: { toolsForConnectedAccountCreation?: string[] }; type: 'use_composio_managed_auth' }, requestOptions?: ComposioRequestOptions): Promise<{ authScheme: string; id: string; isComposioManaged: boolean; toolkit: string }>
23
23
  ```
24
24
 
25
25
  **Parameters**
@@ -27,12 +27,12 @@ async create(toolkit: string, options?: CreateAuthConfigParams, requestOptions?:
27
27
  | Name | Type | Description |
28
28
  |------|------|-------------|
29
29
  | `toolkit` | `string` | Unique identifier of the toolkit |
30
- | `options?` | `CreateAuthConfigParams` | Options for creating a new auth config |
30
+ | `options?` | `\{ authScheme: 'OAUTH2' \| 'OAUTH1' \| 'API_KEY' \| 'BASIC' \| 'BILLCOM_AUTH' \| 'BEARER_TOKEN' \| 'GOOGLE_SERVICE_ACCOUNT' \| 'NO_AUTH' \| 'BASIC_WITH_JWT' \| 'CALCOM_AUTH' \| 'SERVICE_ACCOUNT' \| 'SAML' \| 'DCR_OAUTH' \| 'CIMD_OAUTH' \| 'S2S_OAUTH2'; credentials: Record<string, string \| number \| boolean>; isEnabledForToolRouter?: boolean; name?: string; proxyConfig?: \{ proxyAuthKey?: string; proxyUrl: string \}; toolAccessConfig?: \{ toolsForConnectedAccountCreation?: string[] \}; type: 'use_custom_auth' \} \| \{ credentials?: objectOutputType<\{ scopes: ZodOptional<ZodUnion<...>>; user_scopes: ZodOptional<ZodUnion<...>> \}, ZodTypeAny, 'passthrough'>; isEnabledForToolRouter?: boolean; name?: string; toolAccessConfig?: \{ toolsForConnectedAccountCreation?: string[] \}; type: 'use_composio_managed_auth' \}` | Options for creating a new auth config |
31
31
  | `requestOptions?` | `ComposioRequestOptions` | |
32
32
 
33
33
  **Returns**
34
34
 
35
- `Promise<CreateAuthConfigResponse>` — Created auth config
35
+ `Promise<...>` — Created auth config
36
36
 
37
37
  **Example**
38
38
 
@@ -153,7 +153,7 @@ This method fetches detailed information about a single auth config
153
153
  and transforms the response to the SDK's standardized format.
154
154
 
155
155
  ```typescript
156
- async get(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<AuthConfigRetrieveResponse>
156
+ async get(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<{ authScheme?: 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'CIMD_OAUTH' | 'S2S_OAUTH2'; createdAt?: string; createdBy?: string; credentials?: Record<string, unknown>; expectedInputFields?: unknown[]; id: string; isComposioManaged?: boolean; isEnabledForToolRouter?: boolean; lastUpdatedAt?: string; name: string; noOfConnections: number; restrictToFollowingTools?: string[]; status: 'ENABLED' | 'DISABLED'; toolAccessConfig?: { toolsAvailableForExecution?: string[]; toolsForConnectedAccountCreation?: string[] }; toolkit: { logo: string; slug: string } }>
157
157
  ```
158
158
 
159
159
  **Parameters**
@@ -165,7 +165,7 @@ async get(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<Auth
165
165
 
166
166
  **Returns**
167
167
 
168
- `Promise<AuthConfigRetrieveResponse>` — The auth config details
168
+ `Promise<\{ authScheme?: 'OAUTH2' \| 'OAUTH1' \| 'API_KEY' \| 'BASIC' \| 'BILLCOM_AUTH' \| 'BEARER_TOKEN' \| 'GOOGLE_SERVICE_ACCOUNT' \| 'NO_AUTH' \| 'BASIC_WITH_JWT' \| 'CALCOM_AUTH' \| 'SERVICE_ACCOUNT' \| 'SAML' \| 'DCR_OAUTH' \| 'CIMD_OAUTH' \| 'S2S_OAUTH2'; createdAt?: string; createdBy?: string; credentials?: Record<string, unknown>; expectedInputFields?: unknown[]; id: string; isComposioManaged?: boolean; isEnabledForToolRouter?: boolean; lastUpdatedAt?: string; name: string; noOfConnections: number; restrictToFollowingTools?: string[]; status: 'ENABLED' \| 'DISABLED'; toolAccessConfig?: \{ toolsAvailableForExecution?: string[]; toolsForConnectedAccountCreation?: string[] \}; toolkit: \{ logo: string; slug: string \} \}>` — The auth config details
169
169
 
170
170
  **Example**
171
171
 
@@ -186,19 +186,19 @@ This method retrieves auth configs from the Composio API, transforms them to the
186
186
  and supports filtering by various parameters.
187
187
 
188
188
  ```typescript
189
- async list(query?: AuthConfigListParams, requestOptions?: ComposioRequestOptions): Promise<AuthConfigListResponse>
189
+ async list(query?: { cursor?: string; isComposioManaged?: boolean; limit?: number; search?: string; showDisabled?: boolean; toolkit?: string }, requestOptions?: ComposioRequestOptions): Promise<{ items: { authScheme?: 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'CIMD_OAUTH' | 'S2S_OAUTH2'; createdAt?: string; createdBy?: string; credentials?: Record<string, unknown>; expectedInputFields?: unknown[]; id: string; isComposioManaged?: boolean; isEnabledForToolRouter?: boolean; lastUpdatedAt?: string; name: string; noOfConnections: number; restrictToFollowingTools?: string[]; status: 'ENABLED' | 'DISABLED'; toolAccessConfig?: { toolsAvailableForExecution?: ...[]; toolsForConnectedAccountCreation?: ...[] }; toolkit: { logo: string; slug: string } }[]; nextCursor: string | null; totalPages: number }>
190
190
  ```
191
191
 
192
192
  **Parameters**
193
193
 
194
194
  | Name | Type | Description |
195
195
  |------|------|-------------|
196
- | `query?` | `AuthConfigListParams` | Optional query parameters for filtering auth configs |
196
+ | `query?` | `\{ cursor?: string; isComposioManaged?: boolean; limit?: number; search?: string; showDisabled?: boolean; toolkit?: string \}` | Optional query parameters for filtering auth configs |
197
197
  | `requestOptions?` | `ComposioRequestOptions` | |
198
198
 
199
199
  **Returns**
200
200
 
201
- `Promise<AuthConfigListResponse>` — A paginated list of auth configurations
201
+ `Promise<\{ items: \{ authScheme?: 'OAUTH2' \| 'OAUTH1' \| 'API_KEY' \| 'BASIC' \| 'BILLCOM_AUTH' \| 'BEARER_TOKEN' \| 'GOOGLE_SERVICE_ACCOUNT' \| 'NO_AUTH' \| 'BASIC_WITH_JWT' \| 'CALCOM_AUTH' \| 'SERVICE_ACCOUNT' \| 'SAML' \| 'DCR_OAUTH' \| 'CIMD_OAUTH' \| 'S2S_OAUTH2'; createdAt?: string; createdBy?: string; credentials?: Record<string, unknown>; expectedInputFields?: unknown[]; id: string; isComposioManaged?: boolean; isEnabledForToolRouter?: boolean; lastUpdatedAt?: string; name: string; noOfConnections: number; restrictToFollowingTools?: string[]; status: 'ENABLED' \| 'DISABLED'; toolAccessConfig?: \{ toolsAvailableForExecution?: ...[]; toolsForConnectedAccountCreation?: ...[] \}; toolkit: \{ logo: string; slug: string \} \}[]; nextCursor: string \| null; totalPages: number \}>` — A paginated list of auth configurations
202
202
 
203
203
  **Example**
204
204
 
@@ -234,7 +234,7 @@ scopes, or tool restrictions. The update type (custom or default) determines whi
234
234
  fields can be updated.
235
235
 
236
236
  ```typescript
237
- async update(nanoid: string, data: AuthConfigUpdateParams, requestOptions?: ComposioRequestOptions): Promise<AuthConfigUpdateResponse>
237
+ async update(nanoid: string, data: { credentials?: objectOutputType<{ scopes: ZodOptional<ZodUnion<...>>; user_scopes: ZodOptional<ZodUnion<...>> }, ZodTypeAny, 'passthrough'>; isEnabledForToolRouter?: boolean; restrictToFollowingTools?: string[]; toolAccessConfig?: { toolsAvailableForExecution?: string[]; toolsForConnectedAccountCreation?: string[] }; type: 'custom' } | { isEnabledForToolRouter?: boolean; restrictToFollowingTools?: string[]; scopes?: string; toolAccessConfig?: { toolsAvailableForExecution?: string[]; toolsForConnectedAccountCreation?: string[] }; type: 'default' }, requestOptions?: ComposioRequestOptions): Promise<AuthConfigUpdateResponse>
238
238
  ```
239
239
 
240
240
  **Parameters**
@@ -242,7 +242,7 @@ async update(nanoid: string, data: AuthConfigUpdateParams, requestOptions?: Comp
242
242
  | Name | Type | Description |
243
243
  |------|------|-------------|
244
244
  | `nanoid` | `string` | The unique identifier of the auth config to update |
245
- | `data` | `AuthConfigUpdateParams` | The data to update, which can be either custom or default type |
245
+ | `data` | `\{ credentials?: objectOutputType<\{ scopes: ZodOptional<ZodUnion<...>>; user_scopes: ZodOptional<ZodUnion<...>> \}, ZodTypeAny, 'passthrough'>; isEnabledForToolRouter?: boolean; restrictToFollowingTools?: string[]; toolAccessConfig?: \{ toolsAvailableForExecution?: string[]; toolsForConnectedAccountCreation?: string[] \}; type: 'custom' \} \| \{ isEnabledForToolRouter?: boolean; restrictToFollowingTools?: string[]; scopes?: string; toolAccessConfig?: \{ toolsAvailableForExecution?: string[]; toolsForConnectedAccountCreation?: string[] \}; type: 'default' \}` | The data to update, which can be either custom or default type |
246
246
  | `requestOptions?` | `ComposioRequestOptions` | |
247
247
 
248
248
  **Returns**
@@ -53,17 +53,21 @@ const composio = new Composio({
53
53
  |------|------|-------------|
54
54
  | `authConfigs` | `AuthConfigs` | Manage authentication configurations for toolkits |
55
55
  | `connectedAccounts` | `ConnectedAccounts` | Manage authenticated connections |
56
- | `create` | `(userId: string, config: \{ authConfigs?: Record<string, string>; connectedAccounts?: Record<string, string \| ...[]>; experimental?: \{ assistivePrompt?: \{ userTimezone?: string \}; customToolkits?: CustomToolkit[]; customTools?: CustomTool[] \}; manageConnections?: boolean \| \{ callbackUrl?: string; enable?: boolean; waitForConnections?: boolean \}; mcp?: boolean; multiAccount?: \{ enable: boolean; maxAccountsPerToolkit?: number; requireExplicitSelection?: boolean \}; preload?: \{ tools?: ...[] \| 'all' \}; sandbox?: \{ autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \}; sessionPreset?: 'direct_tools'; tags?: ... \| ... \| ... \| ...[] \| \{ disable?: ...[]; enable?: ...[] \}; toolkits?: string[] \| \{ disable: ...[] \} \| \{ enable: ...[] \}; tools?: Record<string, ...[] \| \{ enable: ... \} \| \{ disable: ... \} \| \{ tags: ... \}>; workbench?: \{ autoOffloadThreshold?: number; enable: boolean; enableProxyExecution?: boolean; sandboxSize?: 'standard' \| 'medium' \| 'large' \| 'xlarge' \} \} & \{ mcp: true \}, requestOptions: ComposioRequestOptions) => Promise<Session>` | Creates a new tool router session for a user. Use `sessionPreset: SessionPreset.DIRECT_TOOLS` when all needed tools should be exposed directly; see `ToolRouterCreateSessionConfig`. |
56
+ | `create` | `(...) => Promise<Session>` | Creates a new tool router session for a user. Use `sessionPreset: SessionPreset.DIRECT_TOOLS` when all needed tools should be exposed directly; see `ToolRouterCreateSessionConfig`. |
57
57
  | `experimental` | `Experimental` | Experimental SDK methods whose shape may change in future releases. Prefer domain-specific mounts (for example `composio.connectedAccounts.updateAcl(...)`) when available; this namespace keeps compatibility aliases while APIs are experimental. Stateless experimental factories (e.g. `experimental_createTool`) stay at the top level. |
58
58
  | `files` | `Files` | Upload and download files |
59
+ | `keyring` | `Keyring` | Public transfer keys of the organization's customer-managed keyring |
60
+ | `logs` | `Logs` | Search and inspect tool-execution logs |
59
61
  | `mcp` | `MCP` | Model Context Protocol server management. |
60
62
  | `provider` | `TProvider` | The tool provider instance used for wrapping tools in framework-specific formats |
63
+ | `sessionConfigs` | `SessionConfigs` | Read the project's saved Session configs. Apply one with `experimental.sessionConfigId` on `sessions.create()` or `session.update()`. Requires Session configs to be enabled for the project. |
61
64
  | `sessions` | `Sessions` | Create and reuse Composio sessions. Prefer `composio.sessions.create(...)` for new code. The top-level `composio.create(...)` method is kept as an alias. |
62
65
  | `toolkits` | `Toolkits` | Retrieve toolkit metadata and authorize user connections |
63
66
  | `toolRouter` | `ToolRouter` | Legacy alias for `composio.sessions`. |
64
67
  | `tools` | `Tools` | List, retrieve, and execute tools |
65
68
  | `triggers` | `Triggers` | Manage webhook triggers and event subscriptions |
66
69
  | `use` | `(id: string, options: \{ customToolkits?: CustomToolkit[]; customTools?: CustomTool[]; mcp: true \}, requestOptions: ComposioRequestOptions) => Promise<Session>` | Use an existing tool router session |
70
+ | `webhooks` | `Webhooks` | Manage the project's webhook subscription (`webhooks.subscriptions`) and inbound per-toolkit webhook endpoints (`webhooks.endpoints`). |
67
71
 
68
72
  ## Methods
69
73
 
@@ -163,12 +167,12 @@ export default {
163
167
  Get the Composio SDK client.
164
168
 
165
169
  ```typescript
166
- getClient(): ComposioClient
170
+ getClient(): Composio
167
171
  ```
168
172
 
169
173
  **Returns**
170
174
 
171
- `ComposioClient` — The Composio API client.
175
+ `Composio` — The Composio API client.
172
176
 
173
177
  ---
174
178
 
@@ -14,6 +14,48 @@ const result = await composio.connectedAccounts.list();
14
14
 
15
15
  ## Methods
16
16
 
17
+ ### completeAuth()
18
+
19
+ Complete a deferred OAuth connection once you have verified the user's
20
+ identity.
21
+
22
+ When your project has an OAuth callback verifier configured, Composio
23
+ does not activate a new OAuth connection by itself: it redirects to your
24
+ verifier with a single-use session URI. After confirming who the user is,
25
+ redeem that session URI here; Composio checks that your project owns the
26
+ pending connection and that `userId` is its owner, completes the token
27
+ exchange, and the connection becomes `ACTIVE`.
28
+
29
+ The session URI is single-use: redeeming it twice, or after it expires,
30
+ fails with a 404 from the API.
31
+
32
+ ```typescript
33
+ async completeAuth(params: { sessionUri: string; userId: string }, requestOptions?: ComposioRequestOptions): Promise<{ connectedAccountId: string; toolkitSlug: string }>
34
+ ```
35
+
36
+ **Parameters**
37
+
38
+ | Name | Type | Description |
39
+ |------|------|-------------|
40
+ | `params` | `\{ sessionUri: string; userId: string \}` | `userId` the connection was initiated for and the verifier's `sessionUri` |
41
+ | `requestOptions?` | `ComposioRequestOptions` | |
42
+
43
+ **Returns**
44
+
45
+ `Promise<\{ connectedAccountId: string; toolkitSlug: string \}>` — The completed connection's ID and toolkit
46
+
47
+ **Example**
48
+
49
+ ```typescript
50
+ // In your verifier route, after authenticating the user:
51
+ const { connectedAccountId, toolkitSlug } = await composio.connectedAccounts.completeAuth({
52
+ userId: 'user_123',
53
+ sessionUri, // the session URI from the verifier redirect
54
+ });
55
+ ```
56
+
57
+ ---
58
+
17
59
  ### delete()
18
60
 
19
61
  Deletes a connected account.
@@ -117,7 +159,7 @@ This method fetches detailed information about a single connected account
117
159
  and transforms the response to the SDK's standardized format.
118
160
 
119
161
  ```typescript
120
- async get(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountRetrieveResponse>
162
+ async get(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<{ alias?: string | null; authConfig: { authScheme?: 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'CIMD_OAUTH' | 'S2S_OAUTH2'; id: string; isComposioManaged: boolean; isDisabled: boolean }; createdAt: string; data?: Record<string, unknown>; experimental?: { accountType?: 'PRIVATE' | 'SHARED'; aclConfigForShared?: { allowAllUsers: boolean; allowedUserIds: string[]; notAllowedUserIds: string[] } }; id: string; isDisabled: boolean; params?: Record<string, unknown>; state?: { authScheme: 'OAUTH1'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'OAUTH2'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'S2S_OAUTH2'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'API_KEY'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BASIC'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BEARER_TOKEN'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'GOOGLE_SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'NO_AUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'CALCOM_AUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BILLCOM_AUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BASIC_WITH_JWT'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'SAML'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'DCR_OAUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> }; status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE' | 'REVOKED'; statusReason: string | null; testRequestEndpoint?: string; toolkit: { slug: string }; updatedAt: string; wordId?: string | null }>
121
163
  ```
122
164
 
123
165
  **Parameters**
@@ -129,7 +171,7 @@ async get(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<Conn
129
171
 
130
172
  **Returns**
131
173
 
132
- `Promise<ConnectedAccountRetrieveResponse>` — The connected account details
174
+ `Promise<\{ alias?: string \| null; authConfig: \{ authScheme?: 'OAUTH2' \| 'OAUTH1' \| 'API_KEY' \| 'BASIC' \| 'BILLCOM_AUTH' \| 'BEARER_TOKEN' \| 'GOOGLE_SERVICE_ACCOUNT' \| 'NO_AUTH' \| 'BASIC_WITH_JWT' \| 'CALCOM_AUTH' \| 'SERVICE_ACCOUNT' \| 'SAML' \| 'DCR_OAUTH' \| 'CIMD_OAUTH' \| 'S2S_OAUTH2'; id: string; isComposioManaged: boolean; isDisabled: boolean \}; createdAt: string; data?: Record<string, unknown>; experimental?: \{ accountType?: 'PRIVATE' \| 'SHARED'; aclConfigForShared?: \{ allowAllUsers: boolean; allowedUserIds: string[]; notAllowedUserIds: string[] \} \}; id: string; isDisabled: boolean; params?: Record<string, unknown>; state?: \{ authScheme: 'OAUTH1'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'OAUTH2'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'S2S_OAUTH2'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'API_KEY'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BASIC'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BEARER_TOKEN'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'GOOGLE_SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'NO_AUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'CALCOM_AUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BILLCOM_AUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BASIC_WITH_JWT'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'SAML'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'DCR_OAUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \}; status: 'INITIALIZING' \| 'INITIATED' \| 'ACTIVE' \| 'FAILED' \| 'EXPIRED' \| 'INACTIVE' \| 'REVOKED'; statusReason: string \| null; testRequestEndpoint?: string; toolkit: \{ slug: string \}; updatedAt: string; wordId?: string \| null \}>` — The connected account details
133
175
 
134
176
  **Example**
135
177
 
@@ -165,7 +207,7 @@ bearer token, basic auth) are unaffected and continue to work on
165
207
  `initiate()`. See https://docs.composio.dev/docs/changelog/2026/04/24
166
208
 
167
209
  ```typescript
168
- async initiate(userId: string, authConfigId: string, options?: CreateConnectedAccountOptions, requestOptions?: ComposioRequestOptions): Promise<ConnectionRequest>
210
+ async initiate(userId: string, authConfigId: string, options?: { alias?: string; allowMultiple?: boolean; callbackUrl?: string; config?: { authScheme: 'OAUTH1'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'OAUTH2'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'S2S_OAUTH2'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'API_KEY'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'BASIC'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'BEARER_TOKEN'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'GOOGLE_SERVICE_ACCOUNT'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'NO_AUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'CALCOM_AUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'BILLCOM_AUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'BASIC_WITH_JWT'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'SERVICE_ACCOUNT'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'SAML'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } | { authScheme: 'DCR_OAUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> | objectOutputType<... & ..., ZodUnknown, 'strip'> } }, requestOptions?: ComposioRequestOptions): Promise<ConnectionRequest>
169
211
  ```
170
212
 
171
213
  **Parameters**
@@ -174,7 +216,7 @@ async initiate(userId: string, authConfigId: string, options?: CreateConnectedAc
174
216
  |------|------|-------------|
175
217
  | `userId` | `string` | User ID of the connected account |
176
218
  | `authConfigId` | `string` | Auth config ID of the connected account |
177
- | `options?` | `CreateConnectedAccountOptions` | Options for creating a new connected account |
219
+ | `options?` | `\{ alias?: string; allowMultiple?: boolean; callbackUrl?: string; config?: \{ authScheme: 'OAUTH1'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'OAUTH2'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'S2S_OAUTH2'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'API_KEY'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'BASIC'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'BEARER_TOKEN'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'GOOGLE_SERVICE_ACCOUNT'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'NO_AUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'CALCOM_AUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'BILLCOM_AUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'BASIC_WITH_JWT'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'SERVICE_ACCOUNT'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'SAML'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \| \{ authScheme: 'DCR_OAUTH'; val: objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \| objectOutputType<... & ..., ZodUnknown, 'strip'> \} \}` | Options for creating a new connected account |
178
220
  | `requestOptions?` | `ComposioRequestOptions` | |
179
221
 
180
222
  **Returns**
@@ -226,7 +268,7 @@ const connectionRequest = await composio.connectedAccounts.initiate(
226
268
  ### link()
227
269
 
228
270
  ```typescript
229
- async link(userId: string, authConfigId: string, options?: CreateConnectedAccountLinkOptions, requestOptions?: ComposioRequestOptions): Promise<ConnectionRequest>
271
+ async link(userId: string, authConfigId: string, options?: { alias?: string; allowMultiple?: boolean; callbackUrl?: string; experimental?: { accountType?: 'PRIVATE' | 'SHARED'; aclConfigForShared?: { allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] } } }, requestOptions?: ComposioRequestOptions): Promise<ConnectionRequest>
230
272
  ```
231
273
 
232
274
  **Parameters**
@@ -235,7 +277,7 @@ async link(userId: string, authConfigId: string, options?: CreateConnectedAccoun
235
277
  |------|------|-------------|
236
278
  | `userId` | `string` | \{string\} - The external user ID to create the connected account for. |
237
279
  | `authConfigId` | `string` | \{string\} - The auth config ID to create the connected account for. |
238
- | `options?` | `CreateConnectedAccountLinkOptions` | \{CreateConnectedAccountLinkOptions\} - Options for creating a new connected account link. |
280
+ | `options?` | `\{ alias?: string; allowMultiple?: boolean; callbackUrl?: string; experimental?: \{ accountType?: 'PRIVATE' \| 'SHARED'; aclConfigForShared?: \{ allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] \} \} \}` | \{CreateConnectedAccountLinkOptions\} - Options for creating a new connected account link. |
239
281
  | `requestOptions?` | `ComposioRequestOptions` | |
240
282
 
241
283
  **Returns**
@@ -275,19 +317,19 @@ Lists all connected accounts based on provided filter criteria.
275
317
  This method retrieves connected accounts from the Composio API with optional filtering.
276
318
 
277
319
  ```typescript
278
- async list(query?: ConnectedAccountListParams, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountListResponse>
320
+ async list(query?: { accountType?: 'PRIVATE' | 'SHARED' | 'ALL'; authConfigIds?: string[] | null; cursor?: string | null; limit?: number | null; orderBy?: 'created_at' | 'updated_at'; statuses?: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE' | 'REVOKED'[] | null; toolkitSlugs?: string[] | null; userIds?: string[] | null }, requestOptions?: ComposioRequestOptions): Promise<{ items: { alias?: string | null; authConfig: { authScheme?: ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ...; id: string; isComposioManaged: boolean; isDisabled: boolean }; createdAt: string; data?: Record<string, unknown>; experimental?: { accountType?: ... | ...; aclConfigForShared?: { allowAllUsers: ...; allowedUserIds: ...; notAllowedUserIds: ... } }; id: string; isDisabled: boolean; params?: Record<string, unknown>; state?: { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... } | { authScheme: ...; val: ... }; status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE' | 'REVOKED'; statusReason: string | null; testRequestEndpoint?: string; toolkit: { slug: string }; updatedAt: string; wordId?: string | null }[]; nextCursor?: string | null; totalPages: number }>
279
321
  ```
280
322
 
281
323
  **Parameters**
282
324
 
283
325
  | Name | Type | Description |
284
326
  |------|------|-------------|
285
- | `query?` | `ConnectedAccountListParams` | Optional query parameters for filtering connected accounts |
327
+ | `query?` | `\{ accountType?: 'PRIVATE' \| 'SHARED' \| 'ALL'; authConfigIds?: string[] \| null; cursor?: string \| null; limit?: number \| null; orderBy?: 'created_at' \| 'updated_at'; statuses?: 'INITIALIZING' \| 'INITIATED' \| 'ACTIVE' \| 'FAILED' \| 'EXPIRED' \| 'INACTIVE' \| 'REVOKED'[] \| null; toolkitSlugs?: string[] \| null; userIds?: string[] \| null \}` | Optional query parameters for filtering connected accounts |
286
328
  | `requestOptions?` | `ComposioRequestOptions` | |
287
329
 
288
330
  **Returns**
289
331
 
290
- `Promise<ConnectedAccountListResponse>` — A paginated list of connected accounts
332
+ `Promise<\{ items: \{ alias?: string \| null; authConfig: \{ authScheme?: ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ... \| ...; id: string; isComposioManaged: boolean; isDisabled: boolean \}; createdAt: string; data?: Record<string, unknown>; experimental?: \{ accountType?: ... \| ...; aclConfigForShared?: \{ allowAllUsers: ...; allowedUserIds: ...; notAllowedUserIds: ... \} \}; id: string; isDisabled: boolean; params?: Record<string, unknown>; state?: \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \} \| \{ authScheme: ...; val: ... \}; status: 'INITIALIZING' \| 'INITIATED' \| 'ACTIVE' \| 'FAILED' \| 'EXPIRED' \| 'INACTIVE' \| 'REVOKED'; statusReason: string \| null; testRequestEndpoint?: string; toolkit: \{ slug: string \}; updatedAt: string; wordId?: string \| null \}[]; nextCursor?: string \| null; totalPages: number \}>` — A paginated list of connected accounts
291
333
 
292
334
  **Example**
293
335
 
@@ -308,7 +350,14 @@ const githubAccounts = await composio.connectedAccounts.list({
308
350
 
309
351
  ---
310
352
 
311
- ### refresh()
353
+ ### refresh() (deprecated)
354
+
355
+ <Callout type="warn" title="Deprecated">
356
+ The `POST /connected_accounts/\{id\}/refresh` endpoint is deprecated by the
357
+ Composio API. Re-initiate authentication instead: `composio.connectedAccounts.link(userId, authConfigId)`
358
+ for a fresh connection, or `session.authorize(toolkit)` from a session. Behaviour is unchanged
359
+ while the endpoint remains available; do not generate new code against `refresh`.
360
+ </Callout>
312
361
 
313
362
  Refreshes a connected account's authentication credentials.
314
363
 
@@ -316,7 +365,7 @@ This method attempts to refresh OAuth tokens or other credentials associated wit
316
365
  the connected account. This is useful when a token has expired or is about to expire.
317
366
 
318
367
  ```typescript
319
- async refresh(nanoid: string, options?: ConnectedAccountRefreshOptions, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountRefreshResponse>
368
+ async refresh(nanoid: string, options?: { redirectUrl?: string; validateCredentials?: boolean }, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountRefreshResponse>
320
369
  ```
321
370
 
322
371
  **Parameters**
@@ -324,7 +373,7 @@ async refresh(nanoid: string, options?: ConnectedAccountRefreshOptions, requestO
324
373
  | Name | Type | Description |
325
374
  |------|------|-------------|
326
375
  | `nanoid` | `string` | The unique identifier of the connected account to refresh |
327
- | `options?` | `ConnectedAccountRefreshOptions` | |
376
+ | `options?` | `\{ redirectUrl?: string; validateCredentials?: boolean \}` | |
328
377
  | `requestOptions?` | `ComposioRequestOptions` | |
329
378
 
330
379
  **Returns**
@@ -340,6 +389,40 @@ const refreshedAccount = await composio.connectedAccounts.refresh('conn_abc123')
340
389
 
341
390
  ---
342
391
 
392
+ ### revoke()
393
+
394
+ Revoke a connected account at the upstream provider.
395
+
396
+ Best-effort upstream revocation of the stored tokens/credentials; on
397
+ success the connection status becomes `REVOKED`. Revoking an already
398
+ revoked connection returns an empty `revokedTokens` list without an
399
+ upstream call.
400
+
401
+ ```typescript
402
+ async revoke(nanoid: string, requestOptions?: ComposioRequestOptions): Promise<{ connectedAccount: { id: string; status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE' | 'REVOKED' }; revokedTokens: 'access_token' | 'refresh_token' | 'credential'[] }>
403
+ ```
404
+
405
+ **Parameters**
406
+
407
+ | Name | Type | Description |
408
+ |------|------|-------------|
409
+ | `nanoid` | `string` | The unique identifier of the connected account to revoke |
410
+ | `requestOptions?` | `ComposioRequestOptions` | |
411
+
412
+ **Returns**
413
+
414
+ `Promise<\{ connectedAccount: \{ id: string; status: 'INITIALIZING' \| 'INITIATED' \| 'ACTIVE' \| 'FAILED' \| 'EXPIRED' \| 'INACTIVE' \| 'REVOKED' \}; revokedTokens: 'access_token' \| 'refresh_token' \| 'credential'[] \}>` — Which tokens were revoked and the resulting status
415
+
416
+ **Example**
417
+
418
+ ```typescript
419
+ const result = await composio.connectedAccounts.revoke('conn_abc123');
420
+ console.log(result.connectedAccount.status); // 'REVOKED'
421
+ console.log(result.revokedTokens); // e.g. ['access_token', 'refresh_token']
422
+ ```
423
+
424
+ ---
425
+
343
426
  ### update()
344
427
 
345
428
  Enable or disable a connected account. Accepts `{ enabled: boolean }`.
@@ -347,7 +430,7 @@ Enable or disable a connected account. Accepts `{ enabled: boolean }`.
347
430
  Use `updateAcl()` for ACL writes on SHARED connections.
348
431
 
349
432
  ```typescript
350
- async update(nanoid: string, params: UpdateConnectedAccountParams, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountUpdateStatusResponse>
433
+ async update(nanoid: string, params: ConnectedAccountUpdateStatusParams, requestOptions?: ComposioRequestOptions): Promise<ConnectedAccountUpdateStatusResponse>
351
434
  ```
352
435
 
353
436
  **Parameters**
@@ -355,7 +438,7 @@ async update(nanoid: string, params: UpdateConnectedAccountParams, requestOption
355
438
  | Name | Type | Description |
356
439
  |------|------|-------------|
357
440
  | `nanoid` | `string` | The unique identifier of the connected account |
358
- | `params` | `UpdateConnectedAccountParams` | The update parameters |
441
+ | `params` | `ConnectedAccountUpdateStatusParams` | The update parameters |
359
442
  | `requestOptions?` | `ComposioRequestOptions` | |
360
443
 
361
444
  **Returns**
@@ -385,7 +468,7 @@ array to clear an allow/deny list. At least one field must be
385
468
  provided.
386
469
 
387
470
  ```typescript
388
- async updateAcl(nanoid: string, params: UpdateConnectedAccountAclParams): Promise<ConnectedAccountPatchResponse>
471
+ async updateAcl(nanoid: string, params: { allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] }): Promise<ConnectedAccountPatchResponse>
389
472
  ```
390
473
 
391
474
  **Parameters**
@@ -393,7 +476,7 @@ async updateAcl(nanoid: string, params: UpdateConnectedAccountAclParams): Promis
393
476
  | Name | Type | Description |
394
477
  |------|------|-------------|
395
478
  | `nanoid` | `string` | The unique identifier of the connected account |
396
- | `params` | `UpdateConnectedAccountAclParams` | The ACL fields to patch |
479
+ | `params` | `\{ allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] \}` | The ACL fields to patch |
397
480
 
398
481
  **Returns**
399
482
 
@@ -461,7 +544,7 @@ This method continuously polls the Composio API to check the status of a connect
461
544
  until it either becomes active, enters a terminal error state, or times out.
462
545
 
463
546
  ```typescript
464
- async waitForConnection(connectedAccountId: string, timeout?: number): Promise<ConnectedAccountRetrieveResponse>
547
+ async waitForConnection(connectedAccountId: string, timeout?: number): Promise<{ alias?: string | null; authConfig: { authScheme?: 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'CIMD_OAUTH' | 'S2S_OAUTH2'; id: string; isComposioManaged: boolean; isDisabled: boolean }; createdAt: string; data?: Record<string, unknown>; experimental?: { accountType?: 'PRIVATE' | 'SHARED'; aclConfigForShared?: { allowAllUsers: boolean; allowedUserIds: string[]; notAllowedUserIds: string[] } }; id: string; isDisabled: boolean; params?: Record<string, unknown>; state?: { authScheme: 'OAUTH1'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'OAUTH2'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'S2S_OAUTH2'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'API_KEY'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BASIC'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BEARER_TOKEN'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'GOOGLE_SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'NO_AUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'CALCOM_AUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BILLCOM_AUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'BASIC_WITH_JWT'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'SAML'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> } | { authScheme: 'DCR_OAUTH'; val: objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> | objectOutputType<..., ..., ...> }; status: 'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE' | 'REVOKED'; statusReason: string | null; testRequestEndpoint?: string; toolkit: { slug: string }; updatedAt: string; wordId?: string | null }>
465
548
  ```
466
549
 
467
550
  **Parameters**
@@ -473,7 +556,7 @@ async waitForConnection(connectedAccountId: string, timeout?: number): Promise<C
473
556
 
474
557
  **Returns**
475
558
 
476
- `Promise<ConnectedAccountRetrieveResponse>` — The finalized connected account data
559
+ `Promise<\{ alias?: string \| null; authConfig: \{ authScheme?: 'OAUTH2' \| 'OAUTH1' \| 'API_KEY' \| 'BASIC' \| 'BILLCOM_AUTH' \| 'BEARER_TOKEN' \| 'GOOGLE_SERVICE_ACCOUNT' \| 'NO_AUTH' \| 'BASIC_WITH_JWT' \| 'CALCOM_AUTH' \| 'SERVICE_ACCOUNT' \| 'SAML' \| 'DCR_OAUTH' \| 'CIMD_OAUTH' \| 'S2S_OAUTH2'; id: string; isComposioManaged: boolean; isDisabled: boolean \}; createdAt: string; data?: Record<string, unknown>; experimental?: \{ accountType?: 'PRIVATE' \| 'SHARED'; aclConfigForShared?: \{ allowAllUsers: boolean; allowedUserIds: string[]; notAllowedUserIds: string[] \} \}; id: string; isDisabled: boolean; params?: Record<string, unknown>; state?: \{ authScheme: 'OAUTH1'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'OAUTH2'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'S2S_OAUTH2'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'API_KEY'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BASIC'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BEARER_TOKEN'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'GOOGLE_SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'NO_AUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'CALCOM_AUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BILLCOM_AUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'BASIC_WITH_JWT'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'SERVICE_ACCOUNT'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'SAML'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \} \| \{ authScheme: 'DCR_OAUTH'; val: objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \| objectOutputType<..., ..., ...> \}; status: 'INITIALIZING' \| 'INITIATED' \| 'ACTIVE' \| 'FAILED' \| 'EXPIRED' \| 'INACTIVE' \| 'REVOKED'; statusReason: string \| null; testRequestEndpoint?: string; toolkit: \{ slug: string \}; updatedAt: string; wordId?: string \| null \}>` — The finalized connected account data
477
560
 
478
561
  **Example**
479
562
 
@@ -0,0 +1,123 @@
1
+ ---
2
+ title: "CustomToolkits"
3
+ description: "`composio.experimental.customToolkits` — toolkits your project registers from its own app or MCP server, with their own auth configs and connected accounts. **Experimental — custom toolkits are in pilot; shape may change.** These live on the Composio platform. They are unrelated to the in-process toolkits built with `experimental_createToolkit()`, which run inside your application."
4
+ ---
5
+
6
+ ## Usage
7
+
8
+ Access this class through the `composio.customToolkits` property:
9
+
10
+ ```typescript
11
+ const composio = new Composio({ apiKey: 'your-api-key' });
12
+ const result = await composio.customToolkits.list();
13
+ ```
14
+
15
+ ## Methods
16
+
17
+ ### delete()
18
+
19
+ Deletes a custom toolkit owned by the project, with its tools, auth
20
+ configs and connected accounts. The credentials behind those connected
21
+ accounts are revoked in background jobs (`revokeJobIds`).
22
+ **Experimental — custom toolkits are in pilot; shape may change.**
23
+
24
+ Composio-managed toolkits cannot be deleted; the API answers 403.
25
+
26
+ ```typescript
27
+ async delete(slug: string, requestOptions?: ComposioRequestOptions): Promise<...>
28
+ ```
29
+
30
+ **Parameters**
31
+
32
+ | Name | Type | Description |
33
+ |------|------|-------------|
34
+ | `slug` | `string` | The custom toolkit slug (`CUSTOM_...`) |
35
+ | `requestOptions?` | `ComposioRequestOptions` | |
36
+
37
+ **Returns**
38
+
39
+ `Promise<...>` — What was deleted
40
+
41
+ **Example**
42
+
43
+ ```typescript
44
+ const result = await composio.experimental.customToolkits.delete('CUSTOM_MY_TOOLKIT');
45
+ console.log(result.connectedAccountsDeleted);
46
+ ```
47
+
48
+ ---
49
+
50
+ ### sync()
51
+
52
+ Re-fetches the tool definitions of a custom toolkit from its remote MCP
53
+ server. Call it when automatic sync fails or the remote tools change.
54
+ **Experimental — custom toolkits are in pilot; shape may change.**
55
+
56
+ ```typescript
57
+ async sync(slug: string, params?: { connectedAccountId?: string }, requestOptions?: ComposioRequestOptions): Promise<{ slug: string; syncedCount: number; version: string }>
58
+ ```
59
+
60
+ **Parameters**
61
+
62
+ | Name | Type | Description |
63
+ |------|------|-------------|
64
+ | `slug` | `string` | The custom toolkit slug (`CUSTOM_...`) |
65
+ | `params?` | `\{ connectedAccountId?: string \}` | Optional connected account to fetch the definitions with |
66
+ | `requestOptions?` | `ComposioRequestOptions` | |
67
+
68
+ **Returns**
69
+
70
+ `Promise<\{ slug: string; syncedCount: number; version: string \}>` — The toolkit version and number of tools synced
71
+
72
+ **Example**
73
+
74
+ ```typescript
75
+ const { version, syncedCount } = await composio.experimental.customToolkits.sync(
76
+ 'CUSTOM_MY_TOOLKIT',
77
+ { connectedAccountId: 'ca_abc123' }
78
+ );
79
+ ```
80
+
81
+ ---
82
+
83
+ ### upsert()
84
+
85
+ Creates a custom toolkit, or updates its display metadata (name, API key
86
+ field copy) when the project already owns a toolkit with this slug.
87
+ **Experimental — custom toolkits are in pilot; shape may change.**
88
+
89
+ `appUrl` and `authSchemes` cannot change on an existing toolkit:
90
+ re-sending them unchanged is a no-op, and changing them fails with a 409.
91
+ Delete and re-register the toolkit instead, which revokes its connections.
92
+
93
+ ```typescript
94
+ async upsert(params: { slug: string; toolkitConfig: { appUrl: string; authSchemes: { mode: 'NO_AUTH' } | { apiKeyField?: { description?: ...; displayName?: ... }; headers: Record<..., ...>; mode: 'API_KEY' } | { discoveryUrl: string; mode: 'DCR_OAUTH' }[]; logoFile?: { content: string; mimeType: 'image/png' | 'image/jpeg' }; name: string } }, requestOptions?: ComposioRequestOptions): Promise<{ slug: string }>
95
+ ```
96
+
97
+ **Parameters**
98
+
99
+ | Name | Type | Description |
100
+ |------|------|-------------|
101
+ | `params` | `\{ slug: string; toolkitConfig: \{ appUrl: string; authSchemes: \{ mode: 'NO_AUTH' \} \| \{ apiKeyField?: \{ description?: ...; displayName?: ... \}; headers: Record<..., ...>; mode: 'API_KEY' \} \| \{ discoveryUrl: string; mode: 'DCR_OAUTH' \}[]; logoFile?: \{ content: string; mimeType: 'image/png' \| 'image/jpeg' \}; name: string \} \}` | The slug and toolkit configuration |
102
+ | `requestOptions?` | `ComposioRequestOptions` | |
103
+
104
+ **Returns**
105
+
106
+ `Promise<\{ slug: string \}>` — The toolkit's slug
107
+
108
+ **Example**
109
+
110
+ ```typescript
111
+ await composio.experimental.customToolkits.upsert({
112
+ slug: 'INTERNAL_API',
113
+ toolkitConfig: {
114
+ name: 'Internal API',
115
+ appUrl: 'https://mcp.internal.example.com/mcp',
116
+ authSchemes: [
117
+ { mode: 'API_KEY', headers: { Authorization: 'Bearer {{generic_api_key}}' } },
118
+ ],
119
+ },
120
+ });
121
+ ```
122
+
123
+ ---
@@ -12,6 +12,13 @@ const composio = new Composio({ apiKey: 'your-api-key' });
12
12
  const result = await composio.experimental.list();
13
13
  ```
14
14
 
15
+ ## Properties
16
+
17
+ | Name | Type | Description |
18
+ |------|------|-------------|
19
+ | `customToolkits` | `CustomToolkits` | Register and manage project-owned custom toolkits (`upsert()` / `sync()` / `delete()`). **Experimental — custom toolkits are in pilot; shape may change.** |
20
+ | `usage` | `Usage` | Project-scoped usage metering (`summary()` / `breakdown()`). **Experimental — shape may change in future releases.** |
21
+
15
22
  ## Methods
16
23
 
17
24
  ### updateAcl() (deprecated)
@@ -39,7 +46,7 @@ Resolution rule (deny wins):
39
46
  4. otherwise → DENY
40
47
 
41
48
  ```typescript
42
- async updateAcl(nanoid: string, params: UpdateConnectedAccountAclParams): Promise<ConnectedAccountPatchResponse>
49
+ async updateAcl(nanoid: string, params: { allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] }): Promise<ConnectedAccountPatchResponse>
43
50
  ```
44
51
 
45
52
  **Parameters**
@@ -47,7 +54,7 @@ async updateAcl(nanoid: string, params: UpdateConnectedAccountAclParams): Promis
47
54
  | Name | Type |
48
55
  |------|------|
49
56
  | `nanoid` | `string` |
50
- | `params` | `UpdateConnectedAccountAclParams` |
57
+ | `params` | `\{ allowAllUsers?: boolean; allowedUserIds?: string[]; notAllowedUserIds?: string[] \}` |
51
58
 
52
59
  **Returns**
53
60
 
@@ -14,6 +14,9 @@ description: "Complete API reference for the Composio TypeScript SDK (@composio/
14
14
  | [`Composio`](/reference/sdk-reference/typescript/composio) | This is the core class for Composio. |
15
15
  | [`AuthConfigs`](/reference/sdk-reference/typescript/auth-configs) | AuthConfigs class |
16
16
  | [`ConnectedAccounts`](/reference/sdk-reference/typescript/connected-accounts) | ConnectedAccounts class |
17
+ | [`CustomToolkits`](/reference/sdk-reference/typescript/custom-toolkits) | `composio.experimental.customToolkits` — toolkits your project registers |
18
+ | [`Keyring`](/reference/sdk-reference/typescript/keyring) | `composio.keyring` — the organization's customer-managed keyring. |
19
+ | [`Logs`](/reference/sdk-reference/typescript/logs) | `composio.logs` — tool-execution logs. |
17
20
  | [`Experimental`](/reference/sdk-reference/typescript/experimental) | Experimental API |
18
21
  | [`MCP`](/reference/sdk-reference/typescript/mcp) | MCP (Model Control Protocol) class |
19
22
  | [`RemoteFile`](/reference/sdk-reference/typescript/remote-file) | Represents a file stored in a tool router session's file mount. |
@@ -23,6 +26,11 @@ description: "Complete API reference for the Composio TypeScript SDK (@composio/
23
26
  | [`Session files`](/reference/sdk-reference/typescript/session-files) | File mount for a Composio session, reached via `session.experimental.files` |
24
27
  | [`Tools`](/reference/sdk-reference/typescript/tools) | This class is used to manage tools in the Composio SDK. |
25
28
  | [`Triggers`](/reference/sdk-reference/typescript/triggers) | Trigger (Instance) class |
29
+ | [`SessionConfigs`](/reference/sdk-reference/typescript/session-configs) | `composio.sessionConfigs` — saved, reusable Session configs. |
30
+ | [`Usage`](/reference/sdk-reference/typescript/usage) | `composio.experimental.usage` — metering for the project the API key |
31
+ | [`WebhookEndpoints`](/reference/sdk-reference/typescript/webhook-endpoints) | `composio.webhooks.endpoints` — inbound webhook endpoints. Each endpoint is |
32
+ | [`Webhooks`](/reference/sdk-reference/typescript/webhooks) | `composio.webhooks` namespace. |
33
+ | [`WebhookSubscriptions`](/reference/sdk-reference/typescript/webhook-subscriptions) | `composio.webhooks.subscriptions` — the project's outbound webhook |
26
34
 
27
35
  ## Quick Start
28
36