Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Api / Account

Method Description
🔹 avatar() Update avatar
🔹 close() Close account
🔹 eventsList() Fetch events
🔹 read() Fetch account
🔹 update() Update account

📚 Account API Reference

Getting started

// Place your API Key 👇 here
$sdk = new \Kronup\Sdk();

// API Call
$sdk->api()->account();

avatar()

Update account avatar

#️⃣ Execute example in terminal

php -f avatar.php

Request

POST /account/avatar

Type signature

(new \Kronup\Sdk())->api()->account()->avatar(
    [ \SplFileObject $avatar ]
): \Kronup\Model\Account

Parameters

Name Type Description
$avatar \SplFileObject \SplFileObject Avatar - must be a PNG file, exactly 256x256 pixels, smaller than 200KB

Return type

\Kronup\Model\Account

🔺 Back to top


close()

Close the current Service Account. Only an organization owner or administrator can re-activate this Service Account.

#️⃣ Execute example in terminal

php -f close.php

Request

DELETE /account

Type signature

(new \Kronup\Sdk())->api()->account()->close(): bool

Parameters

This endpoint does not need any parameter.

Return type

bool

🔺 Back to top


eventsList()

Get a list of event models

#️⃣ Execute example in terminal

php -f eventsList.php

Request

GET /account/events

Type signature

(new \Kronup\Sdk())->api()->account()->eventsList(
    [ int $page_number = 1, ]
    [ int $page_size = 500, ]
    [ int $aggregate = 1 ]
): \Kronup\Model\EventsList

Parameters

Name Type Description
$page_number int [default to 1]
$page_size int [default to 500]
$aggregate int Aggregate notion events [default to 1]

Return type

\Kronup\Model\EventsList

🔺 Back to top


read()

Retrieve the current account model

#️⃣ Execute example in terminal

php -f read.php

Request

GET /account

Type signature

(new \Kronup\Sdk())->api()->account()->read(): \Kronup\Model\Account

Parameters

This endpoint does not need any parameter.

Return type

\Kronup\Model\Account

🔺 Back to top


update()

Update the current account model.

#️⃣ Execute example in terminal

php -f update.php

Request

POST /account

Type signature

(new \Kronup\Sdk())->api()->account()->update(
    \Kronup\Model\PayloadAccountUpdate $payload_account_update
): \Kronup\Model\Account

Parameters

Name Type Description
$payload_account_update \Kronup\Model\PayloadAccountUpdate  

Return type

\Kronup\Model\Account

🔺 Back to top