Api / Channels
Method | Description |
---|---|
🔹 assign() | Assign to channel |
🔹 create() | Create channel |
🔹 delete() | Delete channel |
🔹 listMembers() | List members |
🔹 listProspects() | Find prospects |
🔹 unassign() | Unassign from channel |
🔹 update() | Update channel |
Getting started
// Place your API Key 👇 here
$sdk = new \Kronup\Sdk();
// API Call
$sdk->api()->channels();
assign()
Assign a user to a channel
#️⃣ Execute example in terminal
Request
PUT
/teams/{teamId}/channels/{channelId}/users/{userId}
Type signature
(new \Kronup\Sdk())->api()->channels()->assign(
string $team_id,
string $channel_id,
string $user_id
): \Kronup\Model\User
Parameters
Name | Type | Description |
---|---|---|
$team_id | string | Team ID |
$channel_id | string | Channel ID |
$user_id | string | User ID |
Return type
create()
Create a new channel for a team
#️⃣ Execute example in terminal
Request
POST
/teams/{teamId}/channels
Type signature
(new \Kronup\Sdk())->api()->channels()->create(
string $team_id,
\Kronup\Model\PayloadChannelCreate $payload_channel_create
): \Kronup\Model\TeamExpanded
Parameters
Name | Type | Description |
---|---|---|
$team_id | string | Team ID |
$payload_channel_create | \Kronup\Model\PayloadChannelCreate |
Return type
delete()
Delete a channel and unassign all users
#️⃣ Execute example in terminal
Request
DELETE
/teams/{teamId}/channels/{channelId}
Type signature
(new \Kronup\Sdk())->api()->channels()->delete(
string $team_id,
string $channel_id
): bool
Parameters
Name | Type | Description |
---|---|---|
$team_id | string | Team ID |
$channel_id | string | Channel ID |
Return type
bool
listMembers()
List all channel members
#️⃣ Execute example in terminal
Request
GET
/teams/{teamId}/channels/{channelId}/users
Type signature
(new \Kronup\Sdk())->api()->channels()->listMembers(
string $team_id,
string $channel_id,
[ int $page_number = 1, ]
[ int $page_size = 500 ]
): \Kronup\Model\ChannelMembersList
Parameters
Name | Type | Description |
---|---|---|
$team_id | string | Team ID |
$channel_id | string | Channel ID |
$page_number | int | [default to 1] |
$page_size | int | [default to 500] |
Return type
\Kronup\Model\ChannelMembersList
listProspects()
List 10 channel prospects
#️⃣ Execute example in terminal
Request
GET
/teams/{teamId}/channels/{channelId}/prospects
Type signature
(new \Kronup\Sdk())->api()->channels()->listProspects(
string $team_id,
string $channel_id,
[ string $user_name ]
): \Kronup\Model\ChannelProspectsList
Parameters
Name | Type | Description |
---|---|---|
$team_id | string | Team ID |
$channel_id | string | Channel ID |
$user_name | string | Wildcard for prospect user name |
Return type
\Kronup\Model\ChannelProspectsList
unassign()
Remove a user from a channel; removing the user from the default channel is the same as removing the user from the team
#️⃣ Execute example in terminal
Request
DELETE
/teams/{teamId}/channels/{channelId}/users/{userId}
Type signature
(new \Kronup\Sdk())->api()->channels()->unassign(
string $team_id,
string $channel_id,
string $user_id
): bool
Parameters
Name | Type | Description |
---|---|---|
$team_id | string | Team ID |
$channel_id | string | Channel ID |
$user_id | string | User ID |
Return type
bool
update()
Update channel details for a team
#️⃣ Execute example in terminal
Request
POST
/teams/{teamId}/channels/{channelId}
Type signature
(new \Kronup\Sdk())->api()->channels()->update(
string $team_id,
string $channel_id,
\Kronup\Model\PayloadChannelUpdate $payload_channel_update
): \Kronup\Model\TeamExpanded
Parameters
Name | Type | Description |
---|---|---|
$team_id | string | Team ID |
$channel_id | string | Channel ID |
$payload_channel_update | \Kronup\Model\PayloadChannelUpdate |