72ca99b58d
- Added @Summary/@Router/@Param/@Success/@Security annotations to all API handlers - Regenerated docs/swagger.json, docs/swagger.yaml, docs/docs.go with full endpoint definitions - Fixed generated docs.go to remove unsupported LeftDelim/RightDelim fields
2234 lines
52 KiB
YAML
2234 lines
52 KiB
YAML
basePath: /api/v1
|
|
definitions:
|
|
auth.UserProfile:
|
|
properties:
|
|
accent_color:
|
|
type: string
|
|
avatar:
|
|
type: string
|
|
bio:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
email:
|
|
type: string
|
|
id:
|
|
type: string
|
|
status:
|
|
type: string
|
|
status_text:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
auth.loginRequest:
|
|
properties:
|
|
email:
|
|
type: string
|
|
password:
|
|
type: string
|
|
type: object
|
|
auth.registerRequest:
|
|
properties:
|
|
display_name:
|
|
type: string
|
|
email:
|
|
type: string
|
|
password:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
auth.updateProfileRequest:
|
|
properties:
|
|
accent_color:
|
|
type: string
|
|
bio:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
status_text:
|
|
type: string
|
|
type: object
|
|
bot.addToServerRequest:
|
|
properties:
|
|
server_id:
|
|
type: string
|
|
type: object
|
|
bot.botResponse:
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
owner_id:
|
|
type: string
|
|
type: object
|
|
bot.botWithToken:
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
owner_id:
|
|
type: string
|
|
token:
|
|
type: string
|
|
type: object
|
|
bot.createBotRequest:
|
|
properties:
|
|
description:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
bot.createCommandRequest:
|
|
properties:
|
|
description:
|
|
type: string
|
|
name:
|
|
type: string
|
|
options: {}
|
|
server_id:
|
|
type: string
|
|
type: object
|
|
bot.slashCommandResponse:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
options: {}
|
|
server_id:
|
|
type: string
|
|
type: object
|
|
bot.updateBotRequest:
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
description:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
channel.channelResponse:
|
|
properties:
|
|
category:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
position:
|
|
type: integer
|
|
server_id:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
channel.createChannelRequest:
|
|
properties:
|
|
category:
|
|
type: string
|
|
name:
|
|
type: string
|
|
position:
|
|
type: integer
|
|
server_id:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
channel.updateChannelRequest:
|
|
properties:
|
|
category:
|
|
type: string
|
|
name:
|
|
type: string
|
|
position:
|
|
type: integer
|
|
type:
|
|
type: string
|
|
type: object
|
|
invite.createInviteRequest:
|
|
properties:
|
|
expires_hours:
|
|
type: integer
|
|
max_uses:
|
|
type: integer
|
|
type: object
|
|
invite.inviteResponse:
|
|
properties:
|
|
code:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
creator_id:
|
|
type: string
|
|
expires_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
max_uses:
|
|
type: integer
|
|
server_id:
|
|
type: string
|
|
server_name:
|
|
type: string
|
|
use_count:
|
|
type: integer
|
|
type: object
|
|
message.createMessageRequest:
|
|
properties:
|
|
content:
|
|
type: string
|
|
reply_to:
|
|
type: string
|
|
type: object
|
|
message.messageResponse:
|
|
properties:
|
|
author_display_name:
|
|
type: string
|
|
author_id:
|
|
type: string
|
|
author_username:
|
|
type: string
|
|
channel_id:
|
|
type: string
|
|
content:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
edited_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
type: object
|
|
message.updateMessageRequest:
|
|
properties:
|
|
content:
|
|
type: string
|
|
type: object
|
|
reaction.addReactionRequest:
|
|
properties:
|
|
emoji:
|
|
type: string
|
|
type: object
|
|
reaction.emojiGroup:
|
|
properties:
|
|
count:
|
|
type: integer
|
|
details:
|
|
items:
|
|
$ref: '#/definitions/reaction.reactionResponse'
|
|
type: array
|
|
emoji:
|
|
type: string
|
|
users:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
reaction.reactionResponse:
|
|
properties:
|
|
created_at:
|
|
type: string
|
|
emoji:
|
|
type: string
|
|
id:
|
|
type: string
|
|
message_id:
|
|
type: string
|
|
user_id:
|
|
type: string
|
|
type: object
|
|
server.createServerRequest:
|
|
properties:
|
|
icon:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
server.serverResponse:
|
|
properties:
|
|
icon:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
owner_id:
|
|
type: string
|
|
type: object
|
|
server.updateServerRequest:
|
|
properties:
|
|
icon:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
voice.tokenRequest:
|
|
properties:
|
|
room_name:
|
|
type: string
|
|
type: object
|
|
voice.tokenResponse:
|
|
properties:
|
|
livekit_url:
|
|
type: string
|
|
token:
|
|
type: string
|
|
type: object
|
|
webhook.createWebhookRequest:
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
webhook.executeWebhookRequest:
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
content:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
webhook.webhookResponse:
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
channel_id:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
created_by:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
webhook.webhookWithToken:
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
channel_id:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
created_by:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
token:
|
|
type: string
|
|
type: object
|
|
host: localhost:8080
|
|
info:
|
|
contact: {}
|
|
description: A chaotic, self-hosted Discord-like platform API
|
|
title: Dumpster API
|
|
version: "1.0"
|
|
paths:
|
|
/auth/login/password:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Authenticate with email and password
|
|
parameters:
|
|
- description: Login credentials
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/auth.loginRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Login with email and password
|
|
tags:
|
|
- auth
|
|
/auth/logout:
|
|
post:
|
|
description: End the current session
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
summary: Logout
|
|
tags:
|
|
- auth
|
|
/auth/me:
|
|
get:
|
|
description: Get the authenticated user's profile
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/auth.UserProfile'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Get current user profile
|
|
tags:
|
|
- auth
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update the authenticated user's profile
|
|
parameters:
|
|
- description: Profile update data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/auth.updateProfileRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/auth.UserProfile'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Update current user profile
|
|
tags:
|
|
- auth
|
|
/auth/register:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new user account
|
|
parameters:
|
|
- description: Registration data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/auth.registerRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"409":
|
|
description: Conflict
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Register a new user
|
|
tags:
|
|
- auth
|
|
/auth/webauthn/login/begin:
|
|
post:
|
|
description: Start passkey authentication
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: WebAuthn login options
|
|
schema:
|
|
type: object
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Begin passkey login
|
|
tags:
|
|
- webauthn
|
|
/auth/webauthn/login/finish:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Complete passkey authentication
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Finish passkey login
|
|
tags:
|
|
- webauthn
|
|
/auth/webauthn/register/begin:
|
|
post:
|
|
description: Start passkey registration for an authenticated user
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: WebAuthn registration options
|
|
schema:
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Begin passkey registration
|
|
tags:
|
|
- webauthn
|
|
/auth/webauthn/register/finish:
|
|
post:
|
|
description: Complete passkey registration
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Finish passkey registration
|
|
tags:
|
|
- webauthn
|
|
/bots:
|
|
get:
|
|
description: List all bots owned by the current user
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/bot.botResponse'
|
|
type: array
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: List bots
|
|
tags:
|
|
- bots
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new bot
|
|
parameters:
|
|
- description: Bot data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/bot.createBotRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/bot.botWithToken'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Create a bot
|
|
tags:
|
|
- bots
|
|
/bots/{botID}:
|
|
delete:
|
|
description: Delete a bot (owner only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Delete a bot
|
|
tags:
|
|
- bots
|
|
get:
|
|
description: Get a bot by ID (owner only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/bot.botResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Get a bot
|
|
tags:
|
|
- bots
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update a bot's name, description, or avatar (owner only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
- description: Bot update data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/bot.updateBotRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/bot.botResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Update a bot
|
|
tags:
|
|
- bots
|
|
/bots/{botID}/commands:
|
|
get:
|
|
description: List all slash commands for a bot
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/bot.slashCommandResponse'
|
|
type: array
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: List bot commands
|
|
tags:
|
|
- bot commands
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new slash command for a bot
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
- description: Command data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/bot.createCommandRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/bot.slashCommandResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"409":
|
|
description: Conflict
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Create a slash command
|
|
tags:
|
|
- bot commands
|
|
/bots/{botID}/commands/{cmdID}:
|
|
delete:
|
|
description: Delete a slash command
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
- description: Command ID
|
|
in: path
|
|
name: cmdID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Delete a slash command
|
|
tags:
|
|
- bot commands
|
|
/bots/{botID}/regenerate-token:
|
|
post:
|
|
description: Regenerate a bot's API token (owner only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/bot.botWithToken'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Regenerate bot token
|
|
tags:
|
|
- bots
|
|
/bots/{botID}/servers:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Add a bot to a server
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
- description: Server data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/bot.addToServerRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Add bot to server
|
|
tags:
|
|
- bots
|
|
/bots/{botID}/servers/{serverID}:
|
|
delete:
|
|
description: Remove a bot from a server
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: botID
|
|
required: true
|
|
type: string
|
|
- description: Server ID
|
|
in: path
|
|
name: serverID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Remove bot from server
|
|
tags:
|
|
- bots
|
|
/bots/servers/{serverID}/commands:
|
|
get:
|
|
description: List all slash commands registered in a server (public)
|
|
parameters:
|
|
- description: Server ID
|
|
in: path
|
|
name: serverID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/bot.slashCommandResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: List server commands
|
|
tags:
|
|
- bot commands
|
|
/channels/{channelID}/messages:
|
|
get:
|
|
description: List messages in a channel with pagination
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
- description: Max messages to return (1-100, default 50)
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- description: Message ID to fetch messages before
|
|
in: query
|
|
name: before
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/message.messageResponse'
|
|
type: array
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: List messages
|
|
tags:
|
|
- messages
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Send a message to a channel
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
- description: Message data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/message.createMessageRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/message.messageResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Create a message
|
|
tags:
|
|
- messages
|
|
/channels/{channelID}/messages/{messageID}:
|
|
delete:
|
|
description: Delete a message (author only)
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
- description: Message ID
|
|
in: path
|
|
name: messageID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Delete a message
|
|
tags:
|
|
- messages
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Edit a message (author only)
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
- description: Message ID
|
|
in: path
|
|
name: messageID
|
|
required: true
|
|
type: string
|
|
- description: Message update data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/message.updateMessageRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/message.messageResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Update a message
|
|
tags:
|
|
- messages
|
|
/channels/{channelID}/webhooks:
|
|
get:
|
|
description: List webhooks for a channel
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/webhook.webhookResponse'
|
|
type: array
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: List webhooks
|
|
tags:
|
|
- webhooks
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new webhook for a channel
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
- description: Webhook data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/webhook.createWebhookRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/webhook.webhookWithToken'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Create a webhook
|
|
tags:
|
|
- webhooks
|
|
/invites/{code}:
|
|
get:
|
|
description: Get information about an invite by code
|
|
parameters:
|
|
- description: Invite code
|
|
in: path
|
|
name: code
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/invite.inviteResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Get invite info
|
|
tags:
|
|
- invites
|
|
/invites/{code}/join:
|
|
post:
|
|
description: Join a server using an invite code
|
|
parameters:
|
|
- description: Invite code
|
|
in: path
|
|
name: code
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"409":
|
|
description: Conflict
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Join server via invite
|
|
tags:
|
|
- invites
|
|
/messages/{messageID}/reactions:
|
|
get:
|
|
description: List reactions on a message grouped by emoji
|
|
parameters:
|
|
- description: Message ID
|
|
in: path
|
|
name: messageID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/reaction.emojiGroup'
|
|
type: array
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: List reactions
|
|
tags:
|
|
- reactions
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Add a reaction to a message
|
|
parameters:
|
|
- description: Message ID
|
|
in: path
|
|
name: messageID
|
|
required: true
|
|
type: string
|
|
- description: Reaction data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/reaction.addReactionRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/reaction.reactionResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Add a reaction
|
|
tags:
|
|
- reactions
|
|
/messages/{messageID}/reactions/{emoji}:
|
|
delete:
|
|
description: Remove a reaction from a message
|
|
parameters:
|
|
- description: Message ID
|
|
in: path
|
|
name: messageID
|
|
required: true
|
|
type: string
|
|
- description: Emoji to remove
|
|
in: path
|
|
name: emoji
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Remove a reaction
|
|
tags:
|
|
- reactions
|
|
/push/subscribe:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Subscribe to push notifications
|
|
parameters:
|
|
- description: Push subscription with endpoint, p256dh, and auth
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Subscribe to push notifications
|
|
tags:
|
|
- push
|
|
/push/unsubscribe:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Unsubscribe from push notifications
|
|
parameters:
|
|
- description: Endpoint to unsubscribe
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
type: object
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Unsubscribe from push notifications
|
|
tags:
|
|
- push
|
|
/push/vapid-public-key:
|
|
get:
|
|
description: Get the VAPID public key for push notification subscriptions
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Get VAPID public key
|
|
tags:
|
|
- push
|
|
/servers:
|
|
get:
|
|
description: List all servers the current user is a member of
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/server.serverResponse'
|
|
type: array
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: List servers
|
|
tags:
|
|
- servers
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new server
|
|
parameters:
|
|
- description: Server data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/server.createServerRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/server.serverResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Create a server
|
|
tags:
|
|
- servers
|
|
/servers/{serverID}:
|
|
delete:
|
|
description: Delete a server (owner only)
|
|
parameters:
|
|
- description: Server ID
|
|
in: path
|
|
name: serverID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Delete a server
|
|
tags:
|
|
- servers
|
|
get:
|
|
description: Get a server by ID
|
|
parameters:
|
|
- description: Server ID
|
|
in: path
|
|
name: serverID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/server.serverResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Get a server
|
|
tags:
|
|
- servers
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update a server's name or icon (owner only)
|
|
parameters:
|
|
- description: Server ID
|
|
in: path
|
|
name: serverID
|
|
required: true
|
|
type: string
|
|
- description: Server update data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/server.updateServerRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/server.serverResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Update a server
|
|
tags:
|
|
- servers
|
|
/servers/{serverID}/channels:
|
|
get:
|
|
description: List channels in a server
|
|
parameters:
|
|
- description: Server ID
|
|
in: query
|
|
name: server_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/channel.channelResponse'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: List channels
|
|
tags:
|
|
- channels
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new channel in a server
|
|
parameters:
|
|
- description: Channel data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/channel.createChannelRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/channel.channelResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Create a channel
|
|
tags:
|
|
- channels
|
|
/servers/{serverID}/channels/{channelID}:
|
|
delete:
|
|
description: Delete a channel (server owner only)
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Delete a channel
|
|
tags:
|
|
- channels
|
|
get:
|
|
description: Get a channel by ID
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/channel.channelResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Get a channel
|
|
tags:
|
|
- channels
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update a channel's properties
|
|
parameters:
|
|
- description: Channel ID
|
|
in: path
|
|
name: channelID
|
|
required: true
|
|
type: string
|
|
- description: Channel update data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/channel.updateChannelRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/channel.channelResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Update a channel
|
|
tags:
|
|
- channels
|
|
/servers/{serverID}/invites:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create an invite code for a server
|
|
parameters:
|
|
- description: Server ID
|
|
in: path
|
|
name: serverID
|
|
required: true
|
|
type: string
|
|
- description: Invite options
|
|
in: body
|
|
name: body
|
|
schema:
|
|
$ref: '#/definitions/invite.createInviteRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/invite.inviteResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Create an invite
|
|
tags:
|
|
- invites
|
|
/voice/rooms/{roomID}/participants:
|
|
get:
|
|
description: Get participants in a voice room
|
|
parameters:
|
|
- description: Room ID
|
|
in: path
|
|
name: roomID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
type: object
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Get voice room participants
|
|
tags:
|
|
- voice
|
|
/voice/token:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Get a LiveKit access token for a voice room
|
|
parameters:
|
|
- description: Room data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/voice.tokenRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/voice.tokenResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Get voice token
|
|
tags:
|
|
- voice
|
|
/webhooks/{webhookID}:
|
|
delete:
|
|
description: Delete a webhook
|
|
parameters:
|
|
- description: Webhook ID
|
|
in: path
|
|
name: webhookID
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
security:
|
|
- SessionAuth: []
|
|
summary: Delete a webhook
|
|
tags:
|
|
- webhooks
|
|
/webhooks/{webhookID}/{token}:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Execute a webhook to send a message (no auth required)
|
|
parameters:
|
|
- description: Webhook ID
|
|
in: path
|
|
name: webhookID
|
|
required: true
|
|
type: string
|
|
- description: Webhook token
|
|
in: path
|
|
name: token
|
|
required: true
|
|
type: string
|
|
- description: Message data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/webhook.executeWebhookRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Execute a webhook
|
|
tags:
|
|
- webhooks
|
|
schemes:
|
|
- http
|
|
- https
|
|
securityDefinitions:
|
|
SessionAuth:
|
|
in: cookie
|
|
name: dumpster_session
|
|
type: apiKey
|
|
swagger: "2.0"
|