REST API: channels
Automate email and Slack channel configuration safely.
Use the Channels API to coordinate agent email and Slack configuration from a backend provisioning flow. Read the current agent channel settings before patching them, and treat email addresses, blocked senders, and the primary address as distinct resources. A primary-address update should be followed by a readback, especially when multiple addresses are configured.
Email domain setup is a staged verification workflow. Create or list domains, request receiving setup, publish the required DNS configuration, then verify it. Do not present a requested verification as completed delivery capability; receiving can be verified or disabled through separate operations. Deleting a domain should be a deliberate deprovisioning event with a known impact on mail flow.
Slack channel discovery lists available channels for configuration; it does not by itself activate an agent in each channel. Use the documented Slack settings payload to update the intended agent. Keep external provider tokens and AgentStack API keys in the backend, and log the returned envelope for verification failures rather than retrying DNS changes blindly.