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

Api / Teams

Method Description
🔹 assign() Assign to team
🔹 create() Create team
🔹 delete() Delete team
🔹 listAll() List all teams
🔹 listUser() List user teams
🔹 read() Fetch team
🔹 unassign() Unassign from team
🔹 update() Update team

📚 Teams API Reference

Getting started

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

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

assign()

Assign a user to a team

#️⃣ Execute example in terminal

php -f assign.php

Request

PUT /teams/{teamId}/users/{userId}

Type signature

(new \Kronup\Sdk())->api()->teams()->assign(
    string $team_id,
    string $user_id
): \Kronup\Model\User

Parameters

Name Type Description
$team_id string Team ID
$user_id string User ID

Return type

\Kronup\Model\User

🔺 Back to top


create()

Create a new team to this organization

#️⃣ Execute example in terminal

php -f create.php

Request

POST /teams

Type signature

(new \Kronup\Sdk())->api()->teams()->create(
    \Kronup\Model\PayloadTeamCreate $payload_team_create
): \Kronup\Model\TeamExpanded

Parameters

Name Type Description
$payload_team_create \Kronup\Model\PayloadTeamCreate  

Return type

\Kronup\Model\TeamExpanded

🔺 Back to top


delete()

Delete a team and unassign all users

#️⃣ Execute example in terminal

php -f delete.php

Request

DELETE /teams/{teamId}

Type signature

(new \Kronup\Sdk())->api()->teams()->delete(
    string $team_id
): bool

Parameters

Name Type Description
$team_id string Team ID

Return type

bool

🔺 Back to top


listAll()

Get a list of all organization team models

#️⃣ Execute example in terminal

php -f listAll.php

Request

GET /teams

Type signature

(new \Kronup\Sdk())->api()->teams()->listAll(
    [ int $page_number = 1, ]
    [ int $page_size = 500 ]
): \Kronup\Model\TeamsList

Parameters

Name Type Description
$page_number int [default to 1]
$page_size int [default to 500]

Return type

\Kronup\Model\TeamsList

🔺 Back to top


listUser()

Get a list of all teams this user is a part of

#️⃣ Execute example in terminal

php -f listUser.php

Request

GET /teams/users/{userId}

Type signature

(new \Kronup\Sdk())->api()->teams()->listUser(
    string $user_id,
    [ int $page_number = 1, ]
    [ int $page_size = 500 ]
): \Kronup\Model\TeamsExpandedList

Parameters

Name Type Description
$user_id string User ID
$page_number int [default to 1]
$page_size int [default to 500]

Return type

\Kronup\Model\TeamsExpandedList

🔺 Back to top


read()

Retrieve team model

#️⃣ Execute example in terminal

php -f read.php

Request

GET /teams/{teamId}

Type signature

(new \Kronup\Sdk())->api()->teams()->read(
    string $team_id
): \Kronup\Model\TeamExpanded

Parameters

Name Type Description
$team_id string Team ID

Return type

\Kronup\Model\TeamExpanded

🔺 Back to top


unassign()

Remove a user from a team

#️⃣ Execute example in terminal

php -f unassign.php

Request

DELETE /teams/{teamId}/users/{userId}

Type signature

(new \Kronup\Sdk())->api()->teams()->unassign(
    string $team_id,
    string $user_id
): bool

Parameters

Name Type Description
$team_id string Team ID
$user_id string User ID

Return type

bool

🔺 Back to top


update()

Update team details

#️⃣ Execute example in terminal

php -f update.php

Request

POST /teams/{teamId}

Type signature

(new \Kronup\Sdk())->api()->teams()->update(
    string $team_id,
    \Kronup\Model\PayloadTeamUpdate $payload_team_update
): \Kronup\Model\TeamExpanded

Parameters

Name Type Description
$team_id string Team ID
$payload_team_update \Kronup\Model\PayloadTeamUpdate  

Return type

\Kronup\Model\TeamExpanded

🔺 Back to top