Integration Model
Standalone API Keys enforce a 1-to-1 integration model:Integration Model Assumptions
Your integration must assume:- No multi-customer onboarding
- No delegated user authorisation
- No tenant switching
- No shared credentials
Design Implication
Treat the API Key as a company-level installation, not a user login or session.Authentication Responsibilities
When using Standalone API Keys, your integration is responsible for managing authentication behaviour. Your system must:- Receive the API Key from the user
- Validate API connectivity
- Associate the integration with a single company
- Maintain authentication lifecycle state
Installation and Activation Requirements
After a user provides a valid Standalone API Key, the integration must complete an activation process to verify connectivity and establish company association.Required Activation Behaviour
Integrations must:- Call the Installation endpoint after a key is provided
- Validate that authentication succeeds
- Extract the associated
company_idfrom the API response - Persist the
company_idfor future requests - Prevent the integration from entering an active state if activation fails
Error Handling Expectations
If activation fails, integrations should:- Prevent the integration from entering an active state
- Display actionable error messaging
- Allow the user to replace the API Key and retry activation
Company ID Handling
Thecompany_id links a Standalone API Key to the correct Pleo organisation and is required for most API requests.
The Company ID establishes the organisational boundary of the integration and must be treated as part of the authentication context.
Required Integration Behaviour
Integrations must:- Persist the
company_idobtained during activation - Use the correct
company_idin all subsequent API requests where required - Ensure requests are always scoped to the associated company
Validation Expectations
Integrations should prevent situations where:- An API Key is used with an incorrect
company_id - Requests are sent without organisational scoping
- A replaced API Key silently connects to a different company without confirmation
Permission and Scope Awareness
Standalone API Keys are created with predefined API scopes. Integrations should:- Validate required permissions during setup
- Surface clear errors if permissions are insufficient
- Avoid assuming full API access
API Key Updates and Re-Authentication
Users must be able to update their Standalone API Key to maintain integration access. Because API Keys may expire, be revoked, or rotated, integrations must support key replacement and revalidation.Required Integration Behaviour
Integrations must:- Allow a new API Key to replace the previous credential
- Repeat the installation and activation process after a new key is provided
- Revalidate company association using the Installation endpoint
- Verify that the new API Key contains the required API scopes
- Prevent the integration from becoming active if validation fails
Expected System Behaviour
After a key update:- The previous authentication state must be invalidated
- The new API Key must be validated
- The associated
company_idmust be confirmed or updated - Normal integration operation resumes only after successful validation
Failure and Expiry Handling
API Keys may become invalid if they:- Expire
- Are revoked
- Are replaced
- Lose permissions
- Detect authentication failures
- Notify users clearly
- Request a replacement key when required
Relationship to OAuth 2.0
Standalone API Keys shift responsibility from platform-managed authentication to integration-managed lifecycle control.| Responsibility | OAuth 2.0 | Standalone API Keys |
|---|---|---|
| Token/Key lifecycle | Managed by Pleo | Managed by integration |
| User consent | Required | Not applicable |
| Credential rotation | Automatic | Manual |
| Multi-company support | Yes | No |
| Authentication type | Access tokens | Static API key |
What Comes Next?
Related Reading
- Standalone API Keys Overview
- Standalone API Key Workflow Guide
- User Experience Guidelines for Standalone API Keys
- Security and Credential Management for Standalone API Keys
- OAuth 2.0 Overview