Update dashboard from API POST?

Can I update a dashboard from a UDEndpoint? I have a dashboard that I load with this:

Start-UDDashboard -Endpoint $Endpoint -Dashboard $dashboard -Port 10000 -AutoReload

This is the Dashboard:

$dashboard = New-UDDashboard -Title "TestingDash" -Content {
    New-UDInput -Title "ID Number" -Endpoint {
        param($ID)
        If ($sqlData.EnrollmentStatusID -eq 7) {
                New-UDInputAction -Content @(
                    New-UDCard -Title "Access Status" -Text "Yes" -BackgroundColor "Green" -FontColor 'white'
                )
            }
            Else {
                New-UDInputAction -Content @(
                    New-UDCard -Title "Access Status" -Text "No" -BackgroundColor "Red" -FontColor 'white'
                )
            }
     }
}

I want to also be able to receive this ID number via a POST to the API Endpoint. I can already receive the number on the endpoint and store it into a variable.

$endpoint = New-UDEndpoint -Url "/process/:ID" -Method "POST" -Endpoint {
    param($ID)
    $ID #To Confirm the ID is received
    If ($ID -eq 405827068) {
        New-UDCard -Title "Access Status" -Text "Yes" -BackgroundColor "Green" -FontColor 'white'
    }
    Else {
        New-UDCard -Title "Access Status" -Text "No" -BackgroundColor "Red" -FontColor 'white'
    }
}

In that example I am feeding it a specific number, then if the number received equals the number I’m feeding it, I want it to update the dashboard to display the UDCard.

I have simplified this a bit, I think. I also found out about “Sync-UDElement” since my last post. Here is code that I think should take input on an API Endpoint, set a variable, sync an element, and run the endpoint for that element.

#region dashboard
$dashboard = New-UDDashboard -Title "ID Verification" -Content {
    New-UDInput -Title "CardHolderID" -Id "idInput" -Endpoint { 
        param(
            [string]$StudentID
        )
            
        If ($Cache:Access) {
            New-UDInputAction -Content {
                Show-UDModal -Content {
                    New-UDCard -Title "Access Status" -Text "Yes" -BackgroundColor "Green" -FontColor 'white'
                } -Persistent
                Start-Sleep -Seconds 5
                Hide-UDModal
            }
        }
        Else {
            New-UDInputAction -Content {
                Show-UDModal -Content {
                    New-UDCard -Title "Access Status" -Text "No" -BackgroundColor "Red" -FontColor 'white'
                } -Persistent
            Start-Sleep -Seconds 5
            Hide-UDModal
            }
        }
    }
    New-UDInputAction -ClearInput
}
#endregion

#region endpoint
$Endpoint = New-UDEndpoint -Url "/process/:CardNumber" -Method "POST" -Endpoint {
    param(
        $CardNumber
        )
    If ($CardNumber -eq 111) {
        $Cache:Access = $true
        Sync-UDElement -Id "idInput"
        "111"
    }
    If ($CardNumber -eq 222) {
        # $Session:Access = $false
        # Sync-UDElement -Id "idInput"
        "222"
    }
}
#endregion


#region startUDDashboard
Start-UDDashboard -Endpoint $Endpoint -Dashboard $dashboard -Port 10000
#endregion

Start-Sleep -Seconds 10

Invoke-RestMethod -Uri 'http://localhost:10000/api/process/111' -Method Post

It feels like I’m pretty close, but the error from the API Endpoint is “One or more errors occurred. (Value cannot be null. (Parameter ‘connectionId’))”

Hopefully this is simple enough for someone to be able to help me troubleshoot.