Common use cases
| Use case | Description |
|---|---|
| Internal services | Access private dashboards and endpoints using certificates signed by your organization’s CA |
| Dev/staging environments | Connect to environments with self-signed or private CA certificates |
| mTLS authentication | Validate server certificate chains in mutual TLS setups |
| QA/testing | Run automated tests with temporary CAs or simulated certificate chains |
| Enterprise networks | Support environments with custom trust policies or air-gapped infrastructure |
Managing certificates
Certificates are managed at the team level. Upload a certificate once, then reference it by name in any session.Upload a certificate
import AnchorBrowser from 'anchorbrowser';
import fs from 'fs';
const anchorClient = new AnchorBrowser({ apiKey: process.env.ANCHOR_API_KEY });
const certificate = await anchorClient.post('/v1/certificates', {
body: {
file: fs.createReadStream('/path/to/your-ca.crt'),
name: 'my-internal-ca',
description: 'CA for internal services',
},
});
console.log('Certificate uploaded:', certificate);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
with open('/path/to/your-ca.crt', 'rb') as f:
certificate = anchor_client.post(
'/v1/certificates',
body={
'file': f,
'name': 'my-internal-ca',
'description': 'CA for internal services',
},
)
print('Certificate uploaded:', certificate)
| Parameter | Required | Description |
|---|---|---|
file | Yes | Certificate file (.crt, .pem, .cer, .der) |
name | Yes | Unique identifier (alphanumeric, hyphens, underscores) |
description | No | Optional description (max 1000 characters) |
List certificates
import AnchorBrowser from 'anchorbrowser';
const anchorClient = new AnchorBrowser({ apiKey: process.env.ANCHOR_API_KEY });
const certificates = await anchorClient.get('/v1/certificates');
console.log('Certificates:', certificates);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
certificates = anchor_client.get('/v1/certificates')
print('Certificates:', certificates)
Delete a certificate
import AnchorBrowser from 'anchorbrowser';
const anchorClient = new AnchorBrowser({ apiKey: process.env.ANCHOR_API_KEY });
const response = await anchorClient.delete('/v1/certificates/my-internal-ca');
console.log('Deleted:', response);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
response = anchor_client.delete('/v1/certificates/my-internal-ca')
print('Deleted:', response)
Using a certificate
After uploading a certificate, reference it by name when creating a session:import AnchorBrowser from 'anchorbrowser';
const anchorClient = new AnchorBrowser({ apiKey: process.env.ANCHOR_API_KEY });
const session = await anchorClient.sessions.create({
browser: {
ca_cert: {
active: true,
name: 'my-internal-ca',
},
},
});
console.log('Session:', session.data.id);
import os
from anchorbrowser import Anchorbrowser
anchor_client = Anchorbrowser(api_key=os.getenv('ANCHOR_API_KEY'))
session = anchor_client.sessions.create(
browser={
'ca_cert': {
'active': True,
'name': 'my-internal-ca',
},
},
)
print('Session:', session.data.id)
Related capabilities
Proxy
Route traffic through proxies for network control.
Authentication
Persistent identity for seamless access to applications.

