CRADDevelopers
English

Read campaign recipient outcomes

Before going live — check deployed capabilities, grants and your integration’s readiness.

Check deployed capabilities, key grants and business readiness in your environment. HTTP examples were captured in isolated tests; their local-unreleased provenance neither says the API is offline nor certifies your integration. Customer self-service uses the business-configured WhatsApp authentication template; SMS is not supported. Authorized admin contact recording is a separate action without a code.

GET/v1/management/campaigns/{campaignId}/recipients

Review one recipient and preserve one send intent

For a document, first confirm that it is ready for the intended customer. A staff-created appointment must already be CONFIRMED and still match the reviewed booking. Approval of a PENDING customer request uses CRAD’s automatic confirmation instead of this separate send.

Preview one real CRAD profile, require exactly that recipient and no skipped recipients, and show the rendered message before explicit staff confirmation. Before POST /campaigns, persist the exact draft, quoted cp ETag and one send UUID in an outbox event unique to that send intent. An initial staff-booking confirmation is unique per clinic, purpose and appointment; a document send also includes its explicit sendIntentId.

A later deliberate Send again for a document, after the previous outcome is known, creates a new sendIntentId and UUID after reviewing the saved report version and recipient. sendIntentId belongs to your outbox, not the CRAD request body. Concurrent clicks and retries of the same action keep the original intent and UUID. A queued, timed-out, not_found or unknown result is not a reason to create a new intent.

On timeout use /campaign-operations/{savedUuid}. not_found does not cancel an in-flight request: recover or explicitly retry the same UUID/body/ETag, never invent a new send UUID or automatically resend an unknown outcome. Track /campaigns/{campaignId}/recipients; sent means provider acceptance, not delivery. A suppressed or failed message does not undo the saved appointment or document.

Permissions for this step

campaigns:read

Continue with the clinic notification workflow

Behavior

Reads retained campaign recipient history. unknown means an attempted send may have succeeded and must not be automatically retried. A deleted contact can have profileId:null. Follow nextCursor for remaining recipients; a partial page is not the full campaign.

Authentication

ManagementCredential

Credential rules

One server-only owner-issued wbm_ API key can carry both management and integration permissions. Additional permissions require an explicit owner-issued grant. GET /v1/management returns the management discovery view, which may be empty for a booking-only key. For credentials with appointments:read, this discovery view omits whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write to preserve calendar-client compatibility. Discover these grants through GET /v1/management/messaging-capabilities. Template/profile command authorization still uses the stored grants. Server-only owner-issued Management authority with explicit application permissions. Calling this API does not expand a credential's grants. contacts:read/write/block/sync/fields:read/fields:write are separate approvals for canonical business contacts; fields also require current typed owner grants. contacts:record remains contact recording/recovery only. These grants create no customer phone proof, booking authority, messaging consent or automatic synchronization. Hours/blocks retain their independent resource grants. booking-policy:read/write separately delegate whole-business booking settings, without schedule/provider grants; write requires read. They preserve existing appointments and create no duration-rewrite authority. Provider duration policy additionally requires explicit provider-booking-policy:read/write and exact current providerIds; booking-duration:rewrite is separately approved and does not itself grant policy read/write. Service catalogue requires explicit services:read/write, independent of provider/calendar/schedule resources; write requires read. These operations do not expand an existing credential's grants. Public presentation and reviewed service selection require explicit website-content:read/write; write requires read, independently from services:* and provider resources. Existing provider metadata/activity/assignment additionally requires providers:read/write and a nonempty explicit current providerIds grant; write requires read. This grants no provider creation, deletion, login, invitation or schedule authority. WhatsApp template/profile management requires separate whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write application scopes. Write requires its matching read scope. These grants require explicit owner approval; Meta OAuth permissions remain separate.

Required application permissions

campaigns:read

An owner must separately grant campaign access to the whole business or selected active providers. Calendar and customer grants do not imply campaign access. A provider-scoped campaign uses one granted provider and appointment customers. Keep this Management key on your backend.

Request

  • campaignIdpath · stringRequired
    Format and constraints
    campaignId schema
    {
      "type": "string",
      "format": "uuid"
    }
  • statequery · stringOptional
    Format and constraints
    state schema
    {
      "type": "string",
      "enum": [
        "pending",
        "sending",
        "sent",
        "failed",
        "unknown"
      ]
    }
  • limitquery · integerOptional
    Format and constraints
    limit schema
    {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50
    }
  • cursorquery · stringOptional

    Use the prior nextCursor with the same query. Omit on the first page; an invalid cursor requires restarting the read.

    Format and constraints
    cursor schema
    {
      "type": "string",
      "maxLength": 4096,
      "pattern": "^[A-Za-z0-9_-]+$"
    }

Successful responses

200 · BusinessCampaignRecipientPage

Current authorized result.

Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · BusinessCampaignRecipientPage

  • itemsarrayRequired

    maxItems: 100

    View nested fields
    • []objectArray item

      Retained campaign-purpose history. A deleted contact may have profileId:null. unknown means a send may have occurred and is never eligible for automatic retry.

      View nested fields
      • recipientIdstring · uuidRequired
      • profileIdanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1string · uuidSchema branch
        • anyOf 2nullSchema branch
      • fullNameanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1stringSchema branch

          maxLength: 1024

        • anyOf 2nullSchema branch
      • phoneNumberstringRequired

        maxLength: 64

      • languageanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1stringSchema branch

          maxLength: 16

        • anyOf 2nullSchema branch
      • languageSentanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1stringSchema branch

          maxLength: 16

        • anyOf 2nullSchema branch
      • statestringRequired

        Allowed values: ["pending","sending","sent","failed","unknown"]

      • erroranyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1stringSchema branch

          maxLength: 2048

        • anyOf 2nullSchema branch
      • errorCodeanyOf (integer | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1integerSchema branch

          minimum: -9007199254740991maximum: 9007199254740991

        • anyOf 2nullSchema branch
      • sentAtanyOf (string | null)Required

        At least one of these variants must match.

        View nested fields
        • anyOf 1string · date-timeSchema branch
        • anyOf 2nullSchema branch
      • updatedAtstring · date-timeRequired
      • additionalPropertiesno value allowedSchema rule
  • nextCursoranyOf (string | null)Required

    At least one of these variants must match.

    View nested fields
    • anyOf 1stringSchema branch

      maxLength: 4096pattern: "^[A-Za-z0-9_-]+$"

    • anyOf 2nullSchema branch
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "recipientId": {
            "type": "string",
            "format": "uuid"
          },
          "profileId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "fullName": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ]
          },
          "phoneNumber": {
            "type": "string",
            "maxLength": 64
          },
          "language": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 16
              },
              {
                "type": "null"
              }
            ]
          },
          "languageSent": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 16
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "sent",
              "failed",
              "unknown"
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "errorCode": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "sentAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "recipientId",
          "profileId",
          "fullName",
          "phoneNumber",
          "language",
          "languageSent",
          "state",
          "error",
          "errorCode",
          "sentAt",
          "updatedAt"
        ],
        "description": "Retained campaign-purpose history. A deleted contact may have profileId:null. unknown means a send may have occurred and is never eligible for automatic retry."
      },
      "maxItems": 100
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4096,
          "pattern": "^[A-Za-z0-9_-]+$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "nextCursor"
  ]
}

Errors and recovery

Error responses declared in the contract (7)

The pinned contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.

401 · Missing, invalid or expired Management credential.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
403 · Current integration/key/scope/resource authority denied, including a browser Origin. Old keys gain no campaign authority.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
404 · Campaign or resource is not available under the current grant. A missing operation lookup returns 200 with status:not_found.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
405 · Unsupported method.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
422 · Invalid request, UUID, query, cursor or precondition format.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
429 · Request rate limit; honor Retry-After.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
503 · Temporary failure. Reads may be retried; for an uncertain command, retain its UUID and exact request and read campaign-operations first.

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}