Connections

Create a connection

Create a connection to an app with the credentials given, after testing them against the app. Only the user of the API key can use the connection unless is_shared_with_workspace is true. Answers the connection without its secrets.

post/v1/workspaces/{workspace_id}/connections

Request

  • Base URL
    https://api.stacksync.com
  • URL
    https://api.stacksync.com/v1/workspaces/{workspace_id}/connections
  • Auth
    HTTP bearer

Path parameters

workspace_idinteger required

The workspace the resources belong to

Query parameters

region'besg' | 'usnv' required

Data region the connection is stored in

Request body

connection_namestring required

The name of the connection, unique in the workspace

is_shared_with_workspaceboolean required

True to let every editor of the workspace use the connection, false to keep it to the user of the API key

app_type'postgres' | 'postgres_heroku' | 'salesforce' | 'hubspot' | 'bigquery' | 'amazon_lightsail' | 'amazon_rds' | 'supabase' | 'supabase_oauth' | 'scaleway_postgres' | 'cockroachdb' | 'render_postgres' | 'google_alloydb' | 'snowflake' | 'dynamodb' | 'mongodb' | 'sap' | 'zendesk' | 'zoho_crm' | 'microsoft_dynamics' | 'dynamics365_crm' | 'dynamics365_finance' | 'dynamics365_business_central' | 'pipedrive' | 'marketo' | 'odoo' | 'airtable' | 'attio_crm' | 'motherduck' | 'shopify' | 'oracledb' | 'mysql' | 'mariadb' | 'sqlserver' | 'suiteanalytics' | 'twilio' | 'bamboohr' | 'sendgrid' | 'twenty_crm' | 'monday' | 'acumatica' | 'extensiv' required

The app to connect, as shown in Stacksync

credentialsobject required

The credentials of the app, checked per app type before the connection is tested: postgres, postgres_heroku: connection_string, schema; mongodb: connection_string, database; hubspot, monday: code (the OAuth authorization code); salesforce: code, account_type (standard or sandbox); sendgrid, twenty_crm: api_key; twilio: account_sid, auth_token; bamboohr: company_domain, api_key; snowflake: account, username, warehouse; suiteanalytics: account_id, consumer_key, consumer_secret, token_id, token_secret, role_id; bigquery: service_account_credentials (the service account JSON: type, project_id, private_key_id, private_key, client_email, client_id, auth_uri, token_uri, auth_provider_x509_cert_url, client_x509_cert_url); acumatica: instance_url, client_id, client_secret, code, redirect_uri; extensiv: client_id, client_secret, optional user_login_id and is_sandbox (boolean). Other app types take the fields their connection form asks for; they are checked when the connection is tested.

Response

The connection created

Changes

No recorded changes to this operation across all 1 revision of this API.