- You connect each integration in Statisfy’s app. The API never takes or returns a token or a credential, and it doesn’t connect an integration.
integrations:readreads. It covers everyGETon this page, everyPOST .../connection/test, and Slack’s channel check (POST .../validate).integrations:writechanges. It covers every otherPOST, and everyPATCH,PUT, andDELETE. A preview or a sample that returns the vendor’s data needsintegrations:writetoo, because that data can hold emails and other personal data.- A key that acts for a person gets either scope only when that person is an admin. See Authentication.
https://api.statisfy.com.
The usual flow
- Find what an integration has: call
GET /v1/integrations/{key}. Itssupportslists the parts of/v1/integrations/{key}that it has, such asconfigandpreview. - Test the connection: call
POST /v1/integrations/{key}/connection/test. A failed test returnssuccessfalsewith the reason. For Freshdesk, the reason is fixed text: Freshdesk’s reply is never returned. - Read the lookups, such as projects, fields, or statuses. These calls go to the vendor.
- Try a draft config with the integration’s preview. A preview writes nothing.
- Save the config with
PATCH .../config. Sendexpected_version, theversionyou read. - Set the schedule: with the integration’s own
PUT .../schedulewhere it has one, else with the monitoring row’sPUT .../schedule. - Start a run, then read it with
GET /v1/integrations/{key}/runs/{run_id}.
- A save against a config that changed is a
409. If the config changed since you read it, Statisfy returns409with the codeconflictand writes nothing. Read it again and retry. When you leave outexpected_version, Statisfy uses the version that the call reads. versionis0when the config was never saved. You then get the defaults, as the app shows them.- A change that sends no setting saves nothing for Salesforce, HubSpot, Gainsight, Zendesk, Freshdesk, and Jira. You get the config as it is, and no new version. A stale
expected_versionis still a409. For Linear and Rocketlane, a change with no setting saves a new version. - A save runs the app’s checks. A refusal is a
422with the app’s text.
202withstatusscheduled: the run starts now.200withstatusalready_running: a run is in flight. Nothing starts, and you get that run.409: the run can’t start now. For example, your CRM hasn’t synced yet, which every integration that isn’t a CRM waits for. A409that comes withRetry-Aftermeans a cooldown: retry after that many seconds.
202, or 409 while a read of that channel is in flight.
Jira, Linear, and Rocketlane have their own POST .../runs. Salesforce, HubSpot, and Gainsight start a run with the monitoring row’s Run now, such as POST /v1/integrations/monitoring/SALESFORCE/delta/runs. For them, POST /v1/integrations/{key}/runs is a 404 that names this path. See Health and runs.
Shared endpoints
Every integration has these.{key} is the integration key, such as jira or salesforce. For Slack, the key here is stella_slack.
Salesforce
PATCH .../configtakeschanges: each top-level setting with its whole new value. A key you leave out stays as it is.nullremoves a key. A key that isn’t a setting, and isn’t saved already, is a422.validate_with_apitruealso checks the filters and fields against Salesforce before the save. When Salesforce doesn’t answer that check, the call returns502and saves nothing. A filter that Salesforce refuses is a422.- Send
expected_version. If the config changed since you read it, the call returns409before it calls Salesforce. - When the config was never saved,
versionis0andsourceiscode. Statisfy’s built-in config runs then. - An Other filter is saved as the app saves it. Send
typeOtherwith alabel.GET .../configthen returns the key that the label became. - When you save an Other account filter, Statisfy schedules its monthly run if no schedule is set. If the config is saved but the run can’t be scheduled, the call returns
500that names the saved version: set the schedule withPUT .../schedule(subtypeinert). - The schedule has limits. The full sync (
default) runs daily to monthly.delta,case,email, andeinstein_meetingrun every 2, 4, 6, or 12 hours, or daily.deltakeepshourlyonly if it already runs hourly.inert(Other accounts) runs twice a month or monthly. A cadence outside its limit is a422. A change that turnsdeltaon or off against your workspace’s setting is a409. POST .../cdc/objectschanges your Salesforce org. It doesn’t turn on real-time sync in Statisfy: that iscdc_enabled, which you set withPATCH .../config. It needs the native Salesforce connection, else it’s a409. Objects that Salesforce refuses come back infailed.- A change that streams one more object in real time (
cdc_enabledorcdc_objects) needs that object selected in your org first (POST .../cdc/objects), else it’s a409. It’s also a409when the connected Salesforce user can’t read the org’s Change Data Capture settings. For both calls, a used-up Salesforce API limit is a429, and a Salesforce that doesn’t answer is a502. - A preview that Salesforce refuses or can’t answer returns
is_validfalsewith a fixed message. - Salesforce Direct (
salesforce_native) uses these/v1/integrations/salesforce/...paths for its config, previews, and Change Data Capture. - A string in a request body is at most 20,000 characters. A longer one is a
422.
HubSpot
PATCH .../configworks as Salesforce’s does. Sendchanges, and each key gets its whole new value.GET /v1/integrations/hubspot/objectsis a404. HubSpot has no object list: use the fields of an object.PUT .../schedulesets only the Other accounts sync. It takessemimonthlyormonthly, and any other cadence is a422. An entry withenabledfalseclears the schedule.- The full sync’s schedule is on the monitoring row. Use
PUT /v1/integrations/monitoring/HUBSPOT/default/schedule. - A filter that HubSpot can’t run comes back with
is_validfalseand HubSpot’s reason. - A preview takes at most 5 filter groups of 6 filters each. More is a
422, and HubSpot isn’t called. - An Other filter is saved as Salesforce’s is.
GET .../configreturns the key that itslabelbecame.
Gainsight
- The config keys are
commonand the subtype numbers.4is accounts,11product usage,13surveys, and14activity.nullremoves a key, which turns that subtype off. Another key that isn’t saved already is a422. - The schedule takes the cadences that the settings page offers, in the shared names.
defaultandsurvey_activity:dailyorweekly.activity:hourly,two_hours,four_hours,six_hours,twelve_hours, ordaily.product_usage:daily,weekly, ormonthly. Weekly takesday,hour,minute, andtimezone. Another value is a422and saves nothing. GET .../scheduleshows the saved cadence, or the default where none is saved.defaultandsurvey_activityrundaily,activityfour_hours, andproduct_usageweekly. The list is empty when Gainsight isn’t connected.enabledfalseputs a subtype back on its default.- The reporting categories come from a sample of 1,000 activities. Statisfy keeps the answer for an hour. The call returns
409when Gainsight isn’t connected. - Gainsight’s connection test is
POST /v1/integrations/gainsight/connection/test(see the shared endpoints). It never returns the key or the Gainsight host.
Zendesk
- One config serves both Zendesk connections.
POST /v1/integrations/zendesk_native/connection/testtests the other one. - At version
0, the built-in matching runs.customer_resolutionthen shows the recommended order to start from. PATCH .../configtakes up to 10 methods. Each ispayload_field,email_domain, orcontact_email, with a column underticket.*,requester.*, ororganization.*. A column takes only letters, digits, and_. Apayload_fieldneedscustom_field_key. Anything else is a422.nullsaves the recommended order, and[]turns every method off. With no method, a ticket goes to its requester’s email. Either one, on a config that was never saved, turns off the built-in matching.- New tickets use a change at once. A ticket that already has an account keeps it.
- The sample and the preview take up to 25 tickets.
sample_sizeis 20 by default. The sample returns Zendesk data, requester emails included. The preview calls nothing. It doesn’t run a method whose value is a list of more than 20 items, or that goes past 100 lookups: its error isTooManyValues. A ticket where a method was not run has no winner and doesn’t count inmatch_rate, because ingest runs that method first. A warning counts these tickets. A list of email domains is one lookup and has no item limit. A draft that the save refuses, such as more than 10 methods, is a422.
Freshdesk
- At version
0, the default chain runs. It tries the company’s CRM account ID, then its domains, then the requester’s email domain. GET .../company-fieldscalls Freshdesk. It returns502when Freshdesk refuses or doesn’t answer.- A failed connection test returns fixed text. Freshdesk’s reply is never returned.
PATCH .../configtakes up to 10 resolvers. Onlypayload_fieldandemail_domainread a dotted path, such ascompany.domains. Every other type reads one top-level ticket key, and a dotted column is a422.nullsaves the default chain as a new version, and[]matches no ticket.- The sample takes up to 20 tickets (
sample_size, 5 by default). It leaves out tickets with no company and counts them inwarnings. It returns Freshdesk data, requester emails included. - The preview calls nothing. It doesn’t run a step whose value is a list of more than 20 items, or that goes past 100 account lookups: its error is
TooManyValues. A list of email domains is one lookup and has no item limit.
Jira
- Jira Service Management projects use the
jirakey. They share Jira’s connection and config. Jira’s runs, last run, and schedule report the subtypejiraorjira_servicedesk, and thedefaultsubtype filter still matches them. - The lookups call Jira. They return
502when Jira refuses or doesn’t answer.GET .../site-urlreturnsnullwhen Jira can’t report the site. - A project that gets its first active rule starts a 30-day first sync. So does a task project that has no Statisfy project yet. The save’s
syncsays which syncs started and which didn’t. A save also locks each mapped field, so it’s read-only in the app. - When you turn
sync_issue_linkon, Statisfy creates theJIRA Linktask field. - The sample takes up to 25 issues (5 by default) and up to 50 issue types. The preview takes up to 25 issues (10 by default). A preview project with no active rule in the draft is a
422. POST .../runspulls one project inproject_keysthat has an active rule. Another project is a404. By default it pulls the issues updated in the last 30 days. Sendstart_dateandend_datetogether (YYYY-MM-DD), at most 366 days apart.
Linear
- At version
0, you get the defaults, and nothing syncs. - The lookups call Linear. They return
409when Linear isn’t connected, and502when Linear refuses or doesn’t answer. PATCH .../configchanges only the settings you send, andnullresets one. Each mapped Statisfy field becomes read-only in the app. A project has at most one active rule.- The preview takes up to 25 issues (10 by default). It returns Linear issue data.
POST .../runspulls the saved projects, or oneproject_id. Aproject_idthat isn’t in the config is a404. With no saved config, the call returns422. Sendstart_dateandend_datetogether (YYYY-MM-DD), at most 366 days apart.
Rocketlane
- At version
0, you get the defaults. They match the project’scustomer.companyNameto the account name, as the app does. - The lookups call Rocketlane. They return
502when Rocketlane refuses or doesn’t answer. InGET .../projects,truncatedistruewhen the list stops before the last project. PATCH .../configchanges only the settings you send, andnullresets one to its default. Each save also writes the Statisfy statuses from Rocketlane’s current statuses, with the groups you send inproject_status_groupsandtask_status_groups.- Once saved, the config decides. A project that no rule covers gets no account.
- Some values are refused. Only the
rocketlane_fieldandemail_domainresolver types read a dotted path, such ascustomer.companyName.rocketlane_fieldneedscustom_field_key. A resolver that can’t be built, or a statusoption_valuethat the catalogue doesn’t list, is a422. Two Rocketlane statuses with the same name are a409. - A field ID that Rocketlane no longer lists is dropped. The answer’s
warningssays so. - The preview returns Rocketlane project data.
scopesampletries up to 20 projects (5 by default).scopealltries every project and returns counts. POST .../runspulls the projects and tasks changed betweenstart_dateandend_date(both included), or everything withbootstrap. Send both dates, at most 366 days apart. It returns409when your CRM hasn’t synced yet.
Slack
- The connection test and the channel check write nothing. A workspace that isn’t installed for your Statisfy workspace returns
successfalse. - The bot’s name is at most 80 characters. The avatar must be an image on Statisfy’s CDN, which you upload in the app. Another URL is a
422. Slack shows them only whencan_customize_senderistrue. - A channel change changes nothing in Slack. An account that doesn’t exist is a
422. - A channel read has limits. While a read of the channel is in flight, a new one is a
409. In the 15 minutes after the last completed read, it’s a409withRetry-After. You can retry a failed read at once. A read that can’t be queued is a503withRetry-After. A read of a channel whose Slack workspace is no longer installed is a409. Two reads of one channel at the same time start one: the other is a409. - A backfill takes a message link or a channel ID. A message link reads that message’s thread and the 9 threads after it. A channel ID reads the last
daysdays (1 to 365, 180 by default) and keeps the 10 newest threads. - Archive makes the bot leave the channel in Slack. The channel stays in Slack, and what Statisfy read stays. Unarchive doesn’t bring the bot back: invite it in Slack.
- The auto-join rule has four parts. Send all of them, with
nullor[]for a part you don’t use. It takes up to 20 prefixes and 20 suffixes, each 3 to 80 characters. A rule runs at the next hourly Slack run. The preview returns409when Slack isn’t connected. - A read of the channel lists joins nothing. In the 10 minutes after a completed read, it’s a
409withRetry-After. It’s also a409until your first CRM sync completes, and when Slack isn’t connected.
Microsoft Teams
- A Global Administrator approves Statisfy in the app. A call to Teams returns
409when Teams isn’t connected, and422when your organization withdrew its approval. team_idis a GUID. Another value is a422. A Teams policy that blocks custom apps is a422with the fix. When Statisfy is in the team but the read of its channels wasn’t queued, the call returns503: repeat it.- When you remove Statisfy from a team, the read of its channels stops at once. What Statisfy read stays.
- One Teams run goes at a time, for all teams. While one is in flight, a refresh returns
200already_running. In the 15 minutes after a completed run, it’s a409withRetry-After.daysis 1 to 90 (30 by default). - The channel rule resets the changes made to single channels. Send both
prefixandsuffix, each at most 100 characters. An empty value is no rule. Teams doesn’t need to be connected. - Stella can’t answer in a group chat. A channel change that turns it on there is a
422. - Microsoft’s errors come back as
502or503. A502means Microsoft failed. A503means Microsoft throttles Statisfy, withRetry-Afterwhen Microsoft sends one. A500means Statisfy’s own Microsoft sign-in failed. - A refresh of a team that Statisfy isn’t in is a
409. So is a refresh after Microsoft refused the connection.
Health and runs
These endpoints are the app’s Integrations > View monitoring page.{source} and {subtype} are a row’s values from GET /v1/integrations/monitoring, such as SALESFORCE and delta.
- A row’s
statuscovers its last 5 runs. It ishealthy,degraded,failed,never_ran, ordisabled.stale_statussays when the row stopped or fell behind its schedule.schedule.layersays where the cadence comes from: your workspace (db), the integration (hardcoded), or Statisfy’s default (default). It isnonewhen no layer sets a cadence. entity_typeisaccount,opportunity,contact,project_task, oractivity.totalcounts every page. Error messages are masked. You retry a failed write in the app.- A row’s runs take
limit, 1 to 100 (10 by default). PUT .../scheduletakes one entry, with the row’ssubtype. Another subtype, or a cadence the source doesn’t take, is a422and saves nothing.enabledfalseremoves your schedule, and the row goes back to its default cadence.DELETEdoes the same.- Run now takes
start_time,end_time, andplatform_specific_data.start_timeis in the last 365 days, and a time without a zone is UTC. Give both times a zone, or neither: a mix is a422. Withend_time, the window is at most 365 days. An unknown parameter, or a window for a row whose trigger schema saysaccepts_time_windowfalse, is a422. - Run now returns
409in three cases. Your CRM hasn’t synced yet, or the row isn’t a scheduled integration, or the row’s last run completed less than 15 minutes ago. The last case comes withRetry-After. - A source and subtype that the monitoring table doesn’t list are a
404on every row endpoint.