Skip to main content

Create Integration

Overview

Creates a node-scoped integration (API key + secret). The secret is returned only once during creation — store it securely. The API key and secret are immutable after creation.

Endpoint: POST /api/v1/integrations

Authentication: Bearer token (JWT) required.


Request

Headers

HeaderRequiredDescription
AuthorizationYesBearer <your_jwt_token>
Content-TypeYesapplication/json

Body

FieldTypeRequiredValidationDescription
node_idstringYesUUIDNode UUID that the integration belongs to
namestringYes1–255 charactersDisplay name for the integration
permissionsstring[]NoPermission list (e.g. payments.read, payments.create)
expires_atstringNoISO 8601 datetimeOptional expiration date/time

Example Request

{
"node_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production API",
"permissions": ["payments.read", "payments.create"],
"expires_at": "2026-12-31T23:59:59Z"
}

Response

Success — 201 Created

FieldTypeDescription
idstringIntegration UUID
node_idstringNode UUID
namestringIntegration name
api_keystringAPI key (e.g. apex_abc123...)
secretstringPlain secret — returned only on create
permissionsstring[]Permission list
expires_atstringExpiration date (or null)
created_atstringCreation timestamp

Example Response

{
"id": "550e8400-e29b-41d4-a716-446655440001",
"node_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production API",
"api_key": "apex_abc123xyz456",
"secret": "plain_secret_returned_only_once",
"permissions": ["payments.read", "payments.create"],
"expires_at": "2026-12-31T23:59:59Z",
"created_at": "2025-02-14T10:00:00Z"
}

Error Responses

StatusDescription
400Invalid request (validation error)
401Unauthorized (missing or invalid token)
404Node not found
409API key already exists for this node
500Internal server error

cURL Example

curl -X POST https://api.example.com/api/v1/integrations \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"node_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production API",
"permissions": ["payments.read", "payments.create"]
}'