Skip to main content
Personal Access Tokens are currently in closed beta and are feature-flagged. Contact support to request access. PATs are not available for SSO/enterprise accounts.

Overview

Personal Access Tokens (PATs) allow human users to authenticate programmatically under their own identity. Unlike service user API keys (which authenticate as a non-human service user), a PAT authenticates as you — the human user who created the token.
Token typeAuthenticates asIdentityPermissions
Service User API KeyService User (non-human)The service user’s identityThe service user’s assigned role
Personal Access TokenUser (human)Your user identityYour permissions and org memberships
All API credentials use the cog_ prefix format. Both token types are used identically in the Authorization header:
curl "https://api.devin.ai/v3/organizations/$DEVIN_ORG_ID/sessions" \
  -H "Authorization: Bearer $YOUR_PAT"

When to use PATs

PATs are designed for scenarios where you need programmatic API access as yourself:
  • Personal scripts and tooling — automate your own workflows without a shared service user
  • Local development — test API integrations using your own account
  • Short-lived automation — one-off scripts that should be attributed to you
For production integrations, CI/CD pipelines, and shared automation, use service user API keys instead. Service users provide better audit trails, centralized key management, and RBAC controls.

How it works

  1. Generate a PAT in your account settings
  2. The token starts with cog_ and is shown only once at creation time
  3. Use the token in the Authorization header — exactly like a service user API key
  4. Every API call authenticates as your user account — your permissions, org memberships, and audit trail apply

Key differences from service user API keys

AspectService User API KeyPersonal Access Token
IdentityNon-human service userYour human user account
PermissionsControlled by assigned RBAC roleInherits your existing permissions
Audit trailActions attributed to service userActions attributed to you
Key managementManaged by org/enterprise adminsManaged by you personally
Use caseProduction automation, CI/CDPersonal scripts, local tooling
AvailabilityGenerally availableClosed beta

Limitations

  • Closed beta: PATs require a feature flag to be enabled for your account
  • Not available for SSO/enterprise accounts: Currently limited to non-SSO accounts
  • Personal scope: PATs are tied to your individual account and cannot be shared

Security considerations

  • Treat PATs with the same care as passwords — they provide full access to your account
  • Store PATs in environment variables or secret managers, never in source code
  • Revoke PATs immediately if compromised
  • Use the minimum scope necessary for your use case
  • Prefer service user API keys for any shared or production automation

Next steps