Authentication

Learn how to authenticate your API requests using API keys and bearer tokens.

API Keys

All API requests require authentication using an API key. Generate keys from yourworkspace's developer settings.

Key Format

API keys use the pf_live_ prefix.

Scope

API keys are scoped to your workspace. Requests authenticate to the workspace that owns the key. Each key uses explicit API scopes chosen when the key is created or rotated, and those scopes must be allowed by the workspace policy.

Write access automatically includes read access for the same resource. Scope requests that include unknown or disallowed values are rejected instead of being partially applied.

Developer settings include preset scope bundles such as read-only access and automation-focused scopes. Rotating a key creates a replacement key and revokes the previous key immediately.

Plan access changes the available workspace key surface. Free includes Limited read-only API access for projects, posts, comments, reactions, and tasks. Pro and higher include full API access, service accounts, webhooks, MCP tools, and automation.

API keys also re-check the key owner's current workspace membership and role on every request. If the user is removed from the workspace, loses access to a private resource, or no longer has the required product permission for the target action, the request is rejected even if the key still exists.

Requests that authenticate successfully but fail a scope, ownership, or live visibility check return 403 Forbidden.

Bearer Token

Include your key in theAuthorizationheader as a Bearer token:

Authorization: Bearer pf_live_YOUR_API_KEY

Alternatively, you can pass the key in the X-API-Key header:

X-API-Key: pf_live_YOUR_API_KEY

The API will return a 401 Unauthorized response if the key is missing, invalid, expired, or has been revoked.

Workspace-scoped clients may also send X-Project-Feed-Workspace with the expected workspace slug. If the header does not match the workspace that owns the API key, the request returns 403 Forbidden instead of silently operating in the key's workspace.

Code Examples

const response = await fetch('https://projectfeed.app/api/v1/projects', {
  headers: {
    'Authorization': `Bearer ${process.env.PROJECT_FEED_API_KEY}`,
  },
});
const projects = await response.json();

Security Best Practices

Keep your API key secure

Never expose your API key in client-side code or public repositories. Use environment variables and server-side requests only.

1

Use environment variables

Store API keys in environment variables, never hardcode them.

2

Server-side only

Make API calls from your backend. Never expose keys in browser JavaScript.

3

Rotate keys regularly

Rotate API keys periodically and revoke unused keys promptly.

4

Use .gitignore

Ensure .env files and any files containing keys are in your .gitignore.