Read your first document title

You need a Focus account and Bash or Zsh with curl 7.76 or later. curl --version shows yours.

Create a key

  1. Sign in to Developer access, choose Create key, and name your integration. Keep List documents in your library selected.
  2. Choose Create API key and confirm your identity when asked. Choose Copy key and save the one-time secret in your application’s secret store.

Make your first request

Paste the command below into Bash or Zsh. When it prompts, paste your key and press Enter. The prompt hides the key.

Bash
(
  printf 'Focus API key (hidden): ' >&2
  IFS= read -rs key || exit 1
  printf '\n' >&2
  printf 'Authorization: Bearer %s\n' "$key" |
    curl --silent --show-error --fail-with-body --header @- \
      'https://couldfocus.com/api/v1/documents?limit=1'
)

In Python 3, with the key in FOCUS_API_KEY:

Python
import os, urllib.request

request = urllib.request.Request(
    "https://couldfocus.com/api/v1/documents?limit=1",
    headers={"Authorization": "Bearer " + os.environ["FOCUS_API_KEY"]})
with urllib.request.urlopen(request, timeout=20) as response:
    print(response.read().decode())

A successful request returns HTTP 200, prints one JSON object, and exits with status 0. If you have only the starter papers, you’ll see {"data":[],"next":null}. Add a document to your library to see its title, ID, processing status, and timestamps:

JSON
{"data":[{"id":"256e6440-bae3-4ec1-9e93-f2d195f0cbb4","title":"Grid cells in the entorhinal cortex","status":"ready","createdAt":"2026-11-28T16:50:03.216Z","updatedAt":"2026-11-28T16:50:03.216Z"}],"next":"256e6440-bae3-4ec1-9e93-f2d195f0cbb4"}

When more documents remain, next holds a cursor. To read the next page, pass it as after. Stop when next is null. A page holds up to 100 items. See pagination.

If the request fails, curl prints the error body and exits with status 22:

Output
{"code":"invalid_api_key","error":"Use an active Focus API key."}curl: (22) The requested URL returned error: 401

Look up the code under Errors. Send requests to couldfocus.com. Other hosts, including www.couldfocus.com, answer API paths with 404 and no JSON body.

Next steps