Skip to Content
Getting StartedQuickstart

Quickstart

Go from zero to sending and receiving your first message through the msend API in a few minutes.

Create an Agent & API Key

In your msend organization dashboard (/o/<organization>/agents), create a new Agent.

When the agent is created, msend displays two secrets once:

  • API Key (msk_...) — used to authenticate requests to /api/v1.
  • Webhook Secret — used to verify Msend-Signature headers on incoming webhooks.

Copy both values now; msend stores only a digest of your API key and cannot display it again.

Verify Your Credentials

Check that your API key works by fetching your agent profile:

curl -H "Authorization: Bearer msk_xxxxxxxx" \ https://app.msend.dev/api/v1/agent

If you are self-hosting, replace https://app.msend.dev with your own APP_HOST.

Connect a Channel

On the agent’s page, connect at least one channel:

  • Email: Standard SMTP + IMAP credentials (works with any mailbox).
  • Slack: Paste the generated app manifest at api.slack.com/apps and enter your Bot Token + Signing Secret.
  • WhatsApp: Connect your Meta WhatsApp Business Account with a permanent system user token.

Send Your First Message

Start a new conversation (or reuse an existing one for a known recipient) with POST /api/v1/messages:

curl -X POST https://app.msend.dev/api/v1/messages \ -H "Authorization: Bearer msk_xxxxxxxx" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: welcome-ada-1" \ -d '{ "channel_id": "chn_xxx", "to": { "kind": "email", "external_id": "ada@example.com" }, "subject": "Hello from msend", "text": "Hi Ada, your agent is connected." }'

msend returns 202 Accepted as soon as the message is queued. A background job delivers it via the channel adapter and emits message.status events (sending, sent, delivered, read, or failed).

Receive Replies

Choose how your agent receives inbound events on the agent’s settings page:

  • Webhook: msend POSTs signed JSON events to your HTTPS endpoint. See Webhooks Overview.
  • Poll: Your agent calls GET /api/v1/events?after=<cursor> on a loop. See Polling Events.

Want to test an agent locally without real channel credentials? Check out the runnable examples and fake-channel E2E harness in the LangGraph or OpenAI Agents SDK guides.

Last updated on