BlueSuite API

Authentication

Learn how to authenticate with the BlueSuite API

All BlueSuite API requests require authentication using an API key. This guide explains how to create and use API keys.

API Key Format

BlueSuite API keys use the following format:

wk_<workspace_hash>.<secret_key>
  • wk_ - Prefix indicating a workspace key
  • <workspace_hash> - 8-character hash identifying your workspace
  • <secret_key> - 64-character random secret

Example: wk_a1b2c3d4.e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2g3h4

Creating API Keys

  1. Log in to your BlueSuite dashboard
  2. Navigate to Settings > Integrations
  3. Click Create API Key
  4. Choose a key type based on your use case:
    • Embed Forms - For embedding forms on your website
    • Zapier - For Zapier integrations
    • REST API - For REST API v1 integrations
    • General - For custom integrations
  5. Copy and securely store your API key (it won't be shown again)

Each API key is automatically associated with the user who created it. This user is shown as the Owner in the API keys table and is used as the acting user for all write operations (e.g., created_by on new records).

Using API Keys

Include your API key in the Authorization header with a Bearer prefix:

curl -X GET https://app.bluesuite.com/api/v1/contacts \
  -H "Authorization: Bearer wk_a1b2c3d4.your_secret_key"

JavaScript Example

const response = await fetch('https://app.bluesuite.com/api/v1/contacts', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();

Python Example

import requests

headers = {
    'Authorization': f'Bearer {api_key}',
    'Content-Type': 'application/json',
}

response = requests.get(
    'https://app.bluesuite.com/api/v1/contacts',
    headers=headers
)

data = response.json()

Scopes

API keys have scopes that limit what actions they can perform:

ScopeDescription
contacts:readList and retrieve contacts
contacts:writeCreate, update, and delete contacts
requests:readList and retrieve requests
requests:writeCreate, update, and delete requests
quotes:readList and retrieve quotes
quotes:writeCreate, update, and delete quotes
jobs:readList and retrieve jobs
jobs:writeCreate, update, and delete jobs
invoices:readList and retrieve invoices
invoices:writeCreate, update, and delete invoices
events:readList and retrieve events
events:writeCreate, update, and delete events
timesheets:readList and retrieve timesheets and time entries
timesheets:writeCreate, update, and delete time entries
properties:readList and retrieve contact properties
properties:writeCreate, update, and delete contact properties
webhooks:readList webhook subscriptions
webhooks:writeCreate/delete webhook subscriptions
forms:readRead form configurations
forms:writeSubmit form data
custom_fields:readRead custom field definitions

Key Type Scopes

Different key types have different default scopes:

Key TypeScopes
Embed Formsforms:read, forms:write, webhooks:read
Zapierforms:read, forms:write, webhooks:read, webhooks:write
WordPresscustom_fields:read, forms:read, forms:write
REST APICustom scopes configured at creation time (e.g., contacts:read, quotes:write)
Generalread, write

Wildcard scopes: General keys with read or write scopes act as wildcards. A key with the read scope grants access to all :read scopes (e.g., contacts:read, quotes:read, etc.). Likewise, write grants all :write scopes.

Security Best Practices

  1. Keep keys secret - Never expose API keys in client-side code or public repositories
  2. Use appropriate scopes - Choose the key type with the minimum required permissions
  3. Rotate keys regularly - Revoke and recreate keys periodically
  4. Monitor usage - Check the "Last Used" timestamp in Settings > Integrations
  5. Revoke compromised keys - If a key is exposed, revoke it immediately

Error Responses

Invalid API Key

{
  "success": false,
  "error": "Invalid API key"
}

HTTP Status: 401 Unauthorized

Missing Scope

{
  "success": false,
  "error": "Insufficient permissions. Required scope: webhooks:write"
}

HTTP Status: 403 Forbidden

Missing User Association

{
  "success": false,
  "error": "API key must be associated with a user. Please recreate the key."
}

HTTP Status: 403 Forbidden

This occurs with API keys created before user association was introduced. Revoke the old key and create a new one to resolve this.

Rate Limited

{
  "success": false,
  "error": "Rate limit exceeded. Try again later."
}

HTTP Status: 429 Too Many Requests

Legacy API Keys

If you have API keys without the wk_ prefix (legacy format), they will continue to work but require passing a workspace_id parameter. We recommend migrating to the new format for better security.

# Legacy format (deprecated)
curl -X GET "https://app.bluesuite.com/api/webhooks/list?workspace_id=123" \
  -H "Authorization: Bearer old_key_format"

# New format (recommended)
curl -X GET https://app.bluesuite.com/api/v1/contacts \
  -H "Authorization: Bearer wk_a1b2c3d4.your_secret_key"

On this page