Skip to docs content
Browse and search
On this page

Issue a Discord link

Issue the Discord link the person opens to link Discord and join the TweetStream community. Some checkouts need it before payment; status says when.

POST/api/agent/discord-link

Authorization

  • AuthorizationstringheaderrequiredBearer authentication with your TweetStream API key: Bearer <key>.

Headers

  • X-TweetStream-Setup-ProofstringheaderrequiredThe setupProof returned by email verification. It lasts 30 minutes; after that, verify a new email code.

Body

  • familyenum<string>required

Response fields

  • checkoutIdstringoptionala string matching the pattern ^pl_[a-z0-9]{1,64}$
  • familyenum<string>required
  • nextobjectrequired
    • messagestringoptionala string at most 500 character(s) long
    • actionenum<string>required
    • methodenum<string>required
    • urlstringrequireda string matching the pattern ^(https|wss):\/\/[^\s]+$
    • whoenum<string>required
  • offerobjectoptional
    • amountDueNowobjectrequired
      • currencyenum<string>required
      • minorstringrequireda string matching the pattern ^(0|[1-9][0-9]*)$
    • modeenum<string>required
    • planNamestringrequired
    • renewalobjectrequired
      • amountobjectrequired
        • currencyenum<string>required
        • minorstringrequireda string matching the pattern ^(0|[1-9][0-9]*)$
      • atstringrequireda string to be decoded into a Date
      • billingCycleenum<string>required
      • thenAmountobjectrequired
        • currencyenum<string>required
        • minorstringrequireda string matching the pattern ^(0|[1-9][0-9]*)$
  • paymentUrlstringoptionala string matching the pattern ^(https|wss):\/\/[^\s]+$
  • reasonenum<string>required
  • statusenum<string>required
  • discordobjectrequired
    • expiresAtstringrequireda string to be decoded into a Date
    • requiredbooleanrequiredWhether the open checkout waits for the person to join before it can be paid.
    • urlstringrequireda string matching the pattern ^(https|wss):\/\/[^\s]+$

Responses

  • 200Success
  • 400Invalid request, wrong code, or the Terms were not accepted
  • 401Missing or invalid API key, or the setup proof is missing or expired
  • 403The account is restricted, or the request carried a foreign Origin
  • 404No such checkout or link, or the account has no entitlement for this product
  • 429Rate limit or activation budget reached; retry after retryAfterSeconds
  • 503Temporarily unavailable; retry later