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"
}
}
Access Keys
Create Access Key
Creates a new access key with specified permissions
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
| Type | Purpose | Usage |
|---|---|---|
| SERVICE | Connect to EnSync broker | SDK clients use these to publish and subscribe to events. Corresponds to apps in EnSync’s UI. |
| ACCOUNT | Administrative access | Used to manage your EnSync configuration via this Config Manager API. |
Body Parameters
string
required
Name for the access key
string
required
Key type:
ACCOUNT or SERVICEobject
required
Response
string
The generated access key
string
The access key ID
object
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"
}
}