Skip to main content

DocsREST API and MCP server

Send to Tools API

Endpoints, auth and live samples for Audience Builder, Connect Data and CRM sync.

Base URLhttps://us-farmvision-new-api.onrender.com

Integrations: Send to Tools

Start Tool Authorization

Returns an authorizeUrl for the tool's sign-in page; it does not redirect by itself. Call it from the browser that will open that URL, with credentials included (it sets a cookie the callback checks, and the attempt expires after 5 minutes). Clay and Instantly connect with an API key instead; API keys and MCP tokens get 403, 400 if returnTo is not on a GTM Scoop web-app origin, 503 if the tool is not set up on the server. Snowflake (GTM Scoop accounts only) signs in at the account's own Snowflake host, with the OAuth client saved by Save Snowflake Setup; 409 until one is saved.

POSThttps://us-farmvision-new-api.onrender.com/api/v1/:provider/authorizeTry it

In this section

Authentication

Get API key

Signed-in web session only

This action needs a person signed in to the GTM Scoop web app. API keys and MCP tokens get 403. The browser sends its session cookie, plus the x-csrf-token header on writes; the session's access token also works as a Bearer token.

Authorization: Bearer YOUR_SESSION_TOKEN

Parameters

application/json
FieldTypeDescription
providerpathrequiredstring"apollo", "notion", "slack", "zoho", "teams" or "snowflake".
returnTobodystringFull URL the browser returns to after the sign-in. Must be on a GTM Scoop web-app origin. Default: the web app's /integrations/<provider> page.

Mounted at

/api/v1

Connect Slack, Notion, Apollo, Clay and Instantly (plus Zoho CRM, Microsoft Teams, ClickHouse and Snowflake), then send purchased records, analysis prospects or a prospect report into them. The server reads the records from data the account owns; a send request only names the source.

Try it in the playground

Signed out: 10 free tries a day with names hidden. Log in for live data.

Open playground

Related endpoints

All 23 endpoints in this section

Bearer token; connecting or disconnecting a tool needs a signed-in web session, and the OAuth callback uses a signed, single-use state.

MethodPathWhat it does
POST/api/v1/:provider/authorize

Start Tool Authorization

Returns an authorizeUrl for the tool's sign-in page; it does not redirect by itself. Call it from the browser that will open that URL, with credentials included (it sets a cookie the callback checks, and the attempt expires after 5 minutes). Clay and Instantly connect with an API key instead; API keys and MCP tokens get 403, 400 if returnTo is not on a GTM Scoop web-app origin, 503 if the tool is not set up on the server. Snowflake (GTM Scoop accounts only) signs in at the account's own Snowflake host, with the OAuth client saved by Save Snowflake Setup; 409 until one is saved.

2 parameters
  • provider (string, required) "apollo", "notion", "slack", "zoho", "teams" or "snowflake".
  • returnTo (string) Full URL the browser returns to after the sign-in. Must be on a GTM Scoop web-app origin. Default: the web app's /integrations/<provider> page.
GET/api/v1/:provider/callback

Tool OAuth Callback

Where the tool sends the browser after the person approves access; you never call it yourself. It checks the signed state against the cookie set by authorize, exchanges the code, saves the connection and redirects to returnTo with fixed codes only.

6 parameters
  • provider (string, required) "apollo", "notion", "slack", "zoho", "teams" or "snowflake".
  • code (string) Authorization code from the tool (absent when the person cancels).
  • state (string, required) The signed state from authorize. Valid for 5 minutes, once, and only in the browser that started the flow.
  • error (string) Set by the tool when the sign-in was cancelled or failed.
  • error_description (string) The tool's error text. Only used to tell a cancel from other errors; never passed on.
  • accounts-server (string) Zoho only: the sign-in host of the person's Zoho data center. Only known Zoho hosts are used.
POST/api/v1/clay/connect

Connect Clay

Checks a Clay API key with Clay, then stores it encrypted; the key is never sent back. Clay must be connected before anything can be sent to it. 400 when the key is malformed or Clay rejects it; 10 attempts per 15 minutes per account (429).

1 parameter
  • apiKey (string, required) A Clay API key (in Clay: API and CLI, then API keys). 20 to 300 characters, no spaces.
POST/api/v1/instantly/key

Save Instantly API Key

Checks an Instantly API key with Instantly, then stores it encrypted; the key is never sent back. Sends to Instantly use this key, and accountLabel is the Instantly workspace name. 400 when the key is malformed or rejected, 429 when Instantly is limiting requests or after 10 attempts in 15 minutes.

1 parameter
  • apiKey (string, required) An Instantly API key (in Instantly: Settings, then API Keys). 20 to 400 characters, no spaces.
GET/api/v1/instantly/key/status

Get Instantly Key Status

Whether an Instantly API key is saved for the account. This is Instantly's only status route; there is no /instantly/status.

Try Get Instantly Key Status in the Playground
POST/api/v1/instantly/key/disconnect

Remove Instantly API Key

Deletes the saved Instantly API key; sends to Instantly then return 404 until a key is saved again. Always returns success.

GET/api/v1/:provider/status

Get Tool Connection Status

Whether the tool is connected, with its account label and when it was connected. This reads the saved connection only and does not call the tool, so use a preview endpoint to prove the login still works. Instantly uses /instantly/key/status; Salesforce and HubSpot are under CRM Connect. Snowflake (GTM Scoop accounts only) also returns configured (a setup is saved) and connection.loginExpiresAt (when the Snowflake login ends).

1 parameter
  • provider (string, required) "clay", "apollo", "notion", "slack", "zoho", "teams", "clickhouse" or "snowflake".
Try Get Tool Connection Status in the Playground
POST/api/v1/:provider/disconnect

Disconnect Tool

Deletes the saved connection; nothing is revoked on the tool's side, so remove the app there too if needed. Disconnecting Clay also forgets the saved Clay table webhook; disconnecting Snowflake also removes the saved Snowflake setup. Always returns success.

1 parameter
  • provider (string, required) "clay", "apollo", "notion", "slack", "zoho", "teams", "clickhouse" or "snowflake".
GET/api/v1/slack/preview

Slack Workspace Preview

Reads the connected Slack workspace live: team, bot user, granted scopes and up to 12 channels, the ones the app is in first. 404 when Slack is not connected; 409 when Slack rejects the saved login, so the person must connect again.

Try Slack Workspace Preview in the Playground
GET/api/v1/apollo/preview

Apollo Account Preview

Reads the connected Apollo account live: profile, remaining credits, the first 25 saved contacts and up to 25 lists. A part the login has no permission for comes back empty with a note instead of failing; 404 when Apollo is not connected, 409 when Apollo rejects the saved login.

Try Apollo Account Preview in the Playground
GET/api/v1/notion/preview

Notion Workspace Preview

Reads the connected Notion workspace live: the connection's bot and owner, plus up to 25 databases and 25 pages. Only pages and databases the person shared with the connection are visible; 404 when Notion is not connected, 409 when Notion rejects the saved login.

Try Notion Workspace Preview in the Playground
GET/api/v1/:provider/targets

List Send Destinations

Lists where a send can go in a connected tool (channels, databases, campaigns, lists or CRM objects), to pick the target for Send to Tool. 404 when the tool is not connected (for Instantly: no API key saved), 409 when its login was rejected; 240 requests per hour per account.

1 parameter
  • provider (string, required) "notion" (databases in targets, shared pages in extra; pages take reports only), "slack" (channels), "teams" (channels, id is <team id>|<channel id>), "instantly" (campaigns), "apollo" (lists, plus "__none__" for no list), "salesforce" (Lead, Contact), "hubspot" (contacts), "zoho" (Leads, Contacts), "clickhouse" (the gtmscoop_prospects table), "snowflake" (the GTMSCOOP_PROSPECTS table) or "clay" (no list: input is "webhook", so paste the Clay table webhook URL).
Try List Send Destinations in the Playground
POST/api/v1/:provider/push

Send to Tool

Sends records or a prospect report into a connected tool. The body names the source and the server reads the records from data the account owns (a paid purchase, an analysis run's matched prospects, or chosen rows of a run); each record also gets a Domain column from its website or business email, and an invalid body is a 400 with nothing sent. Salesforce, HubSpot, Zoho CRM, ClickHouse and Snowflake need a signed-in web session (API keys get 403), and each account can send 60 times per hour.

12 parameters
  • provider (string, required) "notion", "slack", "clay", "instantly", "apollo", "salesforce", "hubspot", "zoho", "teams", "clickhouse" or "snowflake". Records per send: Notion 100; Instantly, Apollo and Clay 200; Salesforce, HubSpot, Zoho, ClickHouse and Snowflake 500; Slack and Teams post them all. Instantly and Apollo take records only, not reports. A send stops after 45 seconds and says in note how many records did not go.
  • source (string, required) "purchase", "analysis", "analysis_rows" or "report".
  • purchaseId (string) Required for purchase: a paid purchase of this account (404 if not found or unpaid).
  • dataset (string) Required for purchase: "farm", "business" or "property". 403 if the purchase has no rows for it.
  • runId (string) Required for analysis and analysis_rows: the analysis run. Only matched rows are sent, with the fields the account's plan shows on the results screen.
  • mode (string) analysis and analysis_rows: "ai", "data", "enrich" or "enrich_property". Omitted: the first of those, in that order, that has results.
  • limit (integer) purchase and analysis: how many records to send, from the first, 1 to 500. Default 100.
  • rowIndexes (array) Required for analysis_rows, and only allowed there: 1 to 500 row numbers (rowIndex, counted from 0, as in the run's results). Only those rows are sent, and only the matched ones; limit is ignored.
  • report (object) Required for report: { companyName (max 200 characters), companyUrl (max 500), summary (max 3,000), sections: [{ heading (max 120), text (max 8,000) }] (max 40) }. Notion returns the new page's url.
  • target (object) Where to send, from List Send Destinations; values are strings up to 600 characters. slack, teams, instantly: { id }. notion: { id, type: "database" or "page" } (a page for reports only). apollo: { id: list name } or omit. salesforce: { id: "Lead" or "Contact" }, default Lead. zoho: { id: "Leads" or "Contacts" }, default Leads. clickhouse: { id: "gtmscoop_prospects" } or omit. snowflake: { id: "GTMSCOOP_PROSPECTS" } or omit. hubspot: none (contacts, updated when the email already exists).
  • target.webhookUrl (string) clay: the Clay table webhook URL (https://api.clay.com/v3/sources/webhook/...). From a web session a new URL is checked and saved once Clay accepts a record; with an API key only the saved URL can be used (409 if none is saved yet, 403 if a different one is named).
  • target.authToken (string) clay: the table webhook's auth token, if it has one. Max 200 characters.
GET/api/v1/zoho/records/count

Count Zoho CRM Records

How many Leads or Contacts the connected Zoho CRM has, as Zoho counts them. Use it before importing. count is null when the Zoho login was made without the search permission Zoho's count needs (log in with Zoho again to get it); the import works either way. GTM Scoop accounts only; 404 when Zoho is not connected, 409 when the Zoho login has expired.

1 parameter
  • module (string, required) "Leads" or "Contacts" (any letter case). Anything else is a 400.
Try Count Zoho CRM Records in the Playground
POST/api/v1/zoho/enrich-sync

Import Zoho CRM Records for Enrichment

Reads up to 5,000 Leads or Contacts from the connected Zoho CRM into a new upload (named "Zoho Leads" or "Zoho Contacts"), ready to map and enrich. Columns: Zoho Id, First Name, Last Name, Company Name, Email, Phone, Title, Website, Address, City, State, ZIP, Country. truncated is true when Zoho had more records than were imported. GTM Scoop accounts only; 20 imports an hour across all tools.

2 parameters
  • module (string, required) "Leads" or "Contacts".
  • businessContext (object) Context stored with the upload for later AI analysis: { companyName, website, businessContext, updatedAt }, all strings.
POST/api/v1/instantly/enrich-sync

Import Instantly Leads for Enrichment

Reads up to 5,000 leads from Instantly, with the saved Instantly API key, into a new upload ready to map and enrich: every lead in the workspace, or one campaign's. Columns: Instantly Id, First Name, Last Name, Company Name, Email, Phone, Title, Website, Address, City, State, ZIP, Country, Personalization, plus up to 30 custom variables. Campaign ids come from List Send Destinations (provider instantly). GTM Scoop accounts only; 404 when no Instantly key is saved, 409 when Instantly rejects it.

2 parameters
  • campaignId (string) An Instantly campaign id (UUID). Omit to import every lead in the workspace. A malformed id is a 400.
  • businessContext (object) Context stored with the upload for later AI analysis: { companyName, website, businessContext, updatedAt }, all strings.
POST/api/v1/clickhouse/connect

Connect ClickHouse

Connects the account's own ClickHouse server: signs in once to check the details, then stores them encrypted (the password never comes back). The address must be HTTPS on a public host name; private, internal and IP addresses are refused. Needs a signed-in web session on a GTM Scoop account; 400 with the reason when the address, sign-in or database is wrong, 502 when the server cannot be reached.

4 parameters
  • url (string, required) The server's HTTPS address, e.g. https://abc123.us-east-1.aws.clickhouse.cloud:8443. https:// is added when missing; port 8443 when none is given.
  • username (string, required) The ClickHouse user, up to 128 characters. Give it read access to the tables to import and, to send records, CREATE TABLE and INSERT on the database.
  • password (string) The user's password, up to 512 characters.
  • database (string) The database to use: letters, digits and underscores. Default "default".
GET/api/v1/clickhouse/tables

List ClickHouse Tables

The tables and views in the connected ClickHouse database (up to 500), with ClickHouse's own row count where it keeps one (null for views). Runs read-only. GTM Scoop accounts only; 404 when ClickHouse is not connected.

Try List ClickHouse Tables in the Playground
POST/api/v1/clickhouse/enrich-sync

Import a ClickHouse Table for Enrichment

Reads up to 5,000 rows of one listed table, with every column (up to 200), into a new upload named "ClickHouse <table>", ready to map and enrich. The query runs read-only with a time limit; arrays and maps arrive as JSON text. truncated is true when the table had more rows. GTM Scoop accounts only; 404 for a table that is not in List ClickHouse Tables.

2 parameters
  • table (string, required) A table name exactly as List ClickHouse Tables returns it.
  • businessContext (object) Context stored with the upload for later AI analysis: { companyName, website, businessContext, updatedAt }, all strings.
GET/api/v1/snowflake/setup

Get Snowflake Setup

The saved Snowflake setup (never the client secret, and only the start of the client ID), the callback URL, and the statement the account's Snowflake admin runs once to create the OAuth integration GTM Scoop logs in through. configured is false and setup null until Save Snowflake Setup is called. GTM Scoop accounts only.

Try Get Snowflake Setup in the Playground
POST/api/v1/snowflake/setup

Save Snowflake Setup

Saves the OAuth client the Snowflake admin created (stored encrypted; the secret never comes back) and where records are read and written. Nothing is sent to Snowflake until Start Tool Authorization (provider snowflake). Changing the account, client or role removes an existing Snowflake login (loggedOut true); changing only the database, schema or warehouse keeps it. Needs a signed-in web session on a GTM Scoop account; 400 with the reason when a value is not valid; 10 saves per 15 minutes.

7 parameters
  • account (string, required) The Snowflake account identifier, e.g. myorg-myaccount or xy12345.us-east-1. A pasted https://<account>.snowflakecomputing.com address works too.
  • clientId (string, required) OAUTH_CLIENT_ID from SYSTEM$SHOW_OAUTH_CLIENT_SECRETS. Blank keeps the saved one for the same account.
  • clientSecret (string, required) OAUTH_CLIENT_SECRET from the same statement. Blank keeps the saved one for the same account and client.
  • database (string, required) Database to read and write: letters, digits, _ and $ (stored upper-case).
  • schema (string, required) Schema in that database, same rules.
  • warehouse (string) Warehouse to run statements on. Omit to use the user's default.
  • role (string) Role to log in with. Omit to use the user's default; Snowflake refuses ACCOUNTADMIN and SECURITYADMIN.
GET/api/v1/snowflake/tables

List Snowflake Tables

The tables and views in the saved Snowflake database and schema (up to 500), with Snowflake's row count for tables (null for views). Runs as the logged-in Snowflake user and role. GTM Scoop accounts only; 404 when Snowflake is not logged in, 409 when the login has expired or the role lacks a permission or warehouse.

Try List Snowflake Tables in the Playground
POST/api/v1/snowflake/enrich-sync

Import a Snowflake Table for Enrichment

Reads up to 5,000 rows of one listed table, with every column (up to 200), into a new upload named "Snowflake <table>", ready to map and enrich. Only reads; nothing changes in Snowflake. truncated is true when the table had more rows. GTM Scoop accounts only; 404 for a table that is not in List Snowflake Tables; 20 imports an hour across all tools.

2 parameters
  • table (string, required) A table name exactly as List Snowflake Tables returns it.
  • businessContext (object) Context stored with the upload for later AI analysis: { companyName, website, businessContext, updatedAt }, all strings.

Cookies on GTM Scoop

Essential cookies keep you signed in and the site secure, and are always on. Optional cookies (Google Analytics) help us understand how the site is used. They are on by default, except in the EU/EEA, the UK and Switzerland, where they stay off until you choose Accept All Cookies; choose Essential Cookies Only to turn them off. We do not use advertising cookies and we do not sell or share your personal information. The site works the same whichever you choose. We keep a record of your choice with the date, your IP address and the page you were on. Cookie Policy · Privacy Policy