< back to docs / api

Use AI to process this documentCopy prompt

system/discord/

This endpoint handles posting to Discord through its webhooks feature. Consider using together with API feed/ to avoid solely publishing events on a single third-party service.

Methods & Response Codes

  • GET
    • discord/ returns list of registered webhooks
  • POST
    • discord/ posts to Discord
      • 204: Discord failed
      • 404: webhook not registered
      • 503: registered webhook is inactive
    • discord/log/ posts a specially formatted message to Discord
      • 204: Discord failed
      • 404: webhook not registered
      • 503: registered webhook is inactive
    • discord/webhook/ auto-calls API discord/ => registers a webhook => auto-calls API discord/log/
      • 204: webhook already registered OR Discord failed
  • PATCH
    • discord/webhook/ (auto-calls API discord/) => enables OR disables a webhook => (auto-calls API discord/)
      • 204: registered webhook already enabled/disabled
      • 404: webhook not registered
  • DELETE

Fields

POST discord/

  • * webhook_name
  • author: max 40 characters, defaults to "Particracy Legacy"
  • avatar: image URL must be HTTPs
  • message: max 240 characters
  • cards: max 10 items
    • subheading: max 40 characters
    • * heading: max 140 characters
    • url
    • thumbnail: image URL must be HTTPs
    • summary: max 240 characters
    • columns: max 4
      • inline: TRUE (default) | FALSE
      • * heading: max 40 characters
      • * summary: max 140 characters
    • footer: max 140 characters

POST discord/log/

  • webhook_name: default "central"
  • * type: "success" | "failure" | "warning" | "neutral"
  • * message: max 240 characters

POST discord/webhook/

  • * webhook_name
  • * webhook_key
  • enabled: TRUE (default) | FALSE

PATCH discord/webhook/

  • * webhook_name
  • * handler
  • * enabled: TRUE | FALSE

DELETE discord/webhook/

  • * token
  • * webhook_name
  • * handler
  • explanation: max 240 characters

Notes

  • The "central" webhook cannot be disabled or deleted


< Back to docs / api