Skip to content
campaiDeveloper
campai.com

Crm · Rules

POST/{organizationId}/{mandateId}/crm/rules/actionPreviewReads only

Preview native rule action

Renders native email or paper against currently permitted rule/contact declarations and authorized action resources.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • { contactRule: ruleId ? { edit: true } : { insert: true } }
Also checked, depending on the request and the records it touches
  • contact:member.read
  • contact:address.read
  • contact:customer.read
  • contact:sponsor.read
  • contact:contributor.read
  • contact:employee.read
  • contact:supplier.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Body

Content-Type: application/json

  • ruleIdidrequirednullable
  • expectedRevisionintegerrequirednullable

    at least 0

  • actionIdstringrequired

    pattern ^[A-Za-z0-9_-]{8}$

  • contactTypestringrequired
    member address customer sponsor contributor employee supplier
  • triggerobjectrequired
  • templateContentsobjectrequirednullable
  • contentstringrequired

    at most 10000 characters

  • countrystring
  • onlineLetterboolean
  • languagestringrequired

    2–32 characters

  • canvasstring
    desktop mobile
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/crm/rules/actionPreview' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • resourceUrlsobject of string
  • documentstring
  • widthnumber
  • pagesnumber
Response200
{
  "resourceUrls": {
    "key": "string"
  },
  "document": "string"
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.