Skip to main content

Suppuo SDK — typed Python client for the suppuo.com REST API. Sister to the JS + Go SDKs.

Project description

forjio-suppuo

Typed Python client for the suppuo.com helpdesk REST API.

pip install forjio-suppuo
from forjio_suppuo import SuppuoClient

# Bearer token from token= or the SUPPUO_TOKEN env var — use an
# sk_live_... API key from Dashboard -> Settings -> API keys.
client = SuppuoClient(token="sk_live_xxx")

# Tickets — agent workspace surface
page = client.tickets.list(status="open", channel="telegram", tag="billing", q="refund")
ticket = client.tickets.get(page["tickets"][0]["id"])
client.tickets.reply(ticket["id"], body="On it!", is_internal=False)
client.tickets.update(ticket["id"], status="resolved", tags=["billing", "vip"])
tags = client.tickets.tags()  # distinct tags (autocomplete feed)

# Attachments — stage, bind to a reply, download
with open("invoice.pdf", "rb") as f:
    meta = client.attachments.upload(
        data=f.read(), filename="invoice.pdf", content_type="application/pdf"
    )
client.tickets.reply(ticket["id"], body="Attached.", attachment_ids=[meta["id"]])
file = client.attachments.download(meta["id"])  # {"data", "contentType", "filename"}

# Billing — current plan + upgrade checkout (tiers: free / starter / growth / business)
info = client.billing.get()
out = client.billing.checkout("growth")  # redirect the browser to out["hostedUrl"]

# Channels — BYO integrations
channels = client.channels.list()
client.channels.create(provider="telegram_bot", botToken="123456789:AAxxx")
client.channels.delete(channels["integrations"][0]["id"])

# Reports / settings / CSAT
summary = client.reports.summary(days=30)
automation = client.settings.get_automation()
client.settings.put_automation(auto_response_enabled=True, hide_branding=True)
csat = client.csat.stats()

# Canned replies
client.canned_replies.create(title="Refund policy", body="...")

# Public (requester) surface — no token required
out = client.public.submit_ticket(
    account_id="acc_...",
    subject="Order question",
    body="Where is my order?",
    email="customer@example.com",
)
view = client.public.get_ticket(out["accessToken"])
client.public.reply_ticket(out["accessToken"], body="Any update?")

Endpoints covered

Namespace Methods
tickets list (status / assignee / tag / channel / priority / q / limit / cursor), tags, get, create, reply (with attachment_ids), update (status / priority / assignee_sub / tags)
billing get (subscription + tier table), checkout(tier) -> hosted checkout URL
channels list, create (whatsapp_twilio / whatsapp_cloud / email_resend / telegram_bot / slack_webhook / discord_webhook), delete
reports summary(days=7|30|90)
settings get_automation, put_automation (business hours, auto-response, hide_branding)
csat stats
attachments upload (raw bytes + filename, 8MB max), download
canned_replies list, create, update, delete
public submit_ticket, get_ticket, reply_ticket (no token)

Errors raise SuppuoError carrying the API envelope's error.code (NOT_FOUND, VALIDATION_ERROR, AUTH_REQUIRED, ...), the HTTP status, and the meta.requestId.

Family

Sister to:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forjio_suppuo-0.2.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forjio_suppuo-0.2.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file forjio_suppuo-0.2.0.tar.gz.

File metadata

  • Download URL: forjio_suppuo-0.2.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for forjio_suppuo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 949057c0e20dc5adbed42748691b68c9e5fc89d62ea0f18118f688bda38fbea7
MD5 503f3b460b559ab81b40abce730ac0da
BLAKE2b-256 afa2115be5a6b796277639541694e0ed2471034c6b402b6468e2f6d1f719cf45

See more details on using hashes here.

File details

Details for the file forjio_suppuo-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: forjio_suppuo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for forjio_suppuo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 973d84284f116188939fc8e6b527d32a99c8660c13cfc9d202d42d47d2c3d2f5
MD5 60b1b491bad6d53a384211da67fc531f
BLAKE2b-256 2e907ec2b07bae11e697986661f35b6f7ca5e950e1a29911fe111cf2cdc608fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page