Skip to main content

How to Create API Keys

Generate API keys to securely connect external systems like ERP, SCADA, or custom applications to Infodeck.

Quick Summary

Click the Settings gear in the sidebar, select API Keys, click Create API Key, name it, set permissions, and copy the secret immediately — it's shown only once.


Before You Begin

Requirements
  • Professional or Enterprise plan required
  • You need api-keys:create permission
  • Secure storage for the API secret

What Are API Keys?

API keys allow external systems to:

CapabilityUse Case
Read dataExport work orders to ERP
Write dataCreate work orders from SCADA alerts
Automate workflowsSync assets between systems
Build integrationsCustom applications

Step-by-Step: Create an API Key

Step 1: Open API Key Settings

  1. Click the Settings gear icon in the sidebar (top-left)
  2. Select API Keys from the dropdown
  3. Click Create API Key

Step 2: Configure the Key

FieldRequiredDescription
NameYesDescriptive name (e.g., "ERP Integration")
PermissionsOptionalLimit what the key can access

Step 3: Create and Copy Secret

  1. Click Create
  2. Immediately copy the secret key
  3. Store securely — it won't be shown again
Critical

The API secret is displayed only once at creation. If you lose it, you must revoke the key and create a new one.

Step 4: Secure Storage

Store the API key in:

  • Environment variables
  • Secrets manager (AWS, Azure, HashiCorp)
  • Encrypted configuration files

Never store in:

  • Source code repositories
  • Plain text files
  • Shared documents

Real-World Examples

Example 1: ERP Work Order Integration

Situation: Your SAP ERP needs to receive completed work orders for cost allocation.

Solution:

  1. Create API key:
    • Name: SAP ERP Integration
    • Permissions: Read work orders, Read assets
  2. Copy secret and add to SAP configuration
  3. Configure SAP to poll Infodeck API:
    GET /organizations/{orgId}/work-orders?status=Completed
    Authorization: Bearer {api_key}
  4. Process completed work orders in SAP

Result: Completed work orders automatically sync to ERP for financial tracking.


Example 2: SCADA Alert to Work Order

Situation: Your building management system (BMS/SCADA) should create work orders when equipment faults occur.

Solution:

  1. Create API key:
    • Name: SCADA BMS Integration
    • Permissions: Create work orders
  2. Configure SCADA to POST on fault:
    POST /organizations/{orgId}/work-orders
    Authorization: Bearer {api_key}
    Body: {
    "title": "Equipment Fault - AHU-01",
    "priority": "High",
    "description": "Fault code F47 detected"
    }
  3. SCADA sends fault alerts automatically

Result: Equipment faults create maintenance work orders without manual intervention.


Example 3: Custom Mobile App

Situation: Field technicians use a custom mobile app and need to access work orders.

Solution:

  1. Create API key:
    • Name: Field Technician App
    • Permissions: Read/update work orders, Read assets
  2. Integrate into mobile app backend
  3. App calls Infodeck API for:
    • Fetch assigned work orders
    • Update work order status
    • View asset details

Result: Custom app provides tailored experience while Infodeck remains system of record.


Example 4: Data Warehouse Export

Situation: Business intelligence team needs historical data in their data warehouse for analytics.

Solution:

  1. Create API key:
    • Name: Data Warehouse ETL
    • Permissions: Read all data types
  2. Configure ETL pipeline:
    • Daily extraction at 2 AM
    • Pull work orders, assets, IoT data
    • Transform and load to warehouse
  3. Schedule automated sync

Result: BI team has access to historical Infodeck data for reports and dashboards.


Permission Scopes

Limit API key capabilities:

Available Scopes

ScopeDescription
work-orders:readView work orders
work-orders:writeCreate/update work orders
assets:readView assets and IoT devices
assets:writeCreate/update assets
locations:readView locations
forms:readView form submissions
iot:readView IoT sensor data
users:readView user information

Scope Examples

Use CaseRecommended Scopes
Read-only reportingread scopes only
Create work orderswork-orders:write, assets:read
Full syncAll relevant scopes

Managing API Keys

View All Keys

  1. Click Settings gear → API Keys
  2. See list of all keys with:
    • Name
    • Key prefix (first characters)
    • Status
    • Created date
    • Last used

View Key Details

  1. Click on key name
  2. See permissions and usage stats
  3. Note: Secret is not shown

Revoke a Key

  1. Find the key in list
  2. Click Revoke or Delete
  3. Confirm revocation
  4. Key stops working immediately
Revoking Keys

Revoking a key immediately breaks any integrations using it. Ensure you have updated external systems before revoking.


API Usage Monitoring

Track API key usage:

MetricDescription
Total CallsNumber of API requests
Success RatePercentage of successful calls
Last UsedMost recent API call
ErrorsFailed requests count

Rate Limits

PlanRate Limit
Professional100 requests/minute
Enterprise500 requests/minute

Exceeding limits returns 429 Too Many Requests.


Security Best Practices

Key Management

PracticeReason
Use descriptive namesIdentify purpose quickly
One key per integrationEasier to revoke if compromised
Minimum permissionsReduce risk surface
Regular rotationLimit exposure window

Rotation Schedule

EnvironmentRotation Frequency
DevelopmentEvery 90 days
ProductionEvery 30-90 days
After incidentImmediately

Key Rotation Process

  1. Create new key with same permissions
  2. Update external system with new key
  3. Verify new key works
  4. Revoke old key

API Documentation

Full API reference available at:

  • API Docs: docs.infodeck.io/api
  • OpenAPI Spec: Available for download
  • Postman Collection: Import for testing

Authentication

Include API key in request header:

Authorization: Bearer YOUR_API_KEY

Example Request

curl -X GET "https://api.infodeck.io/organizations/{orgId}/work-orders" \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxx" \
-H "Content-Type: application/json"

Troubleshooting

Authentication Errors

ErrorCauseSolution
401 UnauthorizedInvalid or missing keyCheck key is correct
403 ForbiddenInsufficient permissionsAdd required scopes
429 Rate LimitedToo many requestsImplement backoff

Key Not Working

IssueCauseSolution
Just createdPropagation delayWait 1-2 minutes
Was workingKey revokedCreate new key
Wrong environmentDev key in productionUse correct key

Plan Requirements

FeatureProfessionalEnterprise
API Keys
Key Limit10Unlimited
Rate Limit100/min500/min
Usage AnalyticsBasicAdvanced


Need help? Contact Infodeck Support

Was this page helpful?