Fix public-api skill: use clay-api-key header (not Bearer) and refresh stale search paths#11
Open
TenSpy-ai wants to merge 1 commit into
Open
Fix public-api skill: use clay-api-key header (not Bearer) and refresh stale search paths#11TenSpy-ai wants to merge 1 commit into
TenSpy-ai wants to merge 1 commit into
Conversation
…ch paths The public-api skill instructs agents to send the key as a Bearer token, which returns 401 on every endpoint. The correct header is `clay-api-key: <key>` (verified: Bearer -> 401, clay-api-key -> 200 on /v0/me). Also refresh the stale Search endpoint paths: `/searches/fields` -> 404, now `/search/filters-mode/fields` (200); `POST /searches` -> 404, now `POST /search/filters-mode` (400, i.e. path exists and wants a body). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clay/skills/public-api/SKILL.mdtells agents to send the API key "as a Bearer token againsthttps://api.clay.com/public/v0". That returns 401 on every endpoint. The correct scheme, per Clay's own docs (https://developers.clay.com/public-api/authentication.md), is theclay-api-key: <key>header.An agent following the skill as written burns its retries on 401s and concludes the key is bad.
Verified reproduction
Key minted with
clay api-keys create(repo state:mainas of 2026-07-10):Secondary fix: stale Search endpoint paths
The skill's "What it offers" section listed old routes. Verified against the live API:
GET /searches/fields?source_type=companiesGET /search/filters-mode/fields?source_type=companiesPOST /searchesPOST /search/filters-modePagination route left to the API reference rather than asserting an unverified path.
Changes (one file)
Bearersentence with theclay-api-keyheader + a/v0/mesmoke-test.fieldsand start-search routes to the verified/search/filters-mode/...paths.🤖 Generated with Claude Code