API referenceLicenses
Create license
Create a license for a user on an application instance
POST
/users/{userId}/application-instances/{applicationInstanceId}/licensescurl -X POST "https://api.corma.io/v1/users/{userId}/application-instances/-9007199254740991/licenses" \
-H "x-corma-api-key: $CORMA_OPEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"licenseTypeKeys": [
"string"
],
"licenseRoleKeys": [
"string"
],
"appAccountId": "string",
"billingStatus": "live",
"grantedAt": "2026-01-15T09:30:00Z",
"grantedById": "string",
"connectorId": "string"
}'Authorization
x-corma-api-keystringheaderrequiredColon-separated API key ID and secret:
API_KEY_ID:API_KEY_SECRET
Parameters
userIdstringpathrequiredapplicationInstanceIdintegerpathrequiredx-corma-idempotency-keystringheaderOptional client-generated key. Reusing the same key with an identical request replays the original response instead of enqueueing a duplicate task.
Body
application/json
licenseTypeKeysstring[] | nulllicenseRoleKeysstring[] | nullappAccountIdstring | nullbillingStatusenum<string> | nullOne of:liverevokedgrantedAtany of | nullgrantedByIdstring | nullconnectorIdstring | nullThe connector this licence belongs to, as
GET /connectorsreturned its identifier. Required when the application instance has several connectors; otherwise its single connector holds the licence.
Response
application/json201
OK
idnumberrequiredapplicationInstanceIdintegerrequireduserUserEmbed | nullrequiredgrantedByIdstring | nullrequiredgrantedByUserEmbed | nullrequiredgrantedAtstring<date-time> | nullrequiredbillingStatusenum<string> | nullrequiredOne of:liverevokedactivityStatusenum<string> | nullrequiredOne of:activeinactiveappInternalIdstring | nullrequiredsourcesActivitySource[]requiredconnectorIdstring | nullrequiredThe connector this licence belongs to: the id of its connection, which every connector route accepts. Null when no connector holds it.
licenseTypesKeysstring[]requiredlicenseRolesKeysstring[]requiredcreatedAtstring<date-time>requiredThe timestamp of when this resource was created. ISO 8601 format.
updatedAtstring<date-time>requiredThe timestamp of the last update to this resource. ISO 8601 format.
{
"id": 0,
"applicationInstanceId": -9007199254740991,
"user": {
"id": "string",
"type": "employee",
"email": "string",
"personalEmail": "string",
"name": "string",
"idpStatus": "active",
"hrStatus": "active",
"jobKey": "string",
"countryCode": "string",
"departmentKey": "string",
"startDate": "2026-01-15T09:30:00Z",
"terminationDate": "2026-01-15T09:30:00Z"
},
"grantedById": "string",
"grantedBy": {
"id": "string",
"type": "employee",
"email": "string",
"personalEmail": "string",
"name": "string",
"idpStatus": "active",
"hrStatus": "active",
"jobKey": "string",
"countryCode": "string",
"departmentKey": "string",
"startDate": "2026-01-15T09:30:00Z",
"terminationDate": "2026-01-15T09:30:00Z"
},
"grantedAt": "2026-01-15T09:30:00Z",
"billingStatus": "live",
"activityStatus": "active",
"appInternalId": "string",
"sources": [
{
"type": "integration_sync_unit",
"kind": "google",
"method": "api",
"syncUnitId": "string",
"label": "string",
"author": "string",
"isOriginating": true,
"firstActivityAt": "2026-01-15T09:30:00Z",
"lastActivityAt": "2026-01-15T09:30:00Z"
}
],
"connectorId": "string",
"licenseTypesKeys": [
"string"
],
"licenseRolesKeys": [
"string"
],
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-01-15T09:30:00Z"
}