Authentication
The YSUITE External API uses an Access Key + Secret Key pair for authentication. Both values must be sent as request headers on every call.
Generating API credentials
- Sign in to your YSUITE workspace.
- Go to Settings → API Keys.
- Click Create API Key.
- Give it a descriptive name (e.g. "CRM Integration" or "ERP Sync").
- Copy both the Access Key and Secret Key immediately — the secret is only shown once.
Using your credentials
Add both headers to every request:
GET https://api.ysuite.org/v1/contacts
x-ysuite-access-key: YOUR_ACCESS_KEY
x-ysuite-secret-key: YOUR_SECRET_KEY
Example with cURL:
curl -X GET https://api.ysuite.org/v1/contacts \
-H "x-ysuite-access-key: YOUR_ACCESS_KEY" \
-H "x-ysuite-secret-key: YOUR_SECRET_KEY"
Example with JavaScript (fetch):
const res = await fetch('https://api.ysuite.org/v1/contacts', {
headers: {
'x-ysuite-access-key': process.env.YSUITE_ACCESS_KEY,
'x-ysuite-secret-key': process.env.YSUITE_SECRET_KEY,
}
});
const { success, data } = await res.json();
Revoking credentials
Go to Settings → API Keys and click Revoke next to any key pair. Revoked credentials stop working immediately.
Security best practices
- Never commit credentials to source code or version control.
- Store both keys in environment variables at runtime.
- Create separate key pairs per integration — simplifies auditing and revocation.
- Revoke unused keys immediately.
Error: 401 Unauthorized
If you receive a { "success": false } with HTTP 401, check that:
- Both
x-ysuite-access-keyandx-ysuite-secret-keyheaders are present. - The keys have not been revoked.
- The keys belong to the correct YSUITE workspace.