{"query":"API Authentication","corpusVersion":"local","generatedAt":"2026-11-02T05:36:54.517Z","results":[{"blockId":"public-api.authentication#api-authentication","pageId":"public-api.authentication","title":"API Authentication","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#api-authentication","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"api-authentication","kind":"api","productArea":"public_api","score":1075.6502662634985,"reasons":["search_match","exact_match","title_match","display_title_match","api_intent_match","term_match"],"markdown":"# API Authentication"},{"blockId":"public-api.authentication#api-keys","pageId":"public-api.authentication","title":"API keys","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#api-keys","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"api-keys","kind":"api","productArea":"public_api","score":748.4466190423161,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match"],"markdown":"## API keys\n\nKeys belong to a workspace. Base capability can be read-only, full access or Fieldloop submission. Project restrictions, allowed actions and expiry narrow that capability when supplied.\n\nA new Fieldloop submission key carries that workspace capability. The caller still supplies the Project and source destination, and current access is checked at intake. Previously issued restricted keys retain their restrictions.\n\nChanging access requires issuing the intended credential; renaming a key does not broaden it. Never place values in URLs, source, logs or copied agent tasks."},{"blockId":"public-api.authentication#definition","pageId":"public-api.authentication","title":"Definition","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#definition","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"definition","kind":"api","productArea":"public_api","score":697.8322044281819,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match"],"markdown":"## Definition\n\nThe gateway accepts API keys and delegated native-login access tokens on their supported routes. Browser session cookies remain the interactive app path; these credential types are not interchangeable."},{"blockId":"public-api.authentication#related-reference-pages","pageId":"public-api.authentication","title":"Related reference pages","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#related-reference-pages","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"related-reference-pages","kind":"api","productArea":"public_api","score":625.7153378710473,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match"],"markdown":"## Related reference pages\n\n{% related-card-grid title=\"Related reference pages\" %}\n- [Public API](/docs/public-api)\n- [API Conventions](/docs/public-api/conventions)\n- [API Keys and Delegated Access](/docs/admin-console/api-keys)\n{% /related-card-grid %}"},{"blockId":"public-api.authentication#access-failures","pageId":"public-api.authentication","title":"Access failures","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#access-failures","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"access-failures","kind":"api","productArea":"public_api","score":606.5808219063306,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match"],"markdown":"## Access failures\n\nFor `401`, check the credential's presence, validity and API origin. For `403`, check the workspace, Project, capability, restrictions and delegated scope. Organization IP restrictions can apply. Correct access through normal administration."},{"blockId":"public-api.authentication#request-headers","pageId":"public-api.authentication","title":"Request headers","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#request-headers","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"request-headers","kind":"api","productArea":"public_api","score":564.6447373507115,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match"],"markdown":"## Request headers\n\nSupply the credential as a bearer token. `TEAMMATELY_API_KEY` is injected by your secret mechanism; configure `PROJECT_URL` with the [quickstart](/docs/public-api/quickstart)."},{"blockId":"public-api.authentication#choose-the-credential","pageId":"public-api.authentication","title":"Choose the credential","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#choose-the-credential","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"choose-the-credential","kind":"api","productArea":"public_api","score":487.3221142937271,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match"],"markdown":"## Choose the credential\n\n| Operation | Credential boundary |\n| --- | --- |\n| Case reads | API key with Project read access |\n| Case imports/reference writes | API key with the required write access |\n| Fieldloop submission/receipts | Fieldloop capability, destination permission and original-submitter receipt ownership |\n| External Agents reads | Authorized API key, or delegated `external-agents:read` plus Project read access |\n| External Agents writes | Authorized API key, or delegated `external-agents:write` plus Project management access |\n\nFor delegated terminal access, follow [CLI Authentication](/docs/cli/authentication). Application ingestion uses an API key without browser login. A read-only MCP tool does not narrow the credential's permission elsewhere."},{"blockId":"public-api.authentication#example-read-a-case-page","pageId":"public-api.authentication","title":"Example: Read a Case page","pageTitle":"API Authentication","url":"https://teammately.ai/docs/public-api/authentication.md","humanUrl":"https://teammately.ai/docs/public-api/authentication#example-read-a-case-page","markdownUrl":"https://teammately.ai/docs/public-api/authentication.md","sectionId":"example-read-a-case-page","kind":"api","productArea":"public_api","score":477.7576802510857,"reasons":["search_match","exact_match","page_title_match","api_intent_match","term_match","prefix_or_fuzzy_match"],"markdown":"### Example: Read a Case page\n\n```sh\ncurl --fail-with-body \\\n  --header \"Authorization: Bearer ${TEAMMATELY_API_KEY}\" \\\n  \"${PROJECT_URL}/cases?limit=1&offset=0\"\n```\n\n```python\nimport os\nfrom urllib.parse import quote, urlencode\nfrom urllib.request import HTTPRedirectHandler, Request, build_opener\n\nclass NoRedirect(HTTPRedirectHandler):\n    def redirect_request(self, req, fp, code, msg, headers, newurl):\n        return None\n\nopener = build_opener(NoRedirect())\napi_key = os.environ[\"TEAMMATELY_API_KEY\"]\n\nurl = os.environ[\"PROJECT_URL\"] + \"/cases\"\nurl += \"?\" + urlencode({\"limit\": \"1\", \"offset\": \"0\"})\nheaders = {\"Authorization\": \"Bearer \" + api_key}\nrequest = Request(url, headers=headers, method=\"GET\")\nwith opener.open(request) as response:\n    print(response.read().decode(\"utf-8\"))\n```\n\n```typescript\nconst apiKey = process.env.TEAMMATELY_API_KEY!;\n\n{\n  const url = new URL(process.env.PROJECT_URL! + \"/cases\");\n  url.searchParams.set(\"limit\", \"1\");\n  url.searchParams.set(\"offset\", \"0\");\n  const response = await fetch(url, {\n    method: \"GET\",\n    redirect: \"error\",\n    headers: {\n      Authorization: `Bearer ${apiKey}`,\n    },\n  });\n  if (!response.ok) throw new Error(`HTTP ${response.status}`);\n  console.log(await response.text());\n}\n```\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"io\"\n    \"log\"\n    \"net/http\"\n    \"net/url\"\n    \"os\"\n)\n\nfunc main() {\n    if err := run(context.Background()); err != nil { log.Fatal(err) }\n}\n\nfunc run(ctx context.Context) error {\n    client := &http.Client{\n        CheckRedirect: func(req *http.Request, via []*http.Request) error {\n            return http.ErrUseLastResponse\n        },\n    }\n    {\n        target := os.Getenv(\"PROJECT_URL\") + \"/cases\"\n        query := url.Values{}\n        query.Set(\"limit\", \"1\")\n        query.Set(\"offset\", \"0\")\n        target += \"?\" + query.Encode()\n        request, err := http.NewRequestWithContext(ctx, \"GET\", target, nil)\n        if err != nil { return err }\n        request.Header.Set(\"Authorization\", \"Bearer \" + os.Getenv(\"TEAMMATELY_API_KEY\"))\n        response, err := client.Do(request)\n        if err != nil { return err }\n        payloadBytes, readErr := io.ReadAll(response.Body)\n        response.Body.Close()\n        if readErr != nil { return readErr }\n        fmt.Println(string(payloadBytes))\n        if response.StatusCode < 200 || response.StatusCode >= 300 { return fmt.Errorf(\"HTTP %d\", response.StatusCode) }\n    }\n    return nil\n}\n```"}]}