Docs / Quickstart

Quickstart

Send your first message and receive your first event. About ten minutes.

Install the SDK

Pick your language. Every SDK reads the key from an environment variable and retries safe requests on its own.

npm install stackpost
pip install stackpost
gem install stackpost
Use a test key (sk_test_) while developing. Test keys return real responses but never send.

Send a message

A message needs a recipient, and either a template or a body. The response returns right away with status queued.

curl https://api.stackpost.example/v1/messages \
  -H "Authorization: Bearer sk_test_..." \
  -d to="ana@example.com" -d template="welcome"

Receive events

Events are posted to your endpoint with an X-Stackpost-Signature header. Verify it before you trust the body.

const ok = sp.webhooks.verify(rawBody, sigHeader, secret);
if (!ok) return res.status(400).end();

Templates

Templates are versioned. Publishing makes a new version live; older versions stay available so a rollback is one click.

Limits and retries

PlanRequests / secBatch sizeWebhook retries
Free5503 over 1 hour
Growth5050012 over 24 hours
Scale5005,00024 over 72 hours