# Set up ZYNT through the API

ZYNT finds companies that are ready to buy from the user and tells them why now. Its setup is a short chat about the user's business. This guide goes through that chat for the user with the REST API and a ZYNT API key, and the user watches it in the ZYNT app.

## Not a script with a key?

An AI assistant connects to ZYNT through MCP, and the user signs in with their ZYNT account in the browser. Follow https://getzynt.com/agent-setup.md instead. Never ask the user to paste an API key into a chat.

A user with no ZYNT account signs up first:

https://app.getzynt.com/sign-up?utm_source=agent-setup-md&utm_medium=ai-agent&utm_campaign=agent-setup&utm_content=no-key

## Rules

- Do it now with curl or your HTTP tool and the user's key. Write no code, scripts or branches: these calls are the whole setup.
- Send each answer once, and wait for its reply before the next.
- Answer in the language ZYNT asks in: the setup takes the language of the answers as the user's.
- Use what you know from the user's files and notes. Ask the user only what you cannot find, and never make an answer up.
- Never send passwords, keys, personal emails, phone numbers of other people, deal amounts or copied conversations.

## Calls

Every call sends the header `Authorization: Bearer <the user's ZYNT key>`; a body is JSON, with `Content-Type: application/json`.

1. Read the setup: `GET https://app.getzynt.com/api/v1/setup`.
   - `zynt_said` is what ZYNT said, its question last.
   - `answers` lists the answers it takes now: each `kind`, and what it `means`.
   - `next` is the one thing to do now. Do it.
2. Send the user's company notes once, if they have any: `POST https://app.getzynt.com/api/v1/setup/context` with `{"files":[{"name":"strategy.md","path":"strategy.md","content":"<the file's text>"}]}`. Up to 10 files a call and 20 in all, each up to 30,000 characters.
   - Send strategy and customer documents, sales materials, the ideal customer profile, context summaries and the list of current customers.
   - In a GTM Brain: strategy.md, the ideal customer profile document, and brain/contexts/{company,market,icp,offer}/context.md. Not memories.jsonl, meeting notes or entity pages.
   - Any other "company brain" or "company context" files count too.
   - If the user sells to several segments, ask which one to set up first.
   - ZYNT turns the files into guesses, and the chat then asks only what they leave open.
   - The reply holds counts only, not the question or the revision. Read the setup again (step 1) before you answer.
3. Answer: `POST https://app.getzynt.com/api/v1/setup/answer` with `{"revision": <revision from the last reply>, "answer": {"kind": "text", "text": "acme.com"}}`. Use one kind from `answers`. The reply is the setup after your answer: read its question, and answer again. Repeat until `step` is `done`.

## The steps, in order

1. `company`: the website, what the company sells, its LinkedIn page, and a phone number. Ask the user for the phone.
2. `customers`: questions about who buys, why they win and lose, and signs of a good customer. Answer from the files where they say it. For a signal ZYNT shows, answer `rate` with whether it would be useful and why. For the list of signals, answer `signals` with ids from `signal_list`.
3. `summary`: show the user `summary` and ask whether it is right. Mark each topic with `draft: true` as a draft: it rests on lines the notes call a hypothesis, so ask about it. Answer `yes` only after they agree; otherwise answer `text` with what is wrong. The yes starts the watching.
4. `connect`:
   - companies: add the companies the user sells to or wants to win with `POST https://app.getzynt.com/api/v1/companies` and `{"audience_id":"<companies_audience_id>","companies":[{"name":"Acme","website_url":"acme.com"}]}`, up to 100 a call. Rows whose `outcome` is `invalid` or `failed` were not added: fix them, or ask the user whether to go on without them. Then answer `yes`; or answer `no` to add none.
   - tools: only the user can connect their CRM and tools, at `setup_url`. Ask them to, or to skip it, and wait for their reply. Answer `yes` only after they say they connected them, `no` when they skip.
   - invite: ask whom to invite, then answer `invite` with their emails, or `no`.
5. `done`: the setup is complete; do not start another one. Tell the user ZYNT is watching, and that they open the app at `setup_url`. Read their signals with `GET https://app.getzynt.com/api/v1/signals`.

## When a call fails

Every error has `message` and `hint`: do what the hint says, and tell the user when it asks you to.

- `409 setup_changed`: the user answered in the app. Read the setup again and answer its new question.
- `409 no_open_setup`: no setup is open. The hint says what the user does: a new account signs up at https://app.getzynt.com/sign-up, a workspace set up already clicks "New scenario" at https://app.getzynt.com/settings/business.
- `400 unknown_answer`: send one of the kinds in `allowed`.

## After the setup

The same key reads ZYNT for the user. Lists are their audiences: `GET https://app.getzynt.com/api/v1/audiences` gives each `id`.

Reading a list's signals: `GET https://app.getzynt.com/api/v1/signals?audience_id=<id>&limit=100`, with `id` in `fields` if you choose fields. Send `cursor=<next_cursor>` with the same filters until `next_cursor` is null, and skip ids you already have. `received_after` is when ZYNT received the signal, as an ISO date or timestamp you work out from today; it is not when the news happened.

- News about a list ("any news", "what happened"): `GET https://app.getzynt.com/api/v1/audiences/<id>/timeline?period=7`. Nothing? Try `period=30`, then `period=90`. Tell the user which window you used. Timeline items show as soon as ZYNT finds a source; signals come later, after scoring.
- Who on a list has a reason to hear from them now: add `received_after=<7 days ago>&one_per_company=true&sort=highest-score`. Each signal's `summary` says why now; `source_url` is the source. A list added today may have no signals yet: then show its news from the timeline.
- A list they bought (a CSV): make a list with `POST https://app.getzynt.com/api/v1/audiences` and `{"name":"Acme prospects","subject_type":"company"}`. Send its rows with `POST https://app.getzynt.com/api/v1/companies` and `{"audience_id":"<the id the new list got>","companies":[{"name":"Acme","website_url":"acme.com"}]}`, up to 100 a call; rows whose `outcome` is `invalid` or `failed` were not added. Then read the list's signals of the last 90 days with `one_per_company=true`. A company with no signal in the answer has none ZYNT knows yet, and a company ZYNT watches only from today may need time: say so to the user, and never make a hook up.
- A topic across a list: add `search` and `received_after`. Search matches the words as written, with no synonyms and no AND or OR, so run a few searches (for sales hiring: hiring, recruiting, SDR, account executive), merge them by signal id, and keep only the signals that really are about the topic.
- A weekly digest: the list's signals received since the last digest, without `one_per_company`, grouped by company: by the signal's `companies` whose `is_target` is true, the ones on the user's lists. ZYNT does not schedule it: for "every Monday", set a recurring task in your own scheduler, in the user's time zone.
- Each new signal about a list, in Slack or another tool, as it comes: `POST https://app.getzynt.com/api/v1/webhooks` with `{"url":"<https URL the user gives>","events":["signal.created"],"audience_id":"<id>"}`. The answer holds a secret shown once: give it to the user. Then `POST https://app.getzynt.com/api/v1/webhooks/{id}/ping` checks the URL.
- Before a call: `GET https://app.getzynt.com/api/v1/companies/lookup?website=<site>&include=signals`, then the company's `/timeline` and `/employees`.

API reference: https://app.getzynt.com/docs#setup and https://app.getzynt.com/docs#list