Bots API
Display identities (name and avatar) used when Siar posts to Discord and Slack.
| Operation | Method and path |
|---|---|
| List bots of a team | GET /api/v1/bot |
| Create a bot identity | POST /api/v1/bot |
| Update a bot identity | PATCH /api/v1/bot/{id} |
| Delete a bot identity | DELETE /api/v1/bot/{id} |
GET
/api/v1/bot List bots of a team
bot.list · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
teamId required | query | string |
Example
curl -X GET "https://api.siaran.my/api/v1/bot?teamId=TEAM_ID" \
-H "x-api-key: $SIAR_API_KEY" Response 200
2 top-level fields
-
itemsobject[] required5 fields
-
idstring required -
teamIdstring -
namestring required -
avatarUrlstring nullable -
createdAtstring date-time
-
-
totalinteger required
POST
/api/v1/bot Create a bot identity
bot.create · requires x-api-key
Request body application/json
-
teamIdstring required -
namestring required -
avatarUrlstring nullable
Example
curl -X POST "https://api.siaran.my/api/v1/bot" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"teamId": "TEAM_ID",
"name": "Example"
}' Response 201
5 top-level fields
-
idstring required -
teamIdstring -
namestring required -
avatarUrlstring nullable -
createdAtstring date-time
PATCH
/api/v1/bot/{id} Update a bot identity
bot.update · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Request body application/json
-
namestring -
avatarUrlstring nullable
Example
curl -X PATCH "https://api.siaran.my/api/v1/bot/ID" \
-H "x-api-key: $SIAR_API_KEY" \
-H "content-type: application/json" \
-d '{
"name": "Example",
"avatarUrl": "https://example.com/file.jpg"
}' Response 200
5 top-level fields
-
idstring required -
teamIdstring -
namestring required -
avatarUrlstring nullable -
createdAtstring date-time
DELETE
/api/v1/bot/{id} Delete a bot identity
bot.delete · requires x-api-key
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id required | path | string |
Example
curl -X DELETE "https://api.siaran.my/api/v1/bot/ID" \
-H "x-api-key: $SIAR_API_KEY" Response 200
1 top-level fields
-
successboolean required