Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Slack Engineering 11 min read Opinion mediumAdept

How We Design Our APIs at Slack

Slack's public API design rests on six principles: do one thing well, minimize time to first "Hello world", keep naming consistent, return meaningful errors, design for scale, and avoid breaking changes. Concrete lessons include splitting the bloated rtm.start into rtm.connect and replacing channels.list's nested member collections with conversations.list and conversations.members once teams grew to tens of thousands of users. The recommendations are to paginate or bound collections from the start, never nest large collections, and rate limit. New APIs go through a written spec, cross-functional review in #api-decisions and office hours, early partner feedback, and a beta before release.

Related posts

  • Slack Overflow: How We Scaled Slack to Support 1000s of Developers

    Railway mediumAdept

    Railway built a two-way bridge between Slack Connect channels and its in-house Help Station support tool, auto-creating channels when customers hit growth thresholds. Early assumptions failed: external Slack Connect users can't invoke the host's slash commands, a "!support" workaround went unused, and Socket Mode silently stopped delivering messages after deploys. The fix was to thread every message by default, classify intent as sales or support with GPT-4o-mini, let employees impersonate so replies come from real people, switch Bolt to HTTP routes, and run message processing through Temporal workflows with idempotent activities so crashes don't lose messages. Railway credits Slack with 50x better engagement and 8x faster response times than email, and is opening Slack Connect to all Pro teams.

  • Empowering Engineers with AI

    Slack Engineering easyNovice

    Slack built a set of internal generative-AI developer tools that it estimates will save 10,000+ engineering hours this year. The centrepiece is an escalation-channel bot that classifies posts into six categories using few-shot prompts, then answers from docs, channel history and canvases indexed in Amazon Bedrock Knowledge Bases, with per-channel prompts and similarity thresholds to curb hallucinations. Alongside it run an in-Slack assistant, a web app, CLI tools and a unified LLM platform with a common input/output schema plus Evaluate and Compare playgrounds. Reported results are 30% five-star bot ratings and 70%+ positive chat satisfaction, while hallucinations (~30% of interactions), weak multi-step reasoning and the tuning needed to integrate knowledge sources remain the main limits.

  • Scaling Slack’s Mobile Codebases: Modernization

    Slack Engineering mediumAdept

    Slack's year-and-a-half Duplo initiative concluded by modernizing its iOS and Android codebases: iOS moved to a custom VIPER-style feature architecture, stricter SwiftLint rules banning singletons and NotificationCenter, Combine (via CombineX until iOS 12 was dropped), and broader SlackKit adoption, while Android replaced Gson with Moshi, Android Priority Job Queue with WorkManager, and handwritten API calls with an internal Retrofit-based library, and introduced coroutines and Compose incrementally. iOS ended 68% modernized and 81% modularized with CI stability rising from 77% to 90% and average time-to-merge down 64%, Android reached 92% modularization, and local builds later dropped nearly 50% with Bazel and M1 Macs. Follow-up work includes layered module dependency rules to stop circular dependencies, possibly adopting Needle for dependency injection, and splitting Android modules into API/implementation pairs for build parallelism.

  • Role Management at Slack

    Slack Engineering mediumAdept

    Slack replaced its coarse guest/member/admin/owner hierarchy with a role-based access control system that grants granular permissions such as ARCHIVE_CHANNEL scoped to an enterprise or workspace entity. Authorization runs as ordered policy rules in the Hack monolith: deny restricted users, then check legacy preferences, then call a containerized Go permissions service over gRPC. That service reads from the same user_id-sharded Vitess store as the monolith. Clients get non-authoritative permissions via the Flannel edge cache and real-time updates in Redux. Rollout went from a loopback service to dark-mode dual reads compared in Prometheus, then light mode, and a codegen CLI built on HHAST lets other teams add roles without touching framework internals.

  • Tooling ≠ Glue: Why changing AI workflows still feels like duct tape

    Docker easyNovice

    AI pipelines built from LangChain, vector stores, embedding models and LLM providers look modular but are tightly coupled through undocumented assumptions about tokenization, prompt formats, retries and latency, so swapping one component breaks others. Leaky abstractions and the lack of interoperability standards are the cause, since MCP is still early, and notebook glue fails in production. The recommended fixes are formal interface contracts (OpenAPI, Protobuf, JSON Schema) instead of SDK lock-in, explicit error types with native retries and fallbacks, observability from the start, and declarative pipelines that let steps be swapped without rewrites.

The quest for software engineering knowledge.

Look:
Layout: