Adding a Field to txt-file in kirby hook


I want to save an ID to the Pages txt-File I just created / updated. The ID will be retrieved from another Server.

Using kirby hooks, I hope it looks something like this:

kirby()->hook('', function ($page) {
    // $page->myRetreivedId() = '12345678910';

Result should be

Title: Page Title, as usual, comes from Panel input
myRetreivedId: 12345678910

Any Idea how to do this?

EDIT: Solution

$page->update(array('myRetreivedId' => '12345678910'));