Start a discovery run
Required permissions: events:write.
ASYNCHRONOUS. Returns 202 immediately with a run whose status is running — nothing has been searched yet. Poll GET /v1/discoveries/{runId} until settledAt is non-null, then read the events that stand for its scope with GET /v1/events?discoveryRunId={runId}. settledAt is set when the run is final — searched AND every event written — and status reads completed or failed at the same instant. candidatesScreened, candidatesMatched and eventsNew are frozen execution counters; the scoped event page holds everything this run wrote — including events dated outside the lookback, as a job change dated by its start month can be — plus matching canonical events written by earlier runs.
Re-running an identical discovery is safe. Results deduplicate against everything already in the workspace, so the same accounts/signals/lookback typically returns eventsNew: 0 the second time and creates no duplicate events. That is success.
Idempotency: send Idempotency-Key on every call you might retry. Repeating the same key with the byte-identical body returns the ORIGINAL run with the same id, without starting another search, but with its CURRENT state, not a frozen copy: if the original has since completed, the replay shows status: completed and real counts. The same key with a DIFFERENT body is a 409. Keys are not scoped to a time window in this version.
A 202 does not guarantee events will follow. If none of the requested accounts are eligible — every account must be assigned to a user, which accounts created via POST /v1/accounts always are — the run still returns 202 and then immediately reads status: completed, eventsNew: 0, with error explaining why. This is the single most likely way a first-time caller sees "no events": check error before assuming discovery is still running or that your signals match nothing.
You can use new accounts and signal keys immediately. Poll the same run until settledAt is set.
Public REST and MCP usage is recorded without daily usage caps, workspace quota cutoffs or lookup quotas for now. Workspace request pacing still applies. People: by default (people: "none") a run adds no people to your workspace — its events come back with people: []. A job_change event still names the person who changed jobs; add them with POST /v1/people if you want them. Send people: "add" to have the people who matter to each event added to your workspace and listed on it.
Read blockedSignals before reporting an empty result. These outcomes apply to every signal type, including news. While a run is active, keep polling the same run. account_not_ready means Trayo could not search the account this time. After the run settles, retry the affected account IDs. company_not_found means Trayo could not identify the company from the supplied details. For company_not_found, check the named accounts before starting another discovery. If an identity is wrong, send the correct linkedinHandle with trayo_update_account over MCP, or with PATCH /v1/accounts/{id} and a workspace API key over REST. When no handle is known, send a corrected website url instead. Both need accounts:write. trayo_update_account also reports whether Trayo can now identify the company. Importing the same hostname again skips the existing account and does not update it. After the current run settles, start a new discovery for the corrected account IDs.
Each blocked entry NAMES the accounts in accountIds (the first 200 of them; accountsAffected is the true total), so a re-run can be scoped to exactly those rather than everything you sent.
Request
- Base URL: https://api.trayo.ai
- URL: https://api.trayo.ai/v1/discoveries
- Auth: HTTP bearer
Headers
Free-form string. Supported on THIS route only — no other /v1 route reads it.
Request body
Response
Run accepted (or, for a replayed Idempotency-Key, the original run's current state).
Changes
No recorded changes to this operation across all 1 revision of this API.