Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
Table of Contents
Installation
Add to Gemfile:
gem 'composio', '~> 0.1.18'
Getting Started
require 'composio'
configuration = Composio::Configuration.new
configuration.api_key = 'YOUR API KEY'
composio = composio::Client.new(configuration)
result = composio.api_keys.generate(
name: "string_example",
)
p result
Raw HTTP Response
To access the raw HTTP response, suffix any method with _with_http_info
.
result = composio.api_keys.generate_with_http_info(
name: "string_example",
)
p result.data
p.result.status_code
p.result.headers
p.result.response
Reference
composio.api_keys.generate
Generate api key
🛠️ Usage
result = composio.api_keys.generate(
name: "string_example",
)
p result
⚙️ Parameters
name: String
The name of the API key to be generated
🔄 Return
APIKeyResDTO
🌐 Endpoint
/api/v1/api_keys
POST
🔙 Back to Table of Contents
composio.api_keys.list
List api keys
🛠️ Usage
result = composio.api_keys.list
p result
🔄 Return
APIKeyResDTO
🌐 Endpoint
/api/v1/api_keys
GET
🔙 Back to Table of Contents
composio.api_keys.remove
Delete api key
🛠️ Usage
result = composio.api_keys.remove(
id: "'+j>6",
)
p result
⚙️ Parameters
id: String
🔄 Return
DeleteAPIKeyResponseDTO
🌐 Endpoint
/api/v1/api_keys/{id}
DELETE
🔙 Back to Table of Contents
composio.actions.execute
Execute an action. Support both connected account and no auth auth.
🛠️ Usage
result = composio.actions.execute(
action_id: "'+j>6",
connected_account_id: "string_example",
app_name: "string_example",
entity_id: "string_example",
endpoint: "string_example",
input: {},
session_info: {
},
auth_config: {
"parameters" => [
{
"name" => "name_example",
"_in" => "query",
"value" => "value_example",
}
],
},
text: "string_example",
custom_description: "string_example",
system_prompt: "string_example",
)
p result
⚙️ Parameters
action_id: String
connectedAccountId: String
appName: String
entityId: String
endpoint: String
input: Object
text: String
customDescription: String
systemPrompt: String
🔄 Return
ActionExecutionResDto
🌐 Endpoint
/api/v2/actions/{actionId}/execute
POST
🔙 Back to Table of Contents
composio.actions.execute_action_proxy
Execute an action with direct auth.
🛠️ Usage
result = composio.actions.execute_action_proxy(
parameters: [
{
"name" => "name_example",
"_in" => "query",
"value" => "value_example",
}
],
connected_account_id: "string_example",
endpoint: "string_example",
method: "GET",
body: {},
)
p result
⚙️ Parameters
parameters: Array<Parameter
>
connectedAccountId: String
The connected account uuid to use for the action.
endpoint: String
The endpoint to call for the action. If the given url is relative, it will be
resolved relative to the base_url set in the connected account info.
The HTTP method to use for the action.
body: Object
The body to be sent to the endpoint. This can either be a JSON field or a
string.
🔄 Return
ActionExecutionResDto
🌐 Endpoint
/api/v2/actions/proxy
POST
🔙 Back to Table of Contents
composio.actions.get_action_by_id
Get action details
🛠️ Usage
result = composio.actions.get_action_by_id(
action_id: "'+j>6",
)
p result
⚙️ Parameters
action_id: String
🔄 Return
ActionDetails
🌐 Endpoint
/api/v2/actions/{actionId}
GET
🔙 Back to Table of Contents
composio.actions.get_action_inputs
Get the inputs for an action with NLA
🛠️ Usage
result = composio.actions.get_action_inputs(
text: "string_example",
action_id: "'+j>6",
custom_description: "string_example",
system_prompt: "string_example",
)
p result
⚙️ Parameters
text: String
action_id: String
customDescription: String
systemPrompt: String
🌐 Endpoint
/api/v2/actions/{actionId}/execute/get.inputs
POST
🔙 Back to Table of Contents
composio.actions.get_all_actions_based_on_query
Retrieve a list of all actions based on query parameters.
🛠️ Usage
result = composio.actions.get_all_actions_based_on_query(
app_names: "string_example",
use_case: "string_example",
show_enabled_only: true,
limit: 3.14,
apps: "string_example",
actions: "string_example",
tags: "string_example",
usecase_limit: 3.14,
filter_important_actions: true,
show_all: true,
page: 3.14,
offset: 3.14,
)
p result
⚙️ Parameters
app_names: String
use_case: String
show_enabled_only: Boolean
limit: Float
apps: String
actions: String
tags: String
usecase_limit: Float
filter_important_actions: Boolean
show_all: Boolean
page: Float
offset: Float
🔄 Return
ActionsListResponseDTO
🌐 Endpoint
/api/v2/actions/list/all
GET
🔙 Back to Table of Contents
composio.actions.list
Retrieve a list of all actions based on query parameters.
🛠️ Usage
result = composio.actions.list(
app_names: "string_example",
use_case: "string_example",
show_enabled_only: true,
limit: 3.14,
apps: "string_example",
actions: "string_example",
tags: "string_example",
usecase_limit: 3.14,
filter_important_actions: true,
show_all: true,
page: 3.14,
offset: 3.14,
)
p result
⚙️ Parameters
app_names: String
use_case: String
show_enabled_only: Boolean
limit: Float
apps: String
actions: String
tags: String
usecase_limit: Float
filter_important_actions: Boolean
show_all: Boolean
page: Float
offset: Float
🔄 Return
ActionsListResponseDTO
🌐 Endpoint
/api/v2/actions
GET
🔙 Back to Table of Contents
composio.admin.clear_cache
Clear cache
🛠️ Usage
result = composio.admin.clear_cache(
x_admin_token: "string_example",
)
p result
⚙️ Parameters
x_admin_token: String
🌐 Endpoint
/api/v1/clear-cache
POST
🔙 Back to Table of Contents
composio.admin.get_sentry_dns
Jssentry dns
🛠️ Usage
result = composio.admin.get_sentry_dns
p result
🌐 Endpoint
/api/v1/cli/js-sentry-dns
GET
🔙 Back to Table of Contents
composio.analytics.get
Get analytics
🛠️ Usage
result = composio.analytics.get(
last_time_period: "DAY",
)
p result
⚙️ Parameters
last_time_period: String
🔄 Return
AnalyticsDataResDTO
🌐 Endpoint
/api/v1/analytics
GET
🔙 Back to Table of Contents
composio.analytics.get_top_entities
Get top entities
🛠️ Usage
result = composio.analytics.get_top_entities(
query: "string_example",
)
p result
⚙️ Parameters
query: String
🔄 Return
TopEntitiesResDTO
🌐 Endpoint
/api/v1/analytics/entities
GET
🔙 Back to Table of Contents
composio.apps.delete_open_api_spec_tool
Delete an openapi spec tool
🛠️ Usage
result = composio.apps.delete_open_api_spec_tool(
id: "'+j>6",
)
p result
⚙️ Parameters
id: String
🌐 Endpoint
/api/v1/apps/openapi/spec/delete/{id}
DELETE
🔙 Back to Table of Contents
composio.apps.get_details
Get app details
🛠️ Usage
result = composio.apps.get_details(
app_name: "'+j>6",
)
p result
⚙️ Parameters
app_name: String
🔄 Return
SingleAppInfoResDTO
🌐 Endpoint
/api/v1/apps/{appName}
GET
🔙 Back to Table of Contents
composio.apps.get_open_api_spec_status
Get the status of an openapi spec tool
🛠️ Usage
result = composio.apps.get_open_api_spec_status(
id: "'+j>6",
)
p result
⚙️ Parameters
id: String
🌐 Endpoint
/api/v1/apps/openapi/spec/status/{id}
GET
🔙 Back to Table of Contents
composio.apps.list
Retrieve a list of all applications based on query parameters.
🛠️ Usage
result = composio.apps.list(
category: "string_example",
additional_fields: "string_example",
include_local: "string_example",
)
p result
⚙️ Parameters
category: String
additional_fields: String
include_local: String
🔄 Return
AppListResDTO
🌐 Endpoint
/api/v1/apps
GET
🔙 Back to Table of Contents
composio.apps.list_open_api_specs
List all openapi spec tools
🛠️ Usage
result = composio.apps.list_open_api_specs
p result
🔄 Return
AppListResDTO
🌐 Endpoint
/api/v1/apps/openapi/spec/list
GET
🔙 Back to Table of Contents
composio.apps.send_email_to_client
Send email to client
🛠️ Usage
result = composio.apps.send_email_to_client(
admin_token: "string_example",
body: None,
)
p result
⚙️ Parameters
admin_token: String
🌐 Endpoint
/api/v1/apps/openapi/send_email_to_client
POST
🔙 Back to Table of Contents
composio.auth.get_user_info
Get client info
🛠️ Usage
result = composio.auth.get_user_info
p result
🔄 Return
ClientInfoResDTO
🌐 Endpoint
/api/v1/client/auth/client_info
GET
🔙 Back to Table of Contents
composio.auth.identify_client_operation
Identify client
🛠️ Usage
result = composio.auth.identify_client_operation(
hash: "string_example",
framework: "string_example",
)
p result
⚙️ Parameters
hash: String
The hash of the client
framework: String
The framework used by the client
🔄 Return
IdentifyClientResDTO
🌐 Endpoint
/api/v1/client/auth/identify
POST
🔙 Back to Table of Contents
composio.cli.exchange_code
Handle cli code exchange
🛠️ Usage
result = composio.cli.exchange_code
p result
🔄 Return
GenerateCLISessionResDTO
🌐 Endpoint
/api/v1/cli/generate-cli-session
GET
🔙 Back to Table of Contents
composio.cli.get_code
Get cli code
🛠️ Usage
result = composio.cli.get_code(
key: "key_example",
code: "string_example",
)
p result
⚙️ Parameters
key: String
code: String
🔄 Return
GetCLISessionResDTO
🌐 Endpoint
/api/v1/cli/get-cli-code
GET
🔙 Back to Table of Contents
composio.cli.verify_code
Handle cli code verification
🛠️ Usage
result = composio.cli.verify_code(
key: "key_example",
code: "string_example",
)
p result
⚙️ Parameters
key: String
code: String
🔄 Return
VerifyCLICodeResDTO
🌐 Endpoint
/api/v1/cli/verify-cli-code
GET
🔙 Back to Table of Contents
composio.connections.delete
Delete a connection
🛠️ Usage
result = composio.connections.delete(
connected_account_id: "'+j>6",
)
p result
⚙️ Parameters
connected_account_id: String
🔄 Return
DeleteRowAPIDTO
🌐 Endpoint
/api/v1/connectedAccounts/{connectedAccountId}
DELETE
🔙 Back to Table of Contents
composio.connections.disable
Disable a connection
🛠️ Usage
result = composio.connections.disable(
connected_account_id: "'+j>6",
)
p result
⚙️ Parameters
connected_account_id: String
🔄 Return
ToggleConnectedAccountResponseDTO
🌐 Endpoint
/api/v1/connectedAccounts/{connectedAccountId}/disable
POST
🔙 Back to Table of Contents
composio.connections.enable
Enable a connection
🛠️ Usage
result = composio.connections.enable(
connected_account_id: "'+j>6",
)
p result
⚙️ Parameters
connected_account_id: String
🔄 Return
ToggleConnectedAccountResponseDTO
🌐 Endpoint
/api/v1/connectedAccounts/{connectedAccountId}/enable
POST
🔙 Back to Table of Contents
composio.connections.get
Get connection
🛠️ Usage
result = composio.connections.get(
connected_account_id: "'+j>6",
)
p result
⚙️ Parameters
connected_account_id: String
🔄 Return
ConnectedAccountResponseDTO
🌐 Endpoint
/api/v1/connectedAccounts/{connectedAccountId}
GET
🔙 Back to Table of Contents
composio.connections.get_info
Get connection info
🛠️ Usage
result = composio.connections.get_info(
connected_account_id: "'+j>6",
)
p result
⚙️ Parameters
connected_account_id: String
🔄 Return
GetConnectionInfoResponseDTO
🌐 Endpoint
/api/v1/connectedAccounts/{connectedAccountId}/info
GET
🔙 Back to Table of Contents
composio.connections.initiate
Initiate connection
🛠️ Usage
result = composio.connections.initiate(
data: {},
integration_id: "a",
redirect_uri: "string_example",
user_uuid: "string_example",
entity_id: "string_example",
labels: [
"string_example"
],
)
p result
⚙️ Parameters
data: Object
integrationId: String
redirectUri: String
userUuid: String
entityId: String
labels: Array<String
>
🔄 Return
InitiateConnectionResponse
🌐 Endpoint
/api/v1/connectedAccounts
POST
🔙 Back to Table of Contents
composio.connections.list
Get connections
🛠️ Usage
result = composio.connections.list(
page: 3.14,
page_size: 3.14,
app_names: "string_example",
integration_id: "string_example",
connection_id: "string_example",
user_uuid: "string_example",
show_active_only: true,
status: "string_example",
show_disabled: true,
labels: [
"string_example"
],
)
p result
⚙️ Parameters
page: Float
page_size: Float
app_names: String
integration_id: String
connection_id: String
user_uuid: String
show_active_only: Boolean
status: String
show_disabled: Boolean
labels: Array<String
>
🔄 Return
GetConnectionsResponseDto
🌐 Endpoint
/api/v1/connectedAccounts
GET
🔙 Back to Table of Contents
composio.connections.update_connection_data
Update connection data
🛠️ Usage
result = composio.connections.update_connection_data(
labels: [
"string_example"
],
connected_account_id: "'+j>6",
)
p result
⚙️ Parameters
labels: Array<String
>
connected_account_id: String
🌐 Endpoint
/api/v1/connectedAccounts/{connectedAccountId}/data
PATCH
🔙 Back to Table of Contents
composio.event_logs.update_webhook
Update webhook
🛠️ Usage
result = composio.event_logs.update_webhook(
event_webhook_url: "string_example",
)
p result
⚙️ Parameters
eventWebhookURL: String
Event Webhook URL
🌐 Endpoint
/api/v1/event_logs/set/webhook
POST
🔙 Back to Table of Contents
composio.integrations.create_integration
Create a new connector
🛠️ Usage
result = composio.integrations.create_integration(
name: "string_example",
auth_scheme: "string_example",
auth_config: {
},
use_composio_auth: true,
app_id: "string_example",
app_name: "string_example",
force_new_integration: true,
)
p result
⚙️ Parameters
name: String
Name of the connector
authScheme: String
Authentication scheme
appId: String
Composio App UUID to be used for authentication. Either specify this or appName
appName: String
Name of the app to be used for authentication. Either specify this or appId
forceNewIntegration: Boolean
Flag to force new integration
🔄 Return
GetConnectorInfoResDTO
🌐 Endpoint
/api/v1/integrations
POST
🔙 Back to Table of Contents
composio.integrations.delete_connector
Delete a connector
🛠️ Usage
result = composio.integrations.delete_connector(
integration_id: "'+j>6",
)
p result
⚙️ Parameters
integration_id: String
🔄 Return
DeleteRowAPIDTO
🌐 Endpoint
/api/v1/integrations/{integrationId}
DELETE
🔙 Back to Table of Contents
composio.integrations.get_connector_info
Get connector info
🛠️ Usage
result = composio.integrations.get_connector_info(
integration_id: "'+j>6",
)
p result
⚙️ Parameters
integration_id: String
🔄 Return
GetConnectorInfoResDTO
🌐 Endpoint
/api/v1/integrations/{integrationId}
GET
🔙 Back to Table of Contents
composio.integrations.list_global_connectors
List all connectors
🛠️ Usage
result = composio.integrations.list_global_connectors
p result
🔄 Return
GetConnectorListResDTO
🌐 Endpoint
/api/v1/integrations
GET
🔙 Back to Table of Contents
composio.integrations.update_integration
Modify a connector
🛠️ Usage
result = composio.integrations.update_integration(
integration_id: "'+j>6",
auth_config: {},
enabled: true,
)
p result
⚙️ Parameters
integration_id: String
authConfig: Object
Authentication configuration for the connector
enabled: Boolean
Flag to indicate if the connector is enabled
🔄 Return
PatchConnectorResDTO
🌐 Endpoint
/api/v1/integrations/{integrationId}
PATCH
🔙 Back to Table of Contents
composio.logs.add_new_logs
Add new logs
🛠️ Usage
result = composio.logs.add_new_logs(
provider_name: "string_example",
action_name: "string_example",
request: {},
response: {},
is_error: true,
connection_id: "string_example",
session_id: "string_example",
logs_type: "string_example",
entity_id: "string_example",
)
p result
⚙️ Parameters
providerName: String
Provider name of the log
actionName: String
Action name of the log
request: Object
response: Object
isError: Boolean
connectionId: String
Connection ID of the log
sessionId: String
Session ID of the log
logsType: String
Type of the log
entityId: String
Entity ID of the log
🔄 Return
IngestDataResponseDTO
🌐 Endpoint
/api/v1/logs
POST
🔙 Back to Table of Contents
composio.logs.list
List logs
🛠️ Usage
result = composio.logs.list(
type: "error",
time: "5m",
status: "all",
search: "string_example",
integration_id: "string_example",
entity_id: "string_example",
limit: 10,
cursor: "string_example",
logs_type: "string_example",
session_id: "string_example",
)
p result
⚙️ Parameters
type: String
time: String
status: String
search: String
integration_id: String
entity_id: String
limit: Float
cursor: String
logs_type: String
session_id: String
🔄 Return
LogsResDTO
🌐 Endpoint
/api/v1/logs
GET
🔙 Back to Table of Contents
composio.triggers.delete_trigger_instance
Deletes a specified trigger instance.
🛠️ Usage
result = composio.triggers.delete_trigger_instance(
trigger_instance_id: "'+j>6",
)
p result
⚙️ Parameters
trigger_instance_id: String
🔄 Return
DeleteRowAPIDTO
🌐 Endpoint
/api/v1/triggers/instance/{triggerInstanceId}
DELETE
🔙 Back to Table of Contents
composio.triggers.disable_trigger_instance
Disables a specified trigger instance.
🛠️ Usage
result = composio.triggers.disable_trigger_instance(
trigger_instance_id: "'+j>6",
)
p result
⚙️ Parameters
trigger_instance_id: String
🔄 Return
TriggerResponseDTO
🌐 Endpoint
/api/v1/triggers/disable/{triggerInstanceId}
POST
🔙 Back to Table of Contents
composio.triggers.enable
Enables a trigger for a connected account and specific trigger name.
🛠️ Usage
result = composio.triggers.enable(
trigger_config: {},
connected_account_id: "'+j>6",
trigger_name: "'+j>6",
verify_host: "string_example",
)
p result
⚙️ Parameters
triggerConfig: Object
The trigger configuration
connected_account_id: String
trigger_name: String
verifyHost: String
The verify host
🔄 Return
TriggerResponseDTO
🌐 Endpoint
/api/v1/triggers/enable/{connectedAccountId}/{triggerName}
POST
🔙 Back to Table of Contents
composio.triggers.get_active_triggers
Lists active triggers based on query parameters.
🛠️ Usage
result = composio.triggers.get_active_triggers(
connected_account_ids: "string_example",
integration_ids: "string_example",
trigger_ids: "string_example",
trigger_names: "string_example",
page: 3.14,
limit: 3.14,
show_disabled: true,
)
p result
⚙️ Parameters
connected_account_ids: String
integration_ids: String
trigger_ids: String
trigger_names: String
page: Float
limit: Float
show_disabled: Boolean
🔄 Return
ActiveTriggersResDTO
🌐 Endpoint
/api/v1/triggers/active_triggers
GET
🔙 Back to Table of Contents
composio.triggers.get_callback_url
Retrieves the universal callback URL set for the client.
🛠️ Usage
result = composio.triggers.get_callback_url
p result
🔄 Return
WebhookURLResponseDTO
🌐 Endpoint
/api/v1/triggers/callback_url
GET
🔙 Back to Table of Contents
composio.triggers.get_logs_based_on_connection_and_integration_details
Fetches logs based on connection and integration details.
🛠️ Usage
result = composio.triggers.get_logs_based_on_connection_and_integration_details(
connection_id: "string_example",
integration_id: "string_example",
page: 3.14,
limit: 3.14,
)
p result
⚙️ Parameters
connection_id: String
integration_id: String
page: Float
limit: Float
🔄 Return
TriggerLogsResDTO
🌐 Endpoint
/api/v1/triggers/logs
GET
🔙 Back to Table of Contents
composio.triggers.get_trigger_info
Get Trigger Info
🛠️ Usage
result = composio.triggers.get_trigger_info(
trigger_name: "'+j>6",
)
p result
⚙️ Parameters
trigger_name: String
🔄 Return
SingleTriggerResDTO
🌐 Endpoint
/api/v2/triggers/{triggerName}
GET
🔙 Back to Table of Contents
composio.triggers.list
List triggers
🛠️ Usage
result = composio.triggers.list(
app_names: "string_example",
connected_account_ids: "string_example",
trigger_ids: "string_example",
integration_ids: "string_example",
show_enabled_only: true,
)
p result
⚙️ Parameters
app_names: String
connected_account_ids: String
trigger_ids: String
integration_ids: String
show_enabled_only: Boolean
🔄 Return
TriggerResDTO
🌐 Endpoint
/api/v1/triggers
GET
🔙 Back to Table of Contents
Sets a universal callback URL for the client.
🛠️ Usage
result = composio.triggers.set_callback_url(
callback_url: "string_example",
)
p result
⚙️ Parameters
callbackURL: String
The callback URL
🔄 Return
TriggerResponseDTO
🌐 Endpoint
/api/v1/triggers/set_callback_url
POST
🔙 Back to Table of Contents
Switches the status of a trigger instance.
🛠️ Usage
result = composio.triggers.switch_instance_status(
enabled: true,
trigger_id: "'+j>6",
)
p result
⚙️ Parameters
enabled: Boolean
The new enabled status of the trigger
trigger_id: String
🔄 Return
TriggerResponseDTO
🌐 Endpoint
/api/v1/triggers/instance/{triggerId}/status
PATCH
🔙 Back to Table of Contents
Author
This TypeScript package is automatically generated by Konfig