Messaging

Send an email

Sends an email to people in the school.

POSThttps://api.klasstack.com/v1/messaging/email

  • messaging:write
  • Billable
  • Idempotency-Key required
  • Test key: example response

Authorizations

  • Authorizationstringheaderrequired

    Your secret key as a bearer token, in the form Bearer ks_live_sk_... or Bearer ks_test_sk_.... Keep it on your server. A test key gets the documented example and touches no school data.

Headers

  • idempotency-keystringheaderrequired

    A key of your own that makes this write safe to retry: the same key returns the first response instead of writing again.

Body

application/json

  • messagestring

  • subjectstring

  • recipientsobject

    Show child attributes
    • guardianIdsinteger[]

Response

200, application/json

  • dataobjectrequired

    Show child attributes
    • channelstringrequired

    • queuedCountnumberrequired

    • notDeliveredCountnumberrequired

    • recipientsobject[]required

      Show child attributes of each item
      • recipientKindstringrequired

      • recipientIdnumberrequired

      • statusstringrequired

        queued: handed to the provider queue. not_delivered: nothing was sent (reason says why). failed: this one dispatch errored (reason dispatch_failed); the rest of the send went ahead, so retry only this recipient.

      • deliveryIdnumber or nullrequired

        Read it at GET /v1/messaging/deliveries/{id}.

      • reasonstring or nullrequired

  • metaobjectrequired

    Show child attributes
    • request_idstringrequired

      Also returned in the X-Request-ID header.

    • paginationobject

      Show child attributes
      • limitintegerrequired

        Required range: x <= 100

      • has_morebooleanrequired

      • next_cursorstring or nullrequired

        Send this back as cursor for the next page. Opaque: never parse it.

Errors

What each code means, and what to do about it, is in the errors guide.

Webhook events

This call triggers no webhook event.