Assign an organization to an application
PATCH
/applications/{id}/assign
curl \
--request PATCH 'https://collect.your-domain.com/api/applications/sys_abc123_mail1/assign' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"organization_id":"akkbs6x2wo82"}'
Request examples
{
"organization_id": "akkbs6x2wo82"
}
Response examples (200)
{
"code": 200,
"message": "organization assigned successfully",
"data": {
"id": "sys_abc123_mail1",
"system_id": "sys_abc123",
"module_id": "mail1",
"instance_of": "mail",
"name": "Nextcloud",
"source": "ghcr.io/nethserver/nextcloud",
"display_name": "Milan Office PBX",
"node_id": 1,
"node_label": "Leader Node",
"version": "1.2.3",
"organization_id": "org_xyz789",
"organization_type": "customer",
"status": "assigned",
"inventory_data": {},
"backup_data": {},
"services_data": {},
"url": "https://cluster.example.com/cluster-admin/#/apps/mail1",
"notes": "Primary mail server for corporate domain",
"is_user_facing": true,
"created_at": "2025-07-01T09:00:00Z",
"updated_at": "2025-07-10T10:30:00Z",
"first_seen_at": "2025-06-15T08:00:00Z",
"last_inventory_at": "2025-07-21T10:25:00Z",
"deleted_at": "2026-05-04T09:42:00Z",
"rebranding_enabled": true,
"rebranding_org_id": "org_dist001",
"system": {
"id": "sys_abc123",
"name": "Production Cluster"
},
"organization": {
"id": "4405ffd0-0aca-44ef-bae2-c8545bce94f4",
"logto_id": "akkbs6x2wo82",
"name": "ACME Corp",
"description": "Main customer organization",
"type": "customer"
}
}
}
Response examples (400)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (404)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}