API keys
An API key lets a script, an automation or an AI agent have AttachKeep copy a record's files now, without a browser. Keys are created and revoked on API keys. Free allows 1 active key, Workspace 3 and Agency 10. A key can copy files for every rule on the account, so give it only to tools you trust.
Creating a key
- Open Account → API keys and press Create key.
- Give it a name you will recognise later, such as "CI" or "Claude Desktop".
- Copy the key now. It is shown once; afterwards only its first characters (
attachkeep_live_3f9c…) are visible.
Keys starting with attachkeep_test_ come from a test deployment and only work there.
Using a key
Send it as a bearer token:
curl https://attachkeep.tenhatch.com/api/v1/keep \
-H "Authorization: Bearer attachkeep_live_…" \
-H "Content-Type: application/json" \
-d '{"baseId": "appXXXXXXXXXXXXXX", "tableId": "tblXXXXXXXXXXXXXX", "recordIds": ["recXXXXXXXXXXXXXX"]}'
X-API-Key: <key> works as well. Each file a call copies counts once toward the account's files for the month, the same files the automatic copying uses; files already kept are not counted. The response's usage object tells you how many files remain this month.
Rate limits
60 requests per minute per key by default. The X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers are on every response; a 429 includes Retry-After in seconds.
Revoking a key
Press Revoke next to the key. Requests with a revoked key get HTTP 401 immediately. Revoke and recreate a key if it was ever pasted somewhere public.
Errors
Every error is JSON: {"error": {"code": "...", "message": "..."}}. Codes: unauthorized (401), invalid_input (400, with details), payment_required (402, allowance used up), rate_limited (429), internal (500, retry with backoff).