Acquainto
← API reference

Eflows

POST/v1/eflows/{id}/preview

Preview personalized text

Renders the four personalization-capable fields — opening statement (which is also what the intro screen shows), closing statement, CTA label and CTA/redirect URL — against sample values, server-side.

You supply only the respondent half (firstName, lastName, email). organizationName comes from your branding settings and eflowTitle from the eflow, so the string you see here is the string a respondent gets rather than one you reconstructed. fullName is derived from the two names and cannot be set directly.

A field that no longer parses is not an error here: it renders with its tags stripped rather than showing a raw tag, and reports usedFallback: true with the position. Writing a broken template is what fails — PATCH /v1/eflows/{id} returns 400 with the line and column.

Requires the eflows:read scope.

Example request

curl https://api.acquainto.com/v1/eflows/eflow_abc123/preview \
  -H "Authorization: Bearer acq_live_xxxxxxxx" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "string",
    "lastName": "string",
    "email": "string"
  }'

Parameters

  • idpathstringrequired

    A eflow id, prefixed `eflow_`.

Request body

  • firstNamestring | null

    Sample value for `{{ firstName }}`. Omit or send null to preview a link that has no name on it.

  • lastNamestring | null

    Sample value for `{{ lastName }}`. `{{ fullName }}` is derived from this and `firstName`; it is not settable.

  • emailstring | null

    Sample value for `{{ email }}`. Owner-facing only -- no respondent-facing field may contain it, so this changes nothing unless the eflow carries a template stored before that rule.

Responses

200Preview personalized text
  • eflowIdstringrequired

    A eflow id, prefixed `eflow_`.

  • valuesobjectrequired

    Every variable and the value it resolved to, so a blank line in the output has a visible cause.

    • firstNamestring | nullrequired
    • lastNamestring | nullrequired
    • fullNamestring | nullrequired

      Derived: first and last, trimmed. Null when both are missing.

    • organizationNamestring | nullrequired
    • eflowTitlestring | nullrequired
    • emailstring | nullrequired
  • fieldsobjectrequired
    • openingStatementobjectrequired
      • sourcestring | nullrequired

        The stored text, tags and all. Null when the field is not set.

      • renderedstring | nullrequired

        What a respondent would see. Null when the field is not set.

      • missingVariablesarray of stringrequired

        Variable names, as written, that resolved to nothing. The values are not included.

      • usedFallbackbooleanrequired

        True when the stored template no longer parses and its tags were stripped. A respondent sees the same stripped prose.

      • errorobject | nullrequired

        Why the fallback fired. Null when it did not.

        • codestringrequired
        • messagestringrequired
        • lineinteger
        • columninteger
    • completionStatementobjectrequired
      • sourcestring | nullrequired

        The stored text, tags and all. Null when the field is not set.

      • renderedstring | nullrequired

        What a respondent would see. Null when the field is not set.

      • missingVariablesarray of stringrequired

        Variable names, as written, that resolved to nothing. The values are not included.

      • usedFallbackbooleanrequired

        True when the stored template no longer parses and its tags were stripped. A respondent sees the same stripped prose.

      • errorobject | nullrequired

        Why the fallback fired. Null when it did not.

        • codestringrequired
        • messagestringrequired
        • lineinteger
        • columninteger
    • completionCtaLabelobjectrequired
      • sourcestring | nullrequired

        The stored text, tags and all. Null when the field is not set.

      • renderedstring | nullrequired

        What a respondent would see. Null when the field is not set.

      • missingVariablesarray of stringrequired

        Variable names, as written, that resolved to nothing. The values are not included.

      • usedFallbackbooleanrequired

        True when the stored template no longer parses and its tags were stripped. A respondent sees the same stripped prose.

      • errorobject | nullrequired

        Why the fallback fired. Null when it did not.

        • codestringrequired
        • messagestringrequired
        • lineinteger
        • columninteger
    • completionCtaUrlobjectrequired
      • sourcestring | nullrequired

        The stored text, tags and all. Null when the field is not set.

      • renderedstring | nullrequired

        What a respondent would see. Null when the field is not set.

      • missingVariablesarray of stringrequired

        Variable names, as written, that resolved to nothing. The values are not included.

      • usedFallbackbooleanrequired

        True when the stored template no longer parses and its tags were stripped. A respondent sees the same stripped prose.

      • errorobject | nullrequired

        Why the fallback fired. Null when it did not.

        • codestringrequired
        • messagestringrequired
        • lineinteger
        • columninteger
    • completionRedirectUrlobjectrequired
      • sourcestring | nullrequired

        The stored text, tags and all. Null when the field is not set.

      • renderedstring | nullrequired

        What a respondent would see. Null when the field is not set.

      • missingVariablesarray of stringrequired

        Variable names, as written, that resolved to nothing. The values are not included.

      • usedFallbackbooleanrequired

        True when the stored template no longer parses and its tags were stripped. A respondent sees the same stripped prose.

      • errorobject | nullrequired

        Why the fallback fired. Null when it did not.

        • codestringrequired
        • messagestringrequired
        • lineinteger
        • columninteger
400The request was malformed or failed validation.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

401Missing, invalid, or revoked credential.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

403The credential lacks the scope this route requires.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

404No such resource, or it belongs to another tenant.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

429Rate limited. Retry after the interval in `Retry-After`.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

500Something failed on our side. Safe to retry.
  • errorobjectrequired
    • type"invalid_request_error" | "authentication_error" | "permission_error" | "not_found_error" | "idempotency_error" | "rate_limit_error" | "api_error"required

      The bucket a client branches on to decide how to react.

    • codestringrequired

      Stable machine-readable code. Branch on this, not on `message`.

    • messagestringrequired

      Human-readable. May change without notice.

    • paramstring

      The offending request field, when the error names one.

    • detailsarray of object

      Present only on errors that can fail in several places at once -- the eflow content graph and personalization templates. Reporting one problem per round trip would turn fixing a 30-question flow into 30 requests.

      • pathstringrequired

        Dotted/bracketed path into the request body, e.g. `branches[0].triggerOptionId`.

      • codestringrequired

        Stable machine-readable code for this one problem.

      • messagestringrequired

        Human-readable. May change without notice.

      • lineinteger

        One-based line inside that field's own value. Personalization templates only.

      • columninteger

        One-based column inside that field's own value. Personalization templates only.

    • requestIdstringrequired

      Echoes the `req_...` id; quote it in support requests.

Browse every operation, with full request/response schemas, in the full API reference.