Set delivery method (direct/webhook)

Overview

Switches a template type between Direct Send (email) and Webhook delivery. Webhook delivery posts rendered content to the partner's webhook URL at send time and requires an active webhook subscription. Email-only types cannot be set to webhook.

Prerequisites

  • A bearer token. Callable with Partner and Account tokens.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/account/white-label/email-templates/delivery-method

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Who can call it: Partner and Account tokens.

  • Authentication plus an email-template feature check.

  • company_id is scoped by an ownership check.

  • Platform-owned types are forbidden (403) for non-platform companies.

  • Only the reachable companies differ per role.

Rate limit

  • No rate limit.

Request body

  • Body:
FieldTypeRequiredDescription
company_idintegerYesMust be an existing account inside your own account tree.
typestringYesValid EmailTemplateType value. Must support webhook if delivery_method=webhook.
delivery_methodstringYesOne of direct, webhook. webhook fails validation when the type does not support webhook, or when there is no active webhook subscription (RequiresActiveWebhookSubscription).
webhook_subscription_idintegerNonullable. The active webhook subscription to use when delivery_method=webhook.
{
  "company_id": 1,
  "type": "user_welcome",
  "delivery_method": "webhook",
  "webhook_subscription_id": 5
}

Response

  • data.status (string) — success.
  • data.message (string) — Template updated.

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "Template updated."
  }
}

422 Validation Error · 422

{
  "message": "This email type does not support webhook delivery.",
  "errors": {
    "delivery_method": [
      "This email type does not support webhook delivery."
    ]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
403The template type is platform-managed, or the email-template section is disabled for your account
422Validation Error
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/white-label/email-templates/delivery-method" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"company_id": 1, "type": "user_welcome", "delivery_method": "webhook", "webhook_subscription_id": 5}'

Did this page help you?