Update a connection
Changes a connection's name or settings. Send only the fields you want to change; everything else keeps its current value, including the stored client secret. To clear a list or a map, send it empty ([] or {}). To see the current settings first, call Get a connection. Sending your own client_id or client_secret switches the connection to your credentials, unless you also set use_scalekit_creds.
Authorization
Authorization: Bearer $TOKEN, an access token from the client credentials grant. See Authentication.
Path parameters
connection_idstringrequiredconn_70219645518265104. Use the ID, not the name. Find it in the id field of the Create, Get or List connections response.Body
connection_namestringgmail-prod: letters, numbers and hyphens, unique in the environment. Your code refers to the connection by this name, so update the connection_name it passes when you rename one.google_dwd_configobjecttype is GOOGLE_DWD.Show 5 child attributes
required_scopesarray of stringscopes that users can't deselect when scope_selection_allowed is true. Each must also be in scopes.scope_selection_allowedbooleantrue to let users choose which of the scopes to grant when they connect.scopesarray of stringhttps://www.googleapis.com/auth/gmail.readonly. A list you send replaces the current one. Authorize the same scopes for the service account's client ID in the Google Workspace Admin console, under Security > Access and data control > API controls > Manage domain wide delegation.service_account_jsonstringtoken_uristringhttps://oauth2.googleapis.com/token.oauth_configobjectclient_id, client_secret and scopes. For connections that use OAuth, such as type OAUTH.Show 18 child attributes
access_typestringaccess_type value sent to the provider, such as offline.authorize_uristringclient_idstring123456789012-abc123def456.apps.googleusercontent.com for a Google app. Get it from the provider's developer console when you create the app (for Gmail: Google Cloud console, APIs & Services > Credentials, an OAuth client ID of type web application), and add this connection's redirect_uri to the app as an authorized redirect URI. Each connector's page under Connectors has the steps for that provider.client_secretstring********abcd. Leave it out to keep the stored secret.extra_authorize_paramsobject{"hd": "example.com"}, which asks Google to suggest accounts from that domain. Check the provider's OAuth documentation for the parameters it accepts. Send {} to clear them.optional_scopesobjectuser_scope. Set field_name to that parameter's name and scopes to its values.Show 2 child attributes
field_namestringscopesarray of stringpkce_enabledbooleanpromptstringprompt value sent to the provider, which controls whether the user signs in or consents again, such as consent. Send an empty string to send no prompt.redirect_uristringrequired_optional_scopesarray of stringoptional_scopes.scopes that users can't deselect when scope_selection_allowed is true. Each must also be in optional_scopes.scopes.required_scopesarray of stringscopes that users can't deselect when scope_selection_allowed is true, such as the read scope your tools always need. Each must also be in scopes, or the request fails with 400.scope_selection_allowedbooleantrue to let users choose which of the scopes to grant when they connect. Scopes in required_scopes stay selected.scopesarray of stringhttps://www.googleapis.com/auth/gmail.readonly for Gmail. A list you send replaces the whole current list, so include the scopes you want to keep. To build it, start from the current scopes in Get a connection, then pick from the scopes the connector offers: call List connectors with identifier set to the connector, such as GMAIL, and read auth_patterns[].oauth_config.available_scopes[].scope. You can also add a scope that isn't listed there, using the exact scope string from the provider's own documentation, such as Google's Gmail API scopes.token_access_typestringtoken_access_type value sent to the provider, for providers that use it, such as Dropbox with offline.token_endpoint_auth_methodstring (enum)DEFAULT lets Scalekit choose.NONEBASIC_AUTHREQUEST_BODYDEFAULTtoken_uristringuse_scalekit_credsbooleantrue to use Scalekit's own OAuth app instead of yours, for connectors that offer one; otherwise the request fails with 400. Sending your own client_id or client_secret sets it to false unless you also send it.user_info_uristringprovider_configurationsobjectprovider_domain can only be set when you create the connection.Show 7 child attributes
googleads_developer_tokenstringmicrosoft_tenant_idstringprovider_domainstringmcp-eu.mixpanel.com for Mixpanel's EU region, for connectors that need one. Set it when you create the connection; it can't be changed later and isn't returned.slack_connection_typestring (enum)BOT to act as your Slack app's bot user, or USER to act as the user who connects.BOTUSERsmart_fhir_audstringaud parameter when users sign in.smart_fhir_domainstringtrello_app_namestringscalekit_client.actions.update_connection
Changes a connection's name or settings. Pass the connection by name, or by ID with connection_id. Only the fields you pass change.
scalekit_client.actions.update_connection( connection_name: Optional[str] = None, connection_id: Optional[str] = None, new_connection_name: Optional[str] = None, oauth: Optional[OAuthSettings] = None, google_dwd: Optional[GoogleDWDSettings] = None, provider_configurations: Optional[ProviderConfigurations] = None,) -> AgentKitConnectionParameters
connection_nameOptional[str]gmail-work. Use this or connection_id.connection_idOptional[str]conn_70219645518265104. Use this or connection_name. Both are in the List connections response.new_connection_nameOptional[str]gmail-prod. Update the connection_name your code passes when you rename one.oauthOptional[OAuthSettings]OAuthSettings. Each field you leave as None keeps its value; pass [] or {} to clear a list or map. client_id and client_secret come from the OAuth app you registered with the provider, such as a Google Cloud OAuth client ID for Gmail; add the connection's redirect_uri to that app. scopes replaces the whole list, such as ["https://www.googleapis.com/auth/gmail.readonly"]. Start from the current scopes in Get a connection, and pick more from auth_patterns[].oauth_config.available_scopes in List connectors. You can also add a scope that isn't listed there, using the exact string from the provider's documentation, such as Google's Gmail API scopes. Other fields: required_scopes, scope_selection_allowed, use_scalekit_creds, access_type, prompt, pkce_enabled, extra_authorize_params and token_endpoint_auth_method, described in the request body above.google_dwdOptional[GoogleDWDSettings]GoogleDWDSettings(service_account_json=, scopes=). Only for GOOGLE_DWD connections.provider_configurationsOptional[ProviderConfigurations]ProviderConfigurations, such as ProviderConfigurations(slack_connection_type="BOT") for Slack.Returns AgentKitConnection.
From scalekit-sdk-python 2.22.0.
scalekit.actions.updateConnection
Changes a connection's name or settings. Pass the connection by connectionName or connectionId. Only the fields you pass change.
scalekit.actions.updateConnection( params: { connectionName?: string; connectionId?: string; newConnectionName?: string; oauth?: AgentKitOAuthSettings; googleDwd?: AgentKitGoogleDwdSettings; providerConfigurations?: AgentKitProviderConfigurations; },): Promise<AgentKitConnection>Parameters
connectionNamestringgmail-work. Use this or connectionId.connectionIdstringconn_70219645518265104. Use this or connectionName. Both are in the List connections response.newConnectionNamestringgmail-prod. Update the connectionName your code passes when you rename one.oauthAgentKitOAuthSettings{ clientId?, clientSecret?, scopes?, ... }. Each field you leave out keeps its value; pass [] or {} to clear a list or map. clientId and clientSecret come from the OAuth app you registered with the provider, such as a Google Cloud OAuth client ID for Gmail; add the connection's redirect_uri to that app. scopes replaces the whole list, such as ["https://www.googleapis.com/auth/gmail.readonly"]. Start from the current scopes in Get a connection, and pick more from auth_patterns[].oauth_config.available_scopes in List connectors. You can also add a scope that isn't listed there, using the exact string from the provider's documentation, such as Google's Gmail API scopes. Other fields: requiredScopes, scopeSelectionAllowed, useScalekitCreds, accessType, prompt, pkceEnabled, extraAuthorizeParams and tokenEndpointAuthMethod, described in the request body above in snake_case. Send at most one of oauth or googleDwd.googleDwdAgentKitGoogleDwdSettings{ serviceAccountJson?, scopes?, ... }. Only for GOOGLE_DWD connections.providerConfigurationsAgentKitProviderConfigurations{ slackConnectionType: 'BOT' } for Slack. Send it with oauth, or on its own.Returns Promise<AgentKitConnection>.
From @scalekit-sdk/node 2.21.0.
Response 200
connectionobjectShow 11 child attributes
auth_modestring (enum)USER: each user authorizes their own account. ORG_WIDE: one admin-authorized account is shared.USERORG_WIDEconnection_mcp_urlstringconnection_namestringgmail-work. Your code passes this name as connection_name when it creates connected accounts and runs tools.create_timestringgoogle_dwd_configobjectGOOGLE_DWD connections.Show 5 child attributes
required_scopesarray of stringscopes that users can't deselect when scope_selection_allowed is true. Each must also be in scopes.scope_selection_allowedbooleantrue to let users choose which of the scopes to grant when they connect.scopesarray of stringhttps://www.googleapis.com/auth/gmail.readonly. A list you send replaces the current one. Authorize the same scopes for the service account's client ID in the Google Workspace Admin console, under Security > Access and data control > API controls > Manage domain wide delegation.service_account_jsonstringtoken_uristringhttps://oauth2.googleapis.com/token.idstringoauth_configobjectShow 18 child attributes
access_typestringaccess_type value sent to the provider, such as offline.authorize_uristringclient_idstring123456789012-abc123def456.apps.googleusercontent.com for a Google app. Get it from the provider's developer console when you create the app (for Gmail: Google Cloud console, APIs & Services > Credentials, an OAuth client ID of type web application), and add this connection's redirect_uri to the app as an authorized redirect URI. Each connector's page under Connectors has the steps for that provider.client_secretstring********abcd. Leave it out to keep the stored secret.extra_authorize_paramsobject{"hd": "example.com"}, which asks Google to suggest accounts from that domain. Check the provider's OAuth documentation for the parameters it accepts. Send {} to clear them.optional_scopesobjectuser_scope. Set field_name to that parameter's name and scopes to its values.pkce_enabledbooleanpromptstringprompt value sent to the provider, which controls whether the user signs in or consents again, such as consent. Send an empty string to send no prompt.redirect_uristringrequired_optional_scopesarray of stringoptional_scopes.scopes that users can't deselect when scope_selection_allowed is true. Each must also be in optional_scopes.scopes.required_scopesarray of stringscopes that users can't deselect when scope_selection_allowed is true, such as the read scope your tools always need. Each must also be in scopes, or the request fails with 400.scope_selection_allowedbooleantrue to let users choose which of the scopes to grant when they connect. Scopes in required_scopes stay selected.scopesarray of stringhttps://www.googleapis.com/auth/gmail.readonly for Gmail. A list you send replaces the whole current list, so include the scopes you want to keep. To build it, start from the current scopes in Get a connection, then pick from the scopes the connector offers: call List connectors with identifier set to the connector, such as GMAIL, and read auth_patterns[].oauth_config.available_scopes[].scope. You can also add a scope that isn't listed there, using the exact scope string from the provider's own documentation, such as Google's Gmail API scopes.token_access_typestringtoken_access_type value sent to the provider, for providers that use it, such as Dropbox with offline.token_endpoint_auth_methodstring (enum)DEFAULT lets Scalekit choose.NONEBASIC_AUTHREQUEST_BODYDEFAULTtoken_uristringuse_scalekit_credsbooleantrue to use Scalekit's own OAuth app instead of yours, for connectors that offer one; otherwise the request fails with 400. Sending your own client_id or client_secret sets it to false unless you also send it.user_info_uristringproviderstringGMAIL.provider_configurationsobjectShow 7 child attributes
googleads_developer_tokenstringmicrosoft_tenant_idstringprovider_domainstringmcp-eu.mixpanel.com for Mixpanel's EU region, for connectors that need one. Set it when you create the connection; it can't be changed later and isn't returned.slack_connection_typestring (enum)BOT to act as your Slack app's bot user, or USER to act as the user who connects.BOTUSERsmart_fhir_audstringaud parameter when users sign in.smart_fhir_domainstringtrello_app_namestringtypestring (enum)OAUTH. It comes from the connector and decides which settings object applies (oauth_config or google_dwd_config).OIDCSAMLPASSWORDOAUTHPASSWORDLESSBASICBEARERAPI_KEYWEBAUTHNOAUTH_M2MTRELLO_OAUTH1GOOGLE_DWDTRUSTED_IDPSMART_FHIRNO_AUTHupdate_timestringErrors
Every error has the same body: code, message and details. See Errors and rate limits.
400Invalid request - for example, an unknown field, a name that is already used, settings that don't match the connection's type, required_scopes that aren't all in scopes, or use_scalekit_creds on a connector that doesn't offer Scalekit credentials.401Authentication required - missing or invalid access token404Not found - no connection with this ID. Error code RESOURCE_NOT_FOUND.