Bots API

Display identities (name and avatar) used when Siar posts to Discord and Slack.

OperationMethod and path
List bots of a teamGET /api/v1/bot
Create a bot identityPOST /api/v1/bot
Update a bot identityPATCH /api/v1/bot/{id}
Delete a bot identityDELETE /api/v1/bot/{id}
GET /api/v1/bot

List bots of a team

bot.list · requires x-api-key

Parameters

NameInTypeNotes
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
  • items object[] required
    5 fields
    • id string required
    • teamId string
    • name string required
    • avatarUrl string nullable
    • createdAt string date-time
  • total integer required
POST /api/v1/bot

Create a bot identity

bot.create · requires x-api-key

Request body application/json

  • teamId string required
  • name string required
  • avatarUrl string 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
  • id string required
  • teamId string
  • name string required
  • avatarUrl string nullable
  • createdAt string date-time
PATCH /api/v1/bot/{id}

Update a bot identity

bot.update · requires x-api-key

Parameters

NameInTypeNotes
id required path string

Request body application/json

  • name string
  • avatarUrl string 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
  • id string required
  • teamId string
  • name string required
  • avatarUrl string nullable
  • createdAt string date-time
DELETE /api/v1/bot/{id}

Delete a bot identity

bot.delete · requires x-api-key

Parameters

NameInTypeNotes
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
  • success boolean required