Skip to main content
POST
/
access-key
curl -X POST "https://config.gms.ensync.cloud/v1/access-key" \
  -H "X-API-KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Service Key",
    "type": "SERVICE",
    "permissions": {
      "send": ["order/*", "inventory/*"],
      "receive": ["payment/*"]
    }
  }'
{
  "accessKey": "ensk_prod_xxxxxxxxxxxxx",
  "accessKeyId": "ak_123456",
  "service_key_pair": {
    "public_key": "base64-encoded-public-key",
    "private_key": "base64-encoded-private-key"
  }
}

Key Types

TypePurposeUsage
SERVICEConnect to EnSync brokerSDK clients use these to publish and subscribe to events. Corresponds to apps in EnSync’s UI.
ACCOUNTAdministrative accessUsed to manage your EnSync configuration via this Config Manager API.

Body Parameters

name
string
required
Name for the access key
type
string
required
Key type: ACCOUNT or SERVICE
permissions
object
required
Access key permissions

Response

accessKey
string
The generated access key
accessKeyId
string
The access key ID
service_key_pair
object
Service key pair for encryption (if SERVICE type)
curl -X POST "https://config.gms.ensync.cloud/v1/access-key" \
  -H "X-API-KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Service Key",
    "type": "SERVICE",
    "permissions": {
      "send": ["order/*", "inventory/*"],
      "receive": ["payment/*"]
    }
  }'
{
  "accessKey": "ensk_prod_xxxxxxxxxxxxx",
  "accessKeyId": "ak_123456",
  "service_key_pair": {
    "public_key": "base64-encoded-public-key",
    "private_key": "base64-encoded-private-key"
  }
}