Why am I gettting CONDITIONALTAB_HAS_INVALID_PARENT when trying to send an envelope from a template?

I’m trying to send a DocuSign template with conditional tabs. Through the UI/web portal, it sends fine. Via the API, it errors with this response from DocuSign:

CONDITIONALTAB_HAS_INVALID_PARENT – A conditional tab references an invalid parent. Parent label must match another tab. Only one parent allowed. Signature tabs may not be parent tabs. Child tab with label: sig-spanish has an invalid parent.

We’ve boiled our template’s conditional tabs down to just a radio group with 2 radio buttons as the parent, and 2 signature fields that are conditional on corresponding radio buttons:

image of part of template

Inspecting our call to DocuSign (via the createEnvelope() method), here is how those fields are being sent:

[
  {
    roleName: "primary",
    tabs: {
      radioGroupTabs: [
        {
          documentId: "1",
          groupName: "radio-group1",
          originalValue: "Spanish",
          radios: [
            {
              bold: "false",
              font: "calibri",
              fontColor: "black",
              fontSize: "size10",
              italic: "false",
              locked: "false",
              pageNumber: "1",
              required: "true",
              selected: "true",
              tabId: "d032aff1-ecbd-4d51-bce2-c0fd4225ecbf",
              underline: "false",
              value: "Spanish",
              xPosition: "171",
              yPosition: "247",
            },
            {
              bold: "false",
              font: "calibri",
              fontColor: "black",
              fontSize: "size10",
              italic: "false",
              locked: "false",
              pageNumber: "1",
              required: "true",
              selected: "false",
              tabId: "a45319cb-d98c-42d2-942f-3a77202ee7e1",
              underline: "false",
              value: "English",
              xPosition: "170",
              yPosition: "326",
            },
          ],
          recipientId: "72120635",
          requireAll: "false",
          requireInitialOnSharedChange: "false",
          shared: "false",
          tabType: "radiogroup",
          templateLocked: "false",
          templateRequired: "false",
          value: "Spanish",
        },
      ],
      signHereTabs: [
        ...
        {
          conditionalParentLabel: "radio-group1",
          conditionalParentValue: "Spanish",
          documentId: "1",
          name: "SignHere",
          optional: "false",
          pageNumber: "1",
          recipientId: "72120635",
          scaleValue: "1",
          stampType: "signature",
          tabId: "65bef1a3-4cd3-4ff7-8d2b-80a57fc1fbd3",
          tabLabel: "sig-spanish",
          tabType: "signhere",
          templateLocked: "false",
          templateRequired: "false",
          tooltip: "SignHere",
          xPosition: "254",
          yPosition: "242",
        },
        {
          conditionalParentLabel: "radio-group1",
          conditionalParentValue: "English",
          documentId: "1",
          name: "SignHere",
          optional: "false",
          pageNumber: "1",
          recipientId: "72120635",
          scaleValue: "1",
          stampType: "signature",
          tabId: "e027af5d-32e5-4b15-9b8d-8d721f0de470",
          tabLabel: "sig-english",
          tabType: "signhere",
          templateLocked: "false",
          templateRequired: "false",
          xPosition: "253",
          yPosition: "316",
        },
      ],
      textTabs: [
        ...
      ],
    },
    email: "[email protected]",
    name: "Test",
    clientUserId: "[email protected]",
    embeddedRecipientStartURL: "SIGN_AT_DOCUSIGN",
  },
]

This, as far as I can tell, follows the official documentation on setting up conditional tabs. There is additional documentation that does mention a couple things:

Which types you are allowed to use for Parent conditional fields differ between the UI and the API. In the UI, you can use only the following tab types to trigger revealing conditional fields:

  • Checkbox
  • Radio button
  • Dropdown
  • Text

In the API, you can use any field type as a Parent field if you set its optional property to true.

Emphasis mine. This seems to imply that parent fields set via the API need optional: 'true'. However, I’ve tried setting that without any change. I believe the documentation means for any types that the UI doesn’t accept, the optional property has to be set to ‘true’.

Additionally, those docs specify:

If the conditional field is a Checkbox tab or button from a Radio Group tab, use on as the value to show that the parent tab is active.

However, after investigating, this doesn’t even make sense for radio buttons.

Things I’ve tried:

  • Setting optional: 'true' on the parents (as noted above)
  • Setting optional: 'true' on the child fields (maybe the docs were wrong)
  • Trying checkboxes instead
  • Removing all but one conditional child tab and one parent
  • Combinations of the above