Skip to content
TriedDocs
Integrations

Update CRM config

Create or update the workspace's connection to one CRM, with credentials, field mapping and sync switches.

PUThttps://api.tried.com.au/update-crm-config/{provider}

Needs keys Live sync needs a token for the CRM (HubSpot, Salesforce, Dynamics 365, GoHighLevel or Zoho), set here or through Start OAuth. Without credentials the connection runs in mock mode and records each operation instead of sending it.

Creates the connection for a CRM if the workspace has none, otherwise updates it. Fields you leave out stay as they are. Each workspace has at most one connection per CRM.

Request#

Path parameter Type Required Description
provider string Yes One of hubspot, salesforce, dynamics365, gohighlevel, zoho.
Field Type Required Description
credentials object or null No String values, each up to 4000 characters. Replaces the stored credentials in full. When set, it must hold the provider's required keys: access_token (HubSpot, Zoho), instance_url and access_token (Salesforce, Dynamics 365), access_token and location_id (GoHighLevel). Optional keys: base_url (HubSpot, GoHighLevel), api_version (Salesforce, default v61.0), api_domain (Zoho). Pass null to remove them and switch to mock mode.
enabled boolean No Turn the connection on or off. New connections are enabled.
config object No Merged into the existing config.
config.field_mapping object No CRM field name to contact field (first_name, last_name, email, phone_number, memory or a custom field name). Replaces the previous mapping. Default {}. Get valid CRM field names from Get CRM schema.
config.sync_calls boolean No Push the contact and a call note after every analysed call. Default true.
config.sync_contacts boolean No Include all contacts in full sync jobs. Default true.

Credentials are encrypted at rest and are write-only: responses show masked values.

Example request#

curl -X PUT https://api.tried.com.au/update-crm-config/salesforce \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "credentials": {
      "instance_url": "https://acme.my.salesforce.com",
      "access_token": "00D5g000004XyZ!AQ0AQ8f3b2"
    },
    "config": { "field_mapping": { "Description": "memory" }, "sync_calls": true }
  }'
const res = await fetch("https://api.tried.com.au/update-crm-config/salesforce", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    credentials: {
      instance_url: "https://acme.my.salesforce.com",
      access_token: process.env.SALESFORCE_ACCESS_TOKEN,
    },
    config: { field_mapping: { Description: "memory" }, sync_calls: true },
  }),
});
const connection = await res.json();
import os, requests

res = requests.put(
    "https://api.tried.com.au/update-crm-config/salesforce",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "credentials": {
            "instance_url": "https://acme.my.salesforce.com",
            "access_token": os.environ["SALESFORCE_ACCESS_TOKEN"],
        },
        "config": {"field_mapping": {"Description": "memory"}, "sync_calls": True},
    },
)
connection = res.json()

Response#

200 OK

{
  "provider": "salesforce",
  "enabled": true,
  "mock": false,
  "credentials": {
    "instance_url": "https://acme.my.salesforce.com",
    "access_token": "******f3b2"
  },
  "required_credentials": ["instance_url", "access_token"],
  "config": {
    "field_mapping": { "Description": "memory" },
    "sync_calls": true,
    "sync_contacts": true
  },
  "last_sync_timestamp": null,
  "last_modification_timestamp": 1792396000000
}

See Get CRM config for the field table.

Errors#

Status When
400 Unknown provider or a body that fails validation, or credentials lacks a required key, for example salesforce needs instance_url.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope. Dashboard users need the admin or developer role.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.

Retell compatibility#

Retell uses POST /update-crm-config with no path parameter and a different body. Tried uses PUT /update-crm-config/{provider}.