1
+---
2
+title: Our next generation SDKs
3
+description: Learn more about Composio's next generation SDKs and how to migrate
4
+---
5
+
6
+In the last few months, we have experienced very rapid growth in usage of our platform. As such, our team has been working hard to radically improve the performance and developer experience of our platform.
7
+
8
+A lot of these changes have happened in the background, but we are excited to finally share our new SDKs with you that complement our new infra.
9
+
10
+The new API features improved usability, enhanced stability, and better scalability. The SDKs built on top of it simplify the developer experience, making it easier than ever to build useful agents.
11
+
12
+## What's new?
13
+
14
+A lot of the changes are on the infra side, but from the SDK point of view, here is what you can expect:
15
+- Faster and more reliable tool execution
16
+- A simpler but more opinionated SDK
17
+- Much more intuitive and consistent naming conventions
18
+- A vastly improved TypeScript SDK that is meaningfully more type-safe and has full feature parity with the Python SDK
19
+
20
+There aren't too many new flashy features here (yet) mainly because we wanted to get the bones right — but we feel we have a solid foundation to ship incredible new experiences on top very quickly.
21
+
22
+## State of the new SDK and what is happening with the old SDKs?
23
+
24
+Currently, the new SDKs are in a preview release. These new SDKs come almost fully formed, we do not expect many breaking changes to them but are releasing them in a preview state to get feedback and make necessary changes before locking them in.
25
+
26
+As we lock the new SDKs in place, we will deprecate support for the old SDKs. They will continue to work for the foreseeable future but are no longer actively maintained. We will continue to push security updates and fix any critical bugs but will not support any new functionality in them.
27
+
28
+We urge you to upgrade to the new SDKs as soon as possible.
29
+
30
+## Nomenclature
31
+
32
+We have updated several key terms in the SDK and API to improve clarity and consistency. The following table summarizes these changes:
33
+
34
+| Previous Term | Current Term | Definition |
35
+|---------------|--------------------|--------------------------------------------------------------------------|
36
+| Actions | Tools | Individual operations or capabilities that can be performed by an LLM agent |
37
+| Apps | Toolkits | A collection of tools grouped under a single application |
38
+| Integration | Auth Config | Configuration containing developer credentials and application-level settings such as scopes and API endpoints. Scoped to a toolkit. |
39
+| Connection | Connected accounts | User-linked accounts associated with a toolkit |
40
+| Entity ID | User ID | The identifier of the user performing the action (UUID or email) |
41
+| Trigger | Trigger | An event that can be subscribed to |
42
+| Toolsets | Providers | LLM or agent framework that can be used with Composio to create agents |
43
+
44
+## Switch to nano IDs from UUIDs
45
+
46
+We have transitioned from UUIDs to nano IDs throughout the platform for the following reasons:
47
+
48
+- **Improved readability**: UUIDs are lengthy and difficult to read
49
+- **Better usability**: Easier to copy with a single double-click
50
+- **Better organization**: Nano IDs allow us to distinguish between different resource types through prefixes
51
+
52
+| Feature | Nano ID Prefix | Example |
53
+|-------------------|----------------|--------------------|
54
+| Connected Account | `ca_` | `ca_8x9w2l3k5m` |
55
+| Auth Config | `ac_` | `ac_1234567890` |
56
+| Trigger | `ti_` | `ti_So9EQf8XnAcy` |
57
+
58
+<Callout type="info">
59
+Nano IDs are short, unique, and prefixed to indicate the resource type.
60
+</Callout>
61
+
62
+## SDK Changes
63
+
64
+Upgrade to the latest SDK version using the appropriate package manager:
65
+
66
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
67
+ <Tab value="Python">
68
+```bash
69
+pip install -U composio
70
+```
71
+ </Tab>
72
+ <Tab value="TypeScript">
73
+```bash
74
+npm install @composio/core
75
+```
76
+ </Tab>
77
+</Tabs>
78
+
79
+Both SDKs now implement proper namespacing for each concept.
80
+
81
+### User ID scoping
82
+
83
+The concept of `entity_id` has been expanded and renamed to `user_id`.
84
+
85
+All operations are now scoped to a user ID, including:
86
+- Fetching tools
87
+- Initiating connections
88
+- Executing tools
89
+- Managing triggers
90
+
91
+This change provides explicit specification of the user for whom the action is being performed. When a user may have multiple accounts (such as work and personal Gmail connections), you can use the more specific connected account ID.
92
+
93
+### Replacing ToolSets with Providers
94
+
95
+We have deprecated "toolsets" in favor of "providers". This change allows Composio to provide deeper standardization for tool implementation across different frameworks.
96
+
97
+Previously, you needed to import and use a framework-specific `ComposioToolSet` class:
98
+
99
+<Tabs groupId="language" items={['Python (previous)', 'TypeScript (previous)']} persist>
100
+ <Tab value="Python (previous)">
101
+```python
102
+from composio_openai import ComposioToolSet, Action, App
103
+from openai import OpenAI
104
+
105
+toolset = ComposioToolSet()
106
+```
107
+ </Tab>
108
+ <Tab value="TypeScript (previous)">
109
+```typescript
110
+import { OpenAIToolSet } from 'composio-core';
111
+
112
+const toolset = new OpenAIToolSet();
113
+```
114
+ </Tab>
115
+</Tabs>
116
+
117
+The SDK structure is now framework-agnostic and includes the OpenAI provider out of the box:
118
+
119
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
120
+ <Tab value="Python (current)">
121
+```python
122
+from composio import Composio
123
+# from composio_langchain import LangchainProvider
124
+
125
+composio = Composio()
126
+# composio = Composio(provider=LangchainProvider())
127
+
128
+tools = composio.tools.get(
129
+ user_id="0001",
130
+ tools=["LINEAR_CREATE_LINEAR_ISSUE", "GITHUB_CREATE_COMMIT"]
131
+)
132
+# tools returned is formatted for the provider. by default, OpenAI.
133
+```
134
+ </Tab>
135
+ <Tab value="TypeScript (current)">
136
+```typescript
137
+import { Composio } from '@composio/core';
138
+// import { VercelProvider } from '@composio/vercel';
139
+
140
+const composio = new Composio({
141
+ // provider: new VercelProvider(),
142
+});
143
+// Can specify other providers too, like OpenAI, Anthropic, Vercel AI SDK.
144
+
145
+const tools = await composio.tools.get('user@example.com', {
146
+ tools: ['LINEAR_CREATE_LINEAR_ISSUE', 'GITHUB_CREATE_COMMIT'],
147
+});
148
+// tools returned is formatted for the provider. by default, OpenAI.
149
+```
150
+ </Tab>
151
+</Tabs>
152
+
153
+You can now use the same tools across any framework with our unified interface, or create custom toolsets for frameworks we don't yet support.
154
+
155
+Read more about [providers in our documentation](/docs/providers) and explore the [complete list of available providers](/providers/openai).
156
+
157
+### Fetching and filtering tools
158
+
159
+Previously, you could filter tools by:
160
+- Apps
161
+- Action names (tool names)
162
+- Tags
163
+
164
+You could also specify an `important` flag to retrieve the most important tools:
165
+
166
+<Tabs groupId="language" items={['Python (previous)', 'TypeScript (previous)']} persist>
167
+ <Tab value="Python (previous)">
168
+```python
169
+from composio_openai import ComposioToolSet, Action, App
170
+from openai import OpenAI
171
+
172
+toolset = ComposioToolSet()
173
+client = OpenAI()
174
+
175
+tools = toolset.get_tools(
176
+ actions=[Action.GITHUB_GET_THE_AUTHENTICATED_USER], check_connected_accounts=True
177
+)
178
+
179
+tools = toolset.get_tools(apps=[App.GITHUB, App.LINEAR, App.SLACK], check_connected_accounts=True)
180
+```
181
+ </Tab>
182
+ <Tab value="TypeScript (previous)">
183
+```typescript
184
+import { OpenAIToolSet } from 'composio-core';
185
+
186
+const toolset = new OpenAIToolSet();
187
+
188
+const tools_1 = await toolset.getTools({ apps: ['GITHUB'] });
189
+const tools_2 = await toolset.getTools({
190
+ actions: ['GITHUB_GET_THE_AUTHENTICATED_USER', 'LINEAR_CREATE_LINEAR_ISSUE'],
191
+});
192
+```
193
+ </Tab>
194
+</Tabs>
195
+
196
+You can now filter tools by:
197
+- Toolkits
198
+- Tool slugs
199
+- Limit parameter
200
+- Search query
201
+
202
+The `important` flag has been removed. Instead, tools are returned in order of importance by default:
203
+
204
+<Callout type="info">
205
+Since `user_id` is now explicitly required, the `check_connected_accounts` flag is no longer necessary.
206
+</Callout>
207
+
208
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
209
+ <Tab value="Python (current)">
210
+```python
211
+from composio import Composio
212
+
213
+composio = Composio()
214
+
215
+user_id = "user@acme.org"
216
+
217
+tools_1 = composio.tools.get(user_id=user_id, toolkits=["GITHUB", "LINEAR"])
218
+
219
+tools_2 = composio.tools.get(user_id=user_id, toolkits=["SLACK"], limit=5) # Default limit=20
220
+
221
+tools_3 = composio.tools.get(
222
+ user_id=user_id,
223
+ tools=["GITHUB_CREATE_AN_ISSUE", "GITHUB_CREATE_AN_ISSUE_COMMENT", "GITHUB_CREATE_A_COMMIT"],
224
+)
225
+
226
+tools_4 = composio.tools.get(user_id="john", search="hackernews posts")
227
+```
228
+ </Tab>
229
+ <Tab value="TypeScript (current)">
230
+```typescript
231
+import { Composio } from '@composio/core';
232
+
233
+const userId = 'user@acme.org';
234
+
235
+const composio = new Composio();
236
+
237
+const tools_1 = await composio.tools.get(userId, {
238
+ toolkits: ['GITHUB', 'LINEAR'],
239
+});
240
+
241
+const tools_2 = await composio.tools.get(userId, {
242
+ toolkits: ['GITHUB'],
243
+ limit: 5, // Default limit=20
244
+});
245
+
246
+const tools_3 = await composio.tools.get(userId, {
247
+ tools: ['GITHUB_CREATE_AN_ISSUE', 'GITHUB_CREATE_AN_ISSUE_COMMENT', 'GITHUB_CREATE_A_COMMIT'],
248
+});
249
+
250
+const tools_4 = await composio.tools.get(userId, {
251
+ search: 'hackernews posts',
252
+});
253
+```
254
+ </Tab>
255
+</Tabs>
256
+
257
+### Fetching raw tool data
258
+
259
+To examine the raw schema definition of a tool for understanding input/output parameters or building custom logic around tool definitions, use the following methods:
260
+
261
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
262
+ <Tab value="Python (current)">
263
+```python
264
+from composio import Composio
265
+
266
+composio = Composio()
267
+
268
+tool = composio.tools.get_raw_composio_tool_by_slug("HACKERNEWS_GET_LATEST_POSTS")
269
+
270
+print(tool.model_dump_json())
271
+```
272
+ </Tab>
273
+ <Tab value="TypeScript (current)">
274
+```typescript
275
+import { Composio } from '@composio/core';
276
+
277
+const composio = new Composio();
278
+
279
+const tool = await composio.tools.getRawComposioToolBySlug('GITHUB_GET_OCTOCAT');
280
+
281
+console.log(JSON.stringify(tool, null, 2));
282
+```
283
+ </Tab>
284
+</Tabs>
285
+
286
+### Executing tools
287
+
288
+Tool execution remains largely unchanged, with `user_id` now explicitly required.
289
+
290
+For agentic frameworks, the tool object returned from `tools.get` is now the respective framework's native tool object. Tool call execution is handled by the agentic framework itself.
291
+
292
+<Callout type="info">
293
+For non-agentic frameworks, Composio provides a helper function to execute tool calls.
294
+</Callout>
295
+
296
+<Tabs groupId="language" items={['Python v3', 'TypeScript v3']} persist>
297
+ <Tab value="Python v3">
298
+```python
299
+from composio import Composio
300
+from openai import OpenAI
301
+
302
+openai_client = OpenAI()
303
+composio = Composio()
304
+
305
+tools = composio.tools.get(user_id="user@acme.com", tools=["GITHUB_GET_THE_ZEN_OF_GITHUB"])
306
+response = openai_client.chat.completions.create(
307
+ model="gpt-4.1",
308
+ messages=[{"role": "user", "content": "gimme some zen."}],
309
+ tools=tools,
310
+)
311
+
312
+result = composio.provider.handle_tool_calls(user_id="user@acme.com", response=response)
313
+print(result)
314
+```
315
+ </Tab>
316
+ <Tab value="TypeScript v3">
317
+```typescript
318
+import { Composio } from '@composio/core';
319
+import { AnthropicProvider } from '@composio/anthropic';
320
+import Anthropic from '@anthropic-ai/sdk';
321
+
322
+const anthropic = new Anthropic();
323
+const composio = new Composio({
324
+ provider: new AnthropicProvider(),
325
+});
326
+
327
+const userId = 'user@example.com';
328
+const tools = await composio.tools.get(userId, {
329
+ toolkits: ['GMAIL'],
330
+});
331
+
332
+const msg = await anthropic.messages.create({
333
+ model: 'claude-3-7-sonnet-latest',
334
+ tools: tools,
335
+ messages: [
336
+ {
337
+ role: 'user',
338
+ content: "Say hi to 'soham@composio.dev'",
339
+ },
340
+ ],
341
+ max_tokens: 1024,
342
+});
343
+
344
+const result = await composio.provider.handleToolCalls(userId, msg);
345
+console.log('Tool results:', result);
346
+```
347
+ </Tab>
348
+</Tabs>
349
+
350
+For more information on executing tools for different frameworks, see [Replacing ToolSets with Providers](#replacing-toolsets-with-providers).
351
+
352
+### Tool Modifiers (formerly Tool Processors)
353
+
354
+Tool processors have been renamed to *tool modifiers* and now provide an improved developer experience. The implementation is now available in TypeScript too! (previously Python-only).
355
+
356
+```python title="Python (previous)"
357
+from composio_openai import ComposioToolSet, Action
358
+
359
+toolset = ComposioToolSet()
360
+
361
+
362
+def my_schema_processor(schema: dict) -> dict: ...
363
+def my_preprocessor(inputs: dict) -> dict: ...
364
+def my_postprocessor(result: dict) -> dict: ...
365
+
366
+
367
+# Get tools with the modified schema
368
+processed_tools = toolset.get_tools(
369
+ actions=[Action.GMAIL_SEND_EMAIL],
370
+ processors={
371
+ # Applied BEFORE the LLM sees the schema
372
+ "schema": {Action.SOME_ACTION: my_schema_processor},
373
+ # Applied BEFORE the tool executes
374
+ "pre": {Action.SOME_ACTION: my_preprocessor},
375
+ # Applied AFTER the tool executes, BEFORE the result is returned
376
+ "post": {Action.SOME_ACTION: my_postprocessor},
377
+ },
378
+)
379
+```
380
+
381
+| Previous | Current |
382
+|-------------------|-------------------------|
383
+| `pre` processor | `beforeExecute` modifier |
384
+| `post` processor | `afterExecute` modifier |
385
+| `schema` processor| `schema` modifier |
386
+
387
+The modifiers now leverage language-specific features to provide a more natural developer experience.
388
+
389
+While tool processors could previously be applied during SDK initialization, tool fetching, and tool execution, we have restructured them as follows:
390
+- **Chat Completion providers**: Modifiers are specified and applied during tool execution
391
+- **Agentic frameworks**: Modifiers are specified and applied during tool fetching
392
+
393
+#### Schema Modifiers
394
+
395
+The following example demonstrates schema modifier usage, applicable across all providers:
396
+
397
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
398
+ <Tab value="Python (current)">
399
+```python
400
+from composio import Composio, schema_modifier
401
+from composio.types import Tool
402
+
403
+user_id = "your@email.com"
404
+
405
+@schema_modifier(tools=["HACKERNEWS_GET_LATEST_POSTS"])
406
+def modify_schema(
407
+ tool: str,
408
+ toolkit: str,
409
+ schema: Tool,
410
+) -> Tool:
411
+ _ = schema.input_parameters["properties"].pop("page", None)
412
+ schema.input_parameters["required"] = ["size"]
413
+ return schema
414
+
415
+tools = composio.tools.get(
416
+ user_id=user_id,
417
+ tools=["HACKERNEWS_GET_LATEST_POSTS", "HACKERNEWS_GET_USER"],
418
+ modifiers=[
419
+ modify_schema,
420
+ ]
421
+)
422
+```
423
+ </Tab>
424
+ <Tab value="TypeScript (current)">
425
+```typescript
426
+import { Composio } from '@composio/core';
427
+import { OpenAI } from 'openai';
428
+
429
+const userId = 'your@email.com';
430
+const composio = new Composio();
431
+
432
+// Schema modifier to delete the `page` argument from the `HACKERNEWS_GET_LATEST_POSTS` tool
433
+const tools = await composio.tools.get(
434
+ userId,
435
+ {
436
+ tools: ['HACKERNEWS_GET_LATEST_POSTS', 'HACKERNEWS_GET_USER'],
437
+ },
438
+ {
439
+ modifySchema: ({ toolSlug, toolkitSlug, schema }) => {
440
+ if (toolSlug === 'HACKERNEWS_GET_LATEST_POSTS') {
441
+ const { inputParameters } = schema;
442
+ if (inputParameters?.properties) {
443
+ delete inputParameters.properties['page'];
444
+ }
445
+ inputParameters.required = ['size'];
446
+ }
447
+ return schema;
448
+ },
449
+ }
450
+);
451
+
452
+console.log(JSON.stringify(tools, null, 2));
453
+```
454
+ </Tab>
455
+</Tabs>
456
+
457
+#### Before Modifiers
458
+
459
+The following example shows creating and using a before modifier for a Chat Completion provider. For agentic frameworks, view the [complete before modifier documentation](/docs/modify-tool-behavior/before-execution-modifiers):
460
+
461
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
462
+ <Tab value="Python (current)">
463
+```python
464
+@before_execute(tools=["HACKERNEWS_GET_LATEST_POSTS"])
465
+def before_execute_modifier(
466
+ tool: str,
467
+ toolkit: str,
468
+ params: ToolExecuteParams,
469
+) -> ToolExecuteParams:
470
+ params["arguments"]["size"] = 1
471
+ return params
472
+
473
+
474
+# Get tools
475
+tools = composio.tools.get(user_id=user_id, slug="HACKERNEWS_GET_LATEST_POSTS")
476
+```
477
+ </Tab>
478
+ <Tab value="TypeScript (current)">
479
+```typescript
480
+const result_1 = await composio.tools.execute(
481
+ 'HACKERNEWS_GET_LATEST_POSTS',
482
+ {
483
+ userId,
484
+ arguments: JSON.parse(toolArgs),
485
+ },
486
+ {
487
+ beforeExecute: ({ toolSlug, toolkitSlug, params }) => {
488
+ if (toolSlug === 'HACKERNEWS_GET_LATEST_POSTS') {
489
+ params.arguments.size = 1;
490
+ }
491
+ console.log(params);
492
+ return params;
493
+ },
494
+ }
495
+);
496
+```
497
+ </Tab>
498
+</Tabs>
499
+
500
+#### After Modifiers
501
+
502
+The following example shows creating and using an after modifier for a Chat Completion provider. For agentic frameworks, view the [complete after modifier documentation](/docs/modify-tool-behavior/after-execution-modifiers):
503
+
504
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
505
+ <Tab value="Python (current)">
506
+```python
507
+@after_execute(tools=["HACKERNEWS_GET_USER"])
508
+def after_execute_modifier(
509
+ tool: str,
510
+ toolkit: str,
511
+ response: ToolExecutionResponse,
512
+) -> ToolExecutionResponse:
513
+ return {
514
+ **response,
515
+ "data": {
516
+ "karma": response["data"]["karma"],
517
+ },
518
+ }
519
+
520
+tools = composio.tools.get(user_id=user_id, slug="HACKERNEWS_GET_USER")
521
+```
522
+ </Tab>
523
+ <Tab value="TypeScript (current)">
524
+```typescript
525
+const result_2 = await composio.tools.execute(
526
+ 'HACKERNEWS_GET_USER',
527
+ {
528
+ userId,
529
+ arguments: JSON.parse(toolArgs),
530
+ },
531
+ {
532
+ afterExecute: ({ toolSlug, toolkitSlug, result }) => {
533
+ if (toolSlug === 'HACKERNEWS_GET_USER') {
534
+ const { data } = result;
535
+ const { karma } = data.response_data as { karma: number };
536
+ return {
537
+ ...result,
538
+ data: { karma },
539
+ };
540
+ }
541
+ return result;
542
+ },
543
+ }
544
+);
545
+```
546
+ </Tab>
547
+</Tabs>
548
+
549
+### Custom Tools
550
+
551
+The SDK continues to support custom tools. [Creating tools from your methods](/docs/custom-tools#creating-a-custom-tool) remains possible. We recommend reviewing the [detailed custom tools documentation](/docs/custom-tools#creating-a-custom-tool) for more information.
552
+
553
+Due to changes in the SDK architecture, creating custom tools that use Composio's managed authentication has been modified. In the previous SDK, you could create a custom tool as follows:
554
+
555
+<Tabs groupId="language" items={['Python (previous)', 'TypeScript (previous)']} persist>
556
+ <Tab value="Python (previous)">
557
+```python
558
+# Python Example using execute_request
559
+from composio import action, ComposioToolSet
560
+import typing as t
561
+
562
+toolset = ComposioToolSet()
563
+
564
+@action(toolname="github") # Associate with GitHub app for auth
565
+def get_github_repo_topics(
566
+ owner: t.Annotated[str, "Repository owner username"],
567
+ repo: t.Annotated[str, "Repository name"],
568
+ execute_request: t.Callable # Injected by Composio
569
+) -> dict:
570
+ """Gets the topics associated with a specific GitHub repository."""
571
+ response_data = execute_request(
572
+ endpoint=f"/repos/{owner}/{repo}/topics", # API path relative to base URL
573
+ method="GET"
574
+ )
575
+ if isinstance(response_data, dict):
576
+ return {"topics": response_data.get("names", [])}
577
+```
578
+ </Tab>
579
+ <Tab value="TypeScript (previous)">
580
+```typescript
581
+import { OpenAIToolSet, type ActionExecutionResDto } from "composio-core";
582
+import { z } from "zod";
583
+
584
+const toolset = new OpenAIToolSet();
585
+
586
+await toolset.createAction({
587
+ actionName: "get_github_repo_topics",
588
+ toolName: "github",
589
+ description: "Gets the topics associated with a specific GitHub repository.",
590
+ inputParams: z.object({
591
+ owner: z.string().describe("Repository owner username"),
592
+ repo: z.string().describe("Repository name"),
593
+ }),
594
+ callback: async (inputParams, _authCredentials, executeRequest): Promise<ActionExecutionResDto> => {
595
+ const { owner, repo } = inputParams as { owner: string, repo: string };
596
+ const response = await executeRequest({
597
+ endpoint: `/repos/${owner}/${repo}/topics`,
598
+ method: "GET",
599
+ parameters: [],
600
+ });
601
+
602
+ const topics = (response as any)?.names ?? [];
603
+ return { successful: true, data: { topics: topics } };
604
+ }
605
+});
606
+```
607
+ </Tab>
608
+</Tabs>
609
+
610
+The *execute tool request* method handles injection of the appropriate base URL and authentication credentials for the tool:
611
+
612
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
613
+ <Tab value="Python (current)">
614
+```python
615
+from pydantic import BaseModel, Field
616
+from composio import Composio
617
+from composio.core.models.custom_tools import ExecuteRequestFn
618
+
619
+
620
+composio = Composio()
621
+
622
+class GetIssueInfoInput(BaseModel):
623
+ issue_number: int = Field(
624
+ ...,
625
+ description="The number of the issue to get information about",
626
+ )
627
+
628
+# function name will be used as slug
629
+@composio.tools.custom_tool(toolkit="github")
630
+def get_issue_info(
631
+ request: GetIssueInfoInput,
632
+ execute_request: ExecuteRequestFn,
633
+ auth_credentials: dict,
634
+) -> dict:
635
+ """Get information about a GitHub issue."""
636
+ response = execute_request(
637
+ endpoint=f"/repos/composiohq/composio/issues/{request.issue_number}",
638
+ method="GET",
639
+ parameters=[
640
+ {
641
+ "name": "Accept",
642
+ "value": "application/vnd.github.v3+json",
643
+ "type": "header",
644
+ },
645
+ {
646
+ "name": "Authorization",
647
+ "value": f"Bearer {auth_credentials['access_token']}",
648
+ "type": "header",
649
+ },
650
+ ],
651
+ )
652
+ return {"data": response.data}
653
+```
654
+ </Tab>
655
+ <Tab value="TypeScript (current)">
656
+```typescript
657
+import { Composio } from "@composio/core";
658
+import z from "zod";
659
+
660
+const composio = new Composio();
661
+
662
+const tool = await composio.tools.createCustomTool({
663
+ slug: 'GITHUB_STAR_COMPOSIOHQ_REPOSITORY',
664
+ name: 'Github star composio repositories',
665
+ toolkitSlug: 'github',
666
+ description: 'Star any specificied repo of `composiohq` user',
667
+ inputParams: z.object({
668
+ repository: z.string().describe('The repository to star'),
669
+ page: z.number().optional().describe('Pagination page number'),
670
+ customHeader: z.string().optional().describe('Custom header'),
671
+ }),
672
+ execute: async (input, connectionConfig, executeToolRequest) => {
673
+ const result = await executeToolRequest({
674
+ endpoint: `/user/starred/composiohq/${input.repository}`,
675
+ method: 'PUT',
676
+ body: {},
677
+ parameters: [
678
+ {
679
+ name: 'page',
680
+ value: input.page?.toString() || '1',
681
+ in: 'query',
682
+ },
683
+ {
684
+ name: 'x-custom-header',
685
+ value: input.customHeader || 'default-value',
686
+ in: 'header',
687
+ },
688
+ ],
689
+ });
690
+ return result;
691
+ },
692
+ });
693
+```
694
+ </Tab>
695
+</Tabs>
696
+
697
+For more information, including executing custom tools and defining custom headers and query parameters, refer to the [Custom Tools](/docs/custom-tools) documentation.
698
+
699
+### Auth configs (formerly integrations)
700
+
701
+Integrations are now called *auth configs*. While the terminology has changed, the underlying concept remains the same.
702
+
703
+Auth configs store the configuration required for authentication with a given toolkit, including OAuth developer credentials, configurable base URLs, and scopes.
704
+
705
+Auth configs now use nano IDs instead of UUIDs:
706
+
707
+| Previous (UUID) Example | Current (Nano ID) Example |
708
+| :----------------------------------- | :------------------------ |
709
+| `b7a9c1e2-3f4d-4a6b-8c2e-1d2f3a4b5c6d` | `ac_8x9w2l3k5m` |
710
+
711
+We recommend storing auth config nano IDs in your database for connecting users to the appropriate auth configuration.
712
+
713
+For most use cases, you will create auth configs through the dashboard, and this process remains unchanged. Read more about [creating auth configs](/docs/authenticating-tools#creating-an-auth-config) and [customizing auth configs](/docs/custom-auth-configs).
714
+
715
+Creating auth configs programmatically in the previous SDK:
716
+
717
+<Tabs groupId="language" items={['Python (previous)', 'TypeScript (previous)']} persist>
718
+ <Tab value="Python (previous)">
719
+```python
720
+from composio_openai import App, ComposioToolSet
721
+
722
+toolset = ComposioToolSet()
723
+
724
+integration = toolset.create_integration(
725
+ app=App.GITHUB,
726
+ auth_mode="OAUTH2",
727
+ use_composio_oauth_app=True,
728
+ # For use_composio_oauth_app=False, you can provide your own OAuth app credentials here
729
+ # auth_config={
730
+ # "client_id": "123456",
731
+ # "client_secret": "123456"
732
+ # }
733
+
734
+)
735
+print(integration.id)
736
+```
737
+ </Tab>
738
+ <Tab value="TypeScript (previous)">
739
+```typescript
740
+import { OpenAIToolSet } from "composio-core";
741
+
742
+const composioToolset = new OpenAIToolSet();
743
+
744
+const integration = await composioToolset.integrations.create({
745
+ name: "gmail_integration",
746
+ appUniqueKey: "gmail",
747
+ forceNewIntegration: true,
748
+ useComposioAuth: false,
749
+ // For useComposioAuth: false, you can provide your own OAuth app credentials here
750
+ // authScheme: "OAUTH2",
751
+ // authConfig: {
752
+ // clientId: "123456",
753
+ // clientSecret: "123456"
754
+ // }
755
+})
756
+
757
+console.log(integration.id)
758
+```
759
+ </Tab>
760
+</Tabs>
761
+
762
+Creating auth configs programmatically in the current SDK:
763
+
764
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
765
+ <Tab value="Python (current)">
766
+```python
767
+from composio import Composio
768
+
769
+composio = Composio()
770
+
771
+# Use composio managed auth
772
+auth_config = composio.auth_configs.create(
773
+ toolkit="notion",
774
+ options={
775
+ "type": "use_composio_managed_auth",
776
+ # "type": "use_custom_auth",
777
+ # "auth_scheme": "OAUTH2",
778
+ # "credentials": {
779
+ # "client_id": "1234567890",
780
+ # "client_secret": "1234567890",
781
+ # "oauth_redirect_uri": "https://backend.composio.dev/api/v3/toolkits/auth/callback",
782
+ # },
783
+ },
784
+)
785
+print(auth_config)
786
+```
787
+ </Tab>
788
+ <Tab value="TypeScript (current)">
789
+```typescript
790
+import { Composio } from '@composio/core';
791
+
792
+const composio = new Composio();
793
+
794
+const authConfig = await composio.authConfigs.create('LINEAR', {
795
+ name: 'Linear',
796
+ type: 'use_composio_managed_auth',
797
+ // type: "use_custom_auth",
798
+ // credentials: {
799
+ // client_id: "1234567890",
800
+ // client_secret: "1234567890",
801
+ // oauth_redirect_uri: "https://backend.composio.dev/api/v3/toolkits/auth/callback",
802
+ // },
803
+});
804
+
805
+console.log(authConfig);
806
+```
807
+ </Tab>
808
+</Tabs>
809
+
810
+For using custom authentication credentials, refer to the [Programmatic Auth Configs](/docs/programmatic-auth-configs) documentation.
811
+
812
+<Callout type="info">
813
+The callback URL for creating custom OAuth configs is now `https://backend.composio.dev/api/v3/toolkits/auth/callback`. The previous URL was `https://backend.composio.dev/api/v1/auth-apps/add`.
814
+</Callout>
815
+
816
+### Connected accounts / User IDs
817
+
818
+The primary change in connected accounts and user IDs is that user IDs are now a more prominent concept compared to entities in previous versions.
819
+
820
+We have simplified the process of connecting a user to a toolkit. Instead of multiple methods and parameters for initiating a connection, both the SDK and API now require only a `user_id` and `auth_config_id` to initiate a connection.
821
+
822
+This approach is more explicit and works well with the ability for developers to have multiple auth configs for a given toolkit.
823
+
824
+Connected accounts now use nano IDs instead of UUIDs:
825
+
826
+| Previous (UUID) Example | Current (Nano ID) Example |
827
+| :----------------------------------- | :------------------------ |
828
+| `b7a9c1e2-3f4d-4a6b-8c2e-1d2f3a4b5c6d` | `ca_8x9w2l3k5m` |
829
+
830
+Previously, you might have initiated a connection like this:
831
+
832
+<Tabs groupId="language" items={['Python (previous)', 'TypeScript (previous)']} persist>
833
+ <Tab value="Python (previous)">
834
+```python
835
+from composio_openai import ComposioToolSet
836
+
837
+toolset = ComposioToolSet()
838
+user_id = "your_user_unique_id"
839
+google_integration_id = "0000-0000"
840
+
841
+entity = toolset.get_entity(id=user_id)
842
+
843
+try:
844
+ print(f"Initiating OAuth connection for entity {entity.id}...")
845
+ connection_request = toolset.initiate_connection(
846
+ integration_id=google_integration_id,
847
+ entity_id=user_id,
848
+ # Optionally add: redirect_url="https://yourapp.com/final-destination"
849
+ # if you want user sent somewhere specific *after* Composio finishes.
850
+ )
851
+
852
+ # Check if a redirect URL was provided (expected for OAuth)
853
+ if connection_request.redirectUrl:
854
+ print(f"Received redirect URL: {connection_request.redirectUrl}")
855
+ else:
856
+ print("Error: Expected a redirectUrl for OAuth flow but didn't receive one.")
857
+
858
+
859
+except Exception as e:
860
+ print(f"Error initiating connection: {e}")
861
+```
862
+ </Tab>
863
+ <Tab value="TypeScript (previous)">
864
+```typescript
865
+import { OpenAIToolSet } from "composio-core";
866
+
867
+const toolset = new OpenAIToolSet();
868
+const userId = "your_user_unique_id";
869
+const googleIntegrationId = "0000-0000";
870
+
871
+console.log(`Initiating OAuth connection for entity ${userId}...`);
872
+const connectionRequest = await toolset.connectedAccounts.initiate({
873
+ integrationId: googleIntegrationId,
874
+ entityId: userId,
875
+ // Optionally add: redirectUri: "https://yourapp.com/final-destination"
876
+ // if you want user sent somewhere specific *after* Composio finishes.
877
+});
878
+
879
+// Check if a redirect URL was provided (expected for OAuth)
880
+if (connectionRequest?.redirectUrl) {
881
+ console.log(`Received redirect URL: ${connectionRequest.redirectUrl}`);
882
+ // Proceed to Step 2: Redirect the user
883
+ // Return or pass connectionRequest to the next stage
884
+} else {
885
+ console.error("Error: Expected a redirectUrl for OAuth flow but didn't receive one.");
886
+}
887
+```
888
+ </Tab>
889
+</Tabs>
890
+
891
+The current process for initiating a connection is as follows:
892
+
893
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
894
+ <Tab value="Python (current)">
895
+```python
896
+from composio import Composio
897
+
898
+linear_auth_config_id = "ac_1234"
899
+user_id = "user@email.com"
900
+composio = Composio()
901
+
902
+# Create a new connected account
903
+connection_request = composio.connected_accounts.initiate(
904
+ user_id=user_id,
905
+ auth_config_id=linear_auth_config_id,
906
+)
907
+print(connection_request.redirect_url)
908
+
909
+# Wait for the connection to be established
910
+connected_account = connection_request.wait_for_connection()
911
+print(connected_account)
912
+```
913
+ </Tab>
914
+ <Tab value="TypeScript (current)">
915
+```typescript
916
+import { Composio } from "@composio/core";
917
+
918
+const composio = new Composio();
919
+const linearAuthConfigId = "ac_1234";
920
+const userId = "user@email.com";
921
+
922
+// Initiate the OAuth connection request
923
+const connRequest = await composio.connectedAccounts.initiate(userId, linearAuthConfigId);
924
+
925
+const { redirectUrl, id } = connRequest;
926
+console.log(redirectUrl);
927
+
928
+// Wait for the connection to be established
929
+await connRequest.waitForConnection();
930
+
931
+// If you only have the connection request ID, you can also wait using:
932
+await composio.connectedAccounts.waitForConnection(id);
933
+```
934
+ </Tab>
935
+</Tabs>
936
+
937
+### Triggers
938
+
939
+Composio continues to support listening to application events using triggers through WebSockets and webhooks.
940
+
941
+#### Creating triggers
942
+
943
+The process for creating triggers and specifying their configuration has been redesigned for improved clarity and intuitiveness.
944
+
945
+Some triggers require configuration, such as repository names for GitHub triggers or channel names for Slack triggers. The process usually follows the pattern of fetching the trigger type and then creating the trigger with the appropriate configuration.
946
+
947
+<Tabs groupId="language" items={['Python (current)', 'TypeScript (current)']} persist>
948
+ <Tab value="Python (current)">
949
+```python
950
+from composio import Composio
951
+
952
+composio = Composio()
953
+
954
+user_id = "user@example.com"
955
+trigger_config = composio.triggers.get_type("GITHUB_COMMIT_EVENT")
956
+print(trigger_config.config)
957
+### Trigger Config
958
+# {
959
+# "properties": {
960
+# "owner": {
961
+# "description": "Owner of the repository",
962
+# "title": "Owner",
963
+# "type": "string"
964
+# },
965
+# "repo": {
966
+# "description": "Repository name",
967
+# "title": "Repo",
968
+# "type": "string"
969
+# }
970
+# },
971
+# "required": ["owner", "repo"],
972
+# "title": "WebhookConfigSchema",
973
+# "type": "object"
974
+
975
+trigger = composio.triggers.create(
976
+ slug="GITHUB_COMMIT_EVENT",
977
+ user_id=user_id,
978
+ trigger_config={"repo": "composiohq", "owner": "composio"},
979
+)
980
+print(trigger)
981
+
982
+
983
+# Managing triggers
984
+
985
+composio.triggers.enable(id="ti_abcd123")
986
+```
987
+ </Tab>
988
+ <Tab value="TypeScript (current)">
989
+```typescript
990
+import { Composio } from '@composio/core';
991
+
992
+const composio = new Composio();
993
+
994
+const userId = 'user@acme.com';
995
+// Fetch the trigger details
996
+const triggerType = await composio.triggers.getType('GITHUB_COMMIT_EVENT');
997
+console.log(JSON.stringify(triggerType.config, null, 2));
998
+/*--- Trigger config ---
999
+{
1000
+ "properties": {
1001
+ "owner": {
1002
+ "description": "Owner of the repository",
1003
+ "title": "Owner",
1004
+ "type": "string"
1005
+ },
1006
+ "repo": {
1007
+ "description": "Repository name",
1008
+ "title": "Repo",
1009
+ "type": "string"
1010
+ }
1011
+ },
1012
+ "required": ["owner", "repo"],
1013
+ "title": "WebhookConfigSchema",
1014
+ "type": "object"
1015
+}
1016
+*/
1017
+
1018
+const createResponse = await composio.triggers.create(userId, 'GITHUB_COMMIT_EVENT', {
1019
+ triggerConfig: {
1020
+ owner: 'composiohq',
1021
+ repo: 'composio',
1022
+ },
1023
+});
1024
+console.log(createResponse);
1025
+```
1026
+ </Tab>
1027
+</Tabs>
1028
+
1029
+#### Enabling/Disabling triggers
1030
+
1031
+You can enable or disable triggers through either the SDK or the dashboard. The dashboard process remains unchanged.
1032
+
1033
+Managing triggers with the SDK:
1034
+
1035
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
1036
+ <Tab value="Python">
1037
+```python
1038
+# Disable a trigger instance
1039
+disabled_instance = composio.triggers.disable(trigger_id="ti_abcd123")
1040
+print(disabled_instance)
1041
+```
1042
+ </Tab>
1043
+ <Tab value="TypeScript">
1044
+```typescript
1045
+await composio.triggers.disable("ti_abcd123");
1046
+```
1047
+ </Tab>
1048
+</Tabs>
1049
+
1050
+If needed, the trigger can be enabled again.
1051
+
1052
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
1053
+ <Tab value="Python">
1054
+```python
1055
+# Enable a trigger instance
1056
+enabled_instance = composio.triggers.enable(trigger_id="ti_abcd123")
1057
+print(enabled_instance)
1058
+```
1059
+ </Tab>
1060
+ <Tab value="TypeScript">
1061
+```typescript
1062
+await composio.triggers.enable("ti_abcd123");
1063
+```
1064
+ </Tab>
1065
+</Tabs>
1066
+
1067
+#### Listening to triggers
1068
+
1069
+We recommend listening to triggers through webhooks. The following are example routes for Next.js and FastAPI.
1070
+
1071
+For development, you can also [listen to triggers through the SDK](/docs/using-triggers#subscribing-to-triggers-using-the-sdk-for-development).
1072
+
1073
+<Tabs items={['FastAPI', 'Next.js']}>
1074
+ <Tab value="FastAPI">
1075
+```python title="app/route.py"
1076
+from fastapi import FastAPI, Request, HTTPException
1077
+from typing import Dict, Any
1078
+import uvicorn
1079
+import json
1080
+import hmac
1081
+import hashlib
1082
+import base64
1083
+import os
1084
+
1085
+def verify_webhook_signature(request: Request, body: bytes) -> bool:
1086
+ """Verify Composio webhook signature"""
1087
+ webhook_signature = request.headers.get("webhook-signature")
1088
+ webhook_id = request.headers.get("webhook-id")
1089
+ webhook_timestamp = request.headers.get("webhook-timestamp")
1090
+ webhook_secret = os.getenv("COMPOSIO_WEBHOOK_SECRET")
1091
+
1092
+ if not all([webhook_signature, webhook_id, webhook_timestamp, webhook_secret]):
1093
+ raise HTTPException(status_code=400, detail="Missing required webhook headers or secret")
1094
+
1095
+ if not webhook_signature.startswith("v1,"):
1096
+ raise HTTPException(status_code=401, detail="Invalid signature format")
1097
+
1098
+ received = webhook_signature[3:]
1099
+ signing_string = f"{webhook_id}.{webhook_timestamp}.{body.decode()}"
1100
+ expected = base64.b64encode(
1101
+ hmac.new(webhook_secret.encode(), signing_string.encode(), hashlib.sha256).digest()
1102
+ ).decode()
1103
+
1104
+ if not hmac.compare_digest(received, expected):
1105
+ raise HTTPException(status_code=401, detail="Invalid webhook signature")
1106
+
1107
+ return True
1108
+
1109
+@app.post("/webhook")
1110
+async def webhook_handler(request: Request):
1111
+ payload = await request.json()
1112
+
1113
+ trigger_type = payload.get("type")
1114
+ event_data = payload.get("data", {})
1115
+
1116
+ if trigger_type == "github_star_added_event":
1117
+ repo_name = event_data.get("repository_name")
1118
+ starred_by = event_data.get("starred_by")
1119
+ print(f"Repository {repo_name} starred by {starred_by}")
1120
+ # Add your business logic here
1121
+
1122
+ return {"status": "success", "message": "Webhook processed"}
1123
+```
1124
+ </Tab>
1125
+ <Tab value="Next.js">
1126
+```typescript title="app/api/webhook/route.ts"
1127
+import type { NextApiRequest, NextApiResponse } from 'next';
1128
+import { TriggerEvent } from '@composio/core';
1129
+import crypto from 'crypto';
1130
+
1131
+type GitHubStarEventData = {
1132
+ repository_name: string;
1133
+ repository_url: string;
1134
+ starred_by: string;
1135
+ starred_at: string;
1136
+};
1137
+
1138
+function verifyWebhookSignature(
1139
+ req: NextApiRequest,
1140
+ body: string
1141
+): boolean {
1142
+ const signature = req.headers['webhook-signature'] as string | undefined;
1143
+ const msgId = req.headers['webhook-id'] as string | undefined;
1144
+ const timestamp = req.headers['webhook-timestamp'] as string | undefined;
1145
+ const secret = process.env.COMPOSIO_WEBHOOK_SECRET;
1146
+
1147
+ if (!signature || !msgId || !timestamp || !secret) {
1148
+ throw new Error('Missing required webhook headers or secret');
1149
+ }
1150
+
1151
+ if (!signature.startsWith('v1,')) {
1152
+ throw new Error('Invalid signature format');
1153
+ }
1154
+
1155
+ const received = signature.slice(3);
1156
+ const signingString = `${msgId}.${timestamp}.${body}`;
1157
+ const expected = crypto
1158
+ .createHmac('sha256', secret)
1159
+ .update(signingString)
1160
+ .digest('base64');
1161
+
1162
+ return crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));
1163
+}
1164
+
1165
+export default async function webhookHandler(req: NextApiRequest, res: NextApiResponse) {
1166
+ const payload = req.body;
1167
+
1168
+ if (payload.type === 'github_star_added_event') {
1169
+ const event: TriggerEvent<GitHubStarEventData> = {
1170
+ type: payload.type,
1171
+ timestamp: payload.timestamp,
1172
+ data: payload.data
1173
+ };
1174
+
1175
+ console.log(`Repository ${event.data.repository_name} starred by ${event.data.starred_by}`);
1176
+ // Add your business logic here
1177
+ }
1178
+
1179
+ res.status(200).json({
1180
+ status: 'success',
1181
+ message: 'Webhook processed'
1182
+ });
1183
+}
1184
+```
1185
+ </Tab>
1186
+</Tabs>
1187
+
1188
+## Coming Soon
1189
+
1190
+### Local tools
1191
+
1192
+Previously, the Python SDK included *[local tools](https://github.com/ComposioHQ/composio/tree/master/python/composio/tools/local)*. These were tools defined within the SDK and consisted of local shell and code-related tools such as "clipboard", "sqltool", and "shelltool".
1193
+
1194
+This feature is currently in development for both Python and TypeScript SDKs, with newly created tools built for improved agent accuracy.
1195
+
1196
+This feature is currently in development for both Python and TypeScript SDKs.
1197
+
1198
+## API Endpoints
1199
+
1200
+The following table lists important API endpoints that have changed. You can use this reference to quickly find the new v3 API endpoint for migration:
1201
+
1202
+<Callout type="info">
1203
+This list is not exhaustive. Please refer to the [API Reference](/api-reference) for the complete list of endpoints.
1204
+</Callout>
1205
+
1206
+### Toolkits (formerly Apps)
1207
+
1208
+| Previous Endpoint | Current Endpoint |
1209
+| :--- | :--- |
1210
+| `GET /api/v1/apps` | `GET /api/v3/toolkits` |
1211
+| `GET /api/v1/apps/list/categories` | `GET /api/v3/toolkits/categories` |
1212
+| `GET /api/v1/apps/{appName}` | `GET /api/v3/toolkits/{slug}` |
1213
+
1214
+### Tools (formerly Actions)
1215
+
1216
+| Previous Endpoint | Current Endpoint |
1217
+| :--- | :--- |
1218
+| `GET /api/v2/actions` | `GET /api/v3/tools` |
1219
+| `GET /api/v2/actions/list/enums` | `GET /api/v3/tools/enum` |
1220
+| `GET /api/v2/actions/{actionId}` | `GET /api/v3/tools/{tool_slug}` |
1221
+| `POST /api/v2/actions/{actionId}/execute` | `POST /api/v3/tools/execute/{tool_slug}` |
1222
+| `POST /api/v2/actions/{actionId}/execute/get.inputs` | `POST /api/v3/tools/execute/{tool_slug}/input` |
1223
+| `POST /api/v2/actions/proxy` | `POST /api/v3/tools/execute/proxy` |
1224
+
1225
+### Auth Configs (formerly Integrations/Connectors)
1226
+
1227
+| Previous Endpoint | Current Endpoint |
1228
+| :--- | :--- |
1229
+| `GET /api/v1/integrations` | `GET /api/v3/auth_configs` |
1230
+| `POST /api/v1/integrations` | `POST /api/v3/auth_configs` |
1231
+| `GET /api/v1/integrations/{integrationId}` | `GET /api/v3/auth_configs/{nanoid}` |
1232
+| `PATCH /api/v1/integrations/{integrationId}` | `PATCH /api/v3/auth_configs/{nanoid}` |
1233
+| `DELETE /api/v1/integrations/{integrationId}` | `DELETE /api/v3/auth_configs/{nanoid}` |
1234
+| `POST /api/v2/integrations/create` | `POST /api/v3/auth_configs` |
1235
+
1236
+### Connected Accounts (formerly Connections)
1237
+
1238
+| Previous Endpoint | Current Endpoint |
1239
+| :--- | :--- |
1240
+| `GET /api/v1/connectedAccounts` | `GET /api/v3/connected_accounts` |
1241
+| `POST /api/v1/connectedAccounts` | `POST /api/v3/connected_accounts` |
1242
+| `POST /api/v2/connectedAccounts/initiateConnection` | `POST /api/v3/connected_accounts` |
1243
+| `GET /api/v1/connectedAccounts/{connectedAccountId}` | `GET /api/v3/connected_accounts/{nanoid}` |
1244
+| `DELETE /api/v1/connectedAccounts/{connectedAccountId}` | `DELETE /api/v3/connected_accounts/{nanoid}` |
1245
+| `POST /api/v1/connectedAccounts/{connectedAccountId}/disable` | `PATCH /api/v3/connected_accounts/{nanoId}/status` |
1246
+| `POST /api/v1/connectedAccounts/{connectedAccountId}/enable` | `PATCH /api/v3/connected_accounts/{nanoId}/status` |
1247
+| `POST /api/v1/connectedAccounts/{connectedAccountId}/reinitiate` | `POST /api/v3/connected_accounts/{nanoid}/refresh` |
1248
+
1249
+### Triggers
1250
+
1251
+| Previous Endpoint | Current Endpoint |
1252
+| :--- | :--- |
1253
+| `GET /api/v1/triggers` | `GET /api/v3/triggers_types` |
1254
+| `GET /api/v1/triggers/list/enums` | `GET /api/v3/triggers_types/list/enum` |
1255
+| `GET /api/v2/triggers/{triggerName}` | `GET /api/v3/triggers_types/{slug}` |
1256
+| `GET /api/v1/triggers/active_triggers` | `GET /api/v3/trigger_instances/active` |
1257
+| `POST /api/v1/triggers/enable/{connectedAccountId}/{triggerName}` | `POST /api/v3/trigger_instances/{slug}/upsert` |
1258
+| `DELETE /api/v1/triggers/instance/{triggerInstanceId}` | `DELETE /api/v3/trigger_instances/manage/{triggerId}` |
1259
+| `PATCH /api/v1/triggers/instance/{triggerId}/status` | `PATCH /api/v3/trigger_instances/manage/{triggerId}` |