roles
Version 0.1.08 opérations
Predefined and custom roles with their permissions
GET/organisations/{id}/rolesSession du tableau de bord
Paramètres
idstringpathobligatoire
Réponses
200
idstring (uuid)obligatoirekeystring | nullobligatoirePredefined role key, null for custom
namestringobligatoiredescriptionstring | nullobligatoirepredefinedbooleanobligatoirepermissionsstring[]obligatoirememberCountnumberobligatoireMembers of this organisation holding the role
Exemples de code
curl -X GET "$KONNECT_API_URL/organisations/id/roles" \
-H "Cookie: konnect_session=$KONNECT_SESSION"Exemple : 200
[
{
"id": "id",
"key": "key",
"name": "name",
"description": "description",
"predefined": true,
"permissions": [
"payments.view"
],
"memberCount": 1
}
]Create a custom role, or duplicate one with basedOnRoleId
POST/organisations/{id}/rolesSession du tableau de bord
Paramètres
idstringpathobligatoire
Corps de la requête application/json
namestringobligatoiredescriptionstringpermissionsstring[]Required unless basedOnRoleId is given
basedOnRoleIdstring (uuid)Duplicate the permissions of this role
Réponses
201
idstring (uuid)obligatoirekeystring | nullobligatoirePredefined role key, null for custom
namestringobligatoiredescriptionstring | nullobligatoirepredefinedbooleanobligatoirepermissionsstring[]obligatoirememberCountnumberobligatoireMembers of this organisation holding the role
Exemples de code
curl -X POST "$KONNECT_API_URL/organisations/id/roles" \
-H "Cookie: konnect_session=$KONNECT_SESSION" \
-H "Content-Type: application/json" \
-d '{
"name": "Statistics only",
"description": "description",
"permissions": [
"payments.view"
],
"basedOnRoleId": "basedOnRoleId"
}'Exemple : corps de la requête
{
"name": "Statistics only",
"description": "description",
"permissions": [
"payments.view"
],
"basedOnRoleId": "basedOnRoleId"
}Exemple : 201
{
"id": "id",
"key": "key",
"name": "name",
"description": "description",
"predefined": true,
"permissions": [
"payments.view"
],
"memberCount": 1
}Edit a custom role (predefined roles are fixed)
PATCH/organisations/{id}/roles/{roleId}Session du tableau de bord
Paramètres
idstringpathobligatoireroleIdstringpathobligatoire
Corps de la requête application/json
namestringdescriptionstringpermissionsstring[]
Réponses
200
idstring (uuid)obligatoirekeystring | nullobligatoirePredefined role key, null for custom
namestringobligatoiredescriptionstring | nullobligatoirepredefinedbooleanobligatoirepermissionsstring[]obligatoirememberCountnumberobligatoireMembers of this organisation holding the role
Exemples de code
curl -X PATCH "$KONNECT_API_URL/organisations/id/roles/roleId" \
-H "Cookie: konnect_session=$KONNECT_SESSION" \
-H "Content-Type: application/json" \
-d '{
"name": "name",
"description": "description",
"permissions": [
"payments.view"
]
}'Exemple : corps de la requête
{
"name": "name",
"description": "description",
"permissions": [
"payments.view"
]
}Exemple : 200
{
"id": "id",
"key": "key",
"name": "name",
"description": "description",
"predefined": true,
"permissions": [
"payments.view"
],
"memberCount": 1
}Delete a custom role that no member or pending invitation uses
DELETE/organisations/{id}/roles/{roleId}Session du tableau de bord
Paramètres
idstringpathobligatoireroleIdstringpathobligatoire
Réponses
204
Exemples de code
curl -X DELETE "$KONNECT_API_URL/organisations/id/roles/roleId" \
-H "Cookie: konnect_session=$KONNECT_SESSION"The pending ownership transfer, if any
GET/organisations/{id}/ownership-transferSession du tableau de bord
Paramètres
idstringpathobligatoire
Réponses
200
idstring (uuid)obligatoireorganisationIdstring (uuid)obligatoirefromUserIdstring (uuid)obligatoiretoUserIdstring (uuid)obligatoirestatusstringobligatoire- enum: "pending", "accepted", "cancelled"
expiresAtstring (date-time)obligatoiredecidedAtstring (date-time) | nullobligatoirecreatedAtstring (date-time)obligatoire
Exemples de code
curl -X GET "$KONNECT_API_URL/organisations/id/ownership-transfer" \
-H "Cookie: konnect_session=$KONNECT_SESSION"Exemple : 200
{
"id": "id",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"fromUserId": "fromUserId",
"toUserId": "toUserId",
"status": "pending",
"expiresAt": "2026-10-01T09:30:00.000Z",
"decidedAt": "2026-10-01T09:30:00.000Z",
"createdAt": "2026-10-01T09:30:00.000Z"
}Owner only: offer ownership to a member (requires re-authentication)
POST/organisations/{id}/ownership-transferSession du tableau de bord
Paramètres
idstringpathobligatoire
Corps de la requête application/json
toUserIdstring (uuid)obligatoireA current member of the organisation
Réponses
201
idstring (uuid)obligatoireorganisationIdstring (uuid)obligatoirefromUserIdstring (uuid)obligatoiretoUserIdstring (uuid)obligatoirestatusstringobligatoire- enum: "pending", "accepted", "cancelled"
expiresAtstring (date-time)obligatoiredecidedAtstring (date-time) | nullobligatoirecreatedAtstring (date-time)obligatoire
Exemples de code
curl -X POST "$KONNECT_API_URL/organisations/id/ownership-transfer" \
-H "Cookie: konnect_session=$KONNECT_SESSION" \
-H "Content-Type: application/json" \
-d '{
"toUserId": "toUserId"
}'Exemple : corps de la requête
{
"toUserId": "toUserId"
}Exemple : 201
{
"id": "id",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"fromUserId": "fromUserId",
"toUserId": "toUserId",
"status": "pending",
"expiresAt": "2026-10-01T09:30:00.000Z",
"decidedAt": "2026-10-01T09:30:00.000Z",
"createdAt": "2026-10-01T09:30:00.000Z"
}The new owner accepts; the former owner becomes Administrator
POST/organisations/{id}/ownership-transfer/{transferId}/acceptSession du tableau de bord
Paramètres
idstringpathobligatoiretransferIdstringpathobligatoire
Réponses
200
idstring (uuid)obligatoireorganisationIdstring (uuid)obligatoirefromUserIdstring (uuid)obligatoiretoUserIdstring (uuid)obligatoirestatusstringobligatoire- enum: "pending", "accepted", "cancelled"
expiresAtstring (date-time)obligatoiredecidedAtstring (date-time) | nullobligatoirecreatedAtstring (date-time)obligatoire
Exemples de code
curl -X POST "$KONNECT_API_URL/organisations/id/ownership-transfer/transferId/accept" \
-H "Cookie: konnect_session=$KONNECT_SESSION"Exemple : 200
{
"id": "id",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"fromUserId": "fromUserId",
"toUserId": "toUserId",
"status": "pending",
"expiresAt": "2026-10-01T09:30:00.000Z",
"decidedAt": "2026-10-01T09:30:00.000Z",
"createdAt": "2026-10-01T09:30:00.000Z"
}The owner withdraws, or the recipient declines, a pending transfer
DELETE/organisations/{id}/ownership-transfer/{transferId}Session du tableau de bord
Paramètres
idstringpathobligatoiretransferIdstringpathobligatoire
Réponses
200
idstring (uuid)obligatoireorganisationIdstring (uuid)obligatoirefromUserIdstring (uuid)obligatoiretoUserIdstring (uuid)obligatoirestatusstringobligatoire- enum: "pending", "accepted", "cancelled"
expiresAtstring (date-time)obligatoiredecidedAtstring (date-time) | nullobligatoirecreatedAtstring (date-time)obligatoire
Exemples de code
curl -X DELETE "$KONNECT_API_URL/organisations/id/ownership-transfer/transferId" \
-H "Cookie: konnect_session=$KONNECT_SESSION"Exemple : 200
{
"id": "id",
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"fromUserId": "fromUserId",
"toUserId": "toUserId",
"status": "pending",
"expiresAt": "2026-10-01T09:30:00.000Z",
"decidedAt": "2026-10-01T09:30:00.000Z",
"createdAt": "2026-10-01T09:30:00.000Z"
}