WorkBuddy

Interact with WorkBuddy API - Field service management

Actions227

Stages Activities → Preview an SMS activity (Stages)

AI-generated

Summary

Preview an SMS activity for a stage by sending a test message with given parameters, optionally using a template and controlling message merge behavior.

Inputs

  • stageId (required) — Stage ID or stage number
  • jobId (required) —
  • templateId — Template ID to pre-populate fields from a template
  • body — Message body content (HTML supported for email)
  • to — Recipients
  • labelIds — Comma-separated array of label or tag IDs to attach to the activity (e.g. "id1,id2")
  • sharing — Sharing options to control visibility of the activity in the customer portal and field app
  • merge — Flag to indicate whether to merge message content or send as-is
  • requestOptions — Options to configure the HTTP request, such as batching, proxy, timeout, and SSL certificate handling
  • allowUnauthorizedCerts — Whether to accept the response even if SSL certificate validation is not possible
  • proxy — HTTP proxy to use. Supports authentication via URL (e.g. http://username:password@proxy:3128)
  • timeout — Time in milliseconds to wait for the server's response before aborting the request

Output shape

a JSON object representing the preview of the SMS activity, containing details such as status, message ID, and delivery info

The response may include optional fields; successful preview returns a 200 response with the preview data, while errors return an error object with a message.

Examples

Example 1: Send a test SMS preview for a stage using a specific job and template

stageId: "123", jobId: "456", templateId: "tmpl_001", body: "Test message", to: {"customer": "john@example.com"}, sharing: {"sharedWithCustomer": true}

Links

Discussion