API and deploy hooks
Re-crawl your site when you deploy, and read its questions and leads from your own code.
On Starter and Pro you can re-crawl a site automatically every time you deploy, and read its questions and leads from your own scripts. Free doesn't include the API.
There are two kinds of credentials, both created under API keys in the account menu:
- Deploy hook: a URL your build tool calls after each deploy. It re-crawls one site and can do nothing else, so it's safe to paste into build settings.
- API key: for your own code. It works for every site in your team, or for one site, and is sent in the
Authorizationheader.
Only team owners and admins can create and delete them. A team can have up to 20. Each one is shown once when you create it, so copy it straight away. Only a fingerprint of it is stored. If one leaks, delete it under API keys and create a new one.
Re-crawl on every deploy
Verify your domain
Re-crawls through the API need your site's domain to be verified, as described in Install the widget.
Create a deploy hook
Open the account menu, click API keys, give the hook a name, pick the site and click Create deploy hook.
Copy the URL
Copy the hook URL. It's shown only once.
Call it after each deploy
Add it to your build tool, as shown below.
If your domain isn't verified yet, see Verify your domain.
A re-crawl reads your sitemap and queues new pages, pages that failed before, and pages whose <lastmod> date changed or that have no <lastmod>. Pages whose text didn't change aren't indexed again, so calling it on every deploy is cheap. Pages removed from the sitemap are removed from the index. Indexing then runs over the next few minutes; the site page shows the progress.
Each site can be re-crawled this way once an hour on Starter and every 10 minutes on Pro. That's separate from the Re-crawl sitemap button in the dashboard, so one doesn't use up the other. A call inside that window is answered with 429 and a Retry-After header saying how many seconds to wait. Nothing is queued, and your deploy isn't affected.
Netlify: open your site's deploy notifications, add an HTTP POST request notification for Deploy succeeded, and paste the hook URL.
Vercel: add a webhook for the deployment.succeeded event under your team's Webhooks settings, with the hook URL. If your Vercel plan doesn't include webhooks, use the GitHub Actions step below.
Cloudflare Pages: add a notification for successful Pages deployments with a webhook destination set to the hook URL.
GitHub Actions: add a last step to the job that deploys your site. Store the hook URL as a secret named TTMS_DEPLOY_HOOK:
- name: Re-crawl Talk To My Sites
run: curl -sS -X POST "${{ secrets.TTMS_DEPLOY_HOOK }}"Leave out curl's -f flag, so a call skipped by the cooldown doesn't fail the deploy.
Anything else: send a POST to the hook URL. No headers or body are needed.
curl -X POST "https://app.talktomysites.com/api/v1/hooks/recrawl/ttms_…"The API
Send an API key in the Authorization header. Every response is JSON.
curl https://app.talktomysites.com/api/v1/sites \
-H "Authorization: Bearer ttms_…"Each key can make 60 requests a minute. A key limited to one site only sees that site.
List your sites
GET /api/v1/sites returns your sites with their indexing progress. GET /api/v1/sites/:id returns one.
{
"data": [
{
"id": "abc123",
"name": "Acme Docs",
"domain": "docs.acme.com",
"sitemap_url": "https://docs.acme.com/sitemap.xml",
"domain_verified": true,
"pages": { "total": 120, "indexed": 118, "pending": 0, "failed": 2, "skipped": 0 },
"last_refreshed_at": "2026-11-29T18:00:00.000Z",
"last_api_recrawl_at": "2026-11-29T17:42:10.000Z",
"created_at": "2026-10-01T09:00:00.000Z"
}
]
}Re-crawl a site
POST /api/v1/sites/:id/recrawl does the same as a deploy hook, with the same cooldown. It answers 202:
{ "site_id": "abc123", "discovered": 120, "queued": 3, "pages": { "total": 120, "indexed": 117, "pending": 3, "failed": 0 } }discovered is the number of pages in the sitemap and queued the number that will be crawled again.
Read questions and leads
GET /api/v1/sites/:id/questions lists questions with their answers, newest first:
{
"data": [
{
"id": "f41d…",
"question": "Do you ship to Canada?",
"answer": "Yes. Orders to Canada ship within 3 days…",
"answered": true,
"sources": [{ "url": "https://docs.acme.com/shipping", "title": "Shipping" }],
"page_url": "https://docs.acme.com/faq",
"conversation_id": "k3j9…",
"rating": null,
"asked_at": "2026-11-29T17:59:58.000Z"
}
],
"next_cursor": "MTczMjkwM…"
}GET /api/v1/sites/:id/leads lists leads, newest first, with id, name, email, message, question, page_url, trigger, conversation_id and created_at.
Both take these query parameters:
limit: how many to return, up to 100. The default is 50.since: only items from this date on, as an ISO date such as2026-11-01T00:00:00Z.cursor: thenext_cursorfrom the previous response, to get the next page.next_cursorisnullon the last page.
Errors
Errors come back as { "error": "…", "code": "…" }.
400 invalid_cursor: thecursorisn't one this API returned. Usenext_cursorfrom the previous response.400 invalid_since:sinceisn't an ISO 8601 date, such as2026-11-01T00:00:00Z.401 unauthorized: the key is missing, wrong or deleted.403 plan_required: your team's plan doesn't include the API.403 api_key_required: a deploy hook key was used outside its hook URL.403 hook_key_required: an API key was used in a hook URL. Create a deploy hook instead.403 domain_unverified: verify the site's domain before re-crawling it.404 not_found: no such site, or the key can't see it.409 superseded: the site's sitemap or domain changed while the re-crawl ran, and that change started its own re-crawl.429 recrawl_cooldown: wait the number of seconds inRetry-After.429 rate_limited: more than 60 requests in a minute with this key.
To have events pushed to you instead, such as each new lead, use webhooks.