Janrain Config API v1 Documentation

Adding / Updating Fields

Common Field Attributes

All fields share a set of common attributes:

  • type - required

    The type of field that you wish to create or update. Currently supported field types are:

    Click on one of the types for a full example of a field definition.

  • name - required

    A unique name used to identify the field (cannot contain spaces).

    Example:

    "name": "myCoolField"
  • schemaAttribute - required

    A path to the schema attribute in the profile record to which this field's value should be mapped. Make a call to /config/{app}/schemas/{schema} for a list of valid values.

    Example:

    "schemaAttribute": "primaryAddress.phone"
  • label - optional

    An optional field label used by the Janrain Registration widget. It is not necessary for pure API implementations. It must be a reference to a translation identifier. Make a call to /config/{app}/flows/{flow}/locales/{locale} for a list of valid identifiers.

    Example:

    "label": {
      "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
    }
  • tip - optional

    An optional field tooltip that is used by the Janrain Registration widget. It is not necessary for pure API implementations. It must be a reference to a translation identifier. Make a call to /config/{app}/flows/{flow}/locales/{locale} for a list of valid identifiers.

    Example:

    "tip": {
      "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
    }
  • validation - optional

    An optional list of validations that should be applied to this field. Validations have the following attributes:

    • rule - required

      The name of the validation rule to apply. Must be one of the validations allowed for this field's type. See this table to determine which validations are available to a given field type.

    • value - required

      The value to use for validation. For some validations this will just be true or false (for example, required). For others this will be a configuration value for the validation. See the validations section for more information on how to configure each validation.

    • message - required

      The error message to be used if the validation fails. This must be a reference to a translation identifier. Make a call to /config/{app}/flows/{flow}/locales/{locale} for a list of valid identifiers.

      Note: Message is not supported by the matchOptions validation, but is required for all others.

    Example:

    "validation": [
      {
        "rule": "required",
        "value": "true",
        "message": {
          "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
        }
      }
    ]

Type-specific Field Attributes

Each type of field has additional parameters specific to it. Refer to the table at the end of this section to see which attributes apply to which fields.

  • socialProfileData - optional

    When a user logs in using a social provider, Janrain's Social Login service returns the social provider in the form of a Portable Contact payload. You can use the socialProfileData attribute to specify which data from the social profile should be used to populate the value for this field in the Janrain user record.

    Example:

    "socialProfileData": "profile.name.familyName"
  • placeholder - optional

    This is used as the placeholder attribute on form elements when using the Janrain widget. This must be a reference to a translation identifier. Make a call to /config/{app}/flows/{flow}/locales/{locale} for a list of valid identifiers.

    Example:

    "placeholder": {
      "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
    }
  • preChecked - optional

    This only applies to the checkbox field type. If set to true, the checkbox will appear pre-checked to new users registering with the Janrain widget. This is useful if you want to require that users specifically opt out of something (for example, a newsletter).

    Example:

    "preChecked": true
  • submitValue - optional

    This only applies to the checkbox field type. Use this if you need to specify the submit value of a check box (that is, the check box should submit a value other than "on").

    Example:

    "submitValue": "true"
  • options - required

    For the radio and select fields, you must define the options to be displayed. Options have the following attributes:

    • disabled - optional

      Set this to true to disable the option.

    • label - required

      The label to display for this option. This must be a reference to a translation identifier. Make a call to /config/{app}/flows/{flow}/locales/{locale} for a list of valid identifiers.

    • selected - optional

      Set this to true to select this option by default. Only one option in a field can have this attribute.

    • value - required

      The value of this option.

      Example:

      "options": [
        {
          "selected": true,
          "label": {
            "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
          },
          "value": "waffles"
        }
      ]
text email password checkbox radio select textarea
socialProfileData yes yes - - - - yes
placeholder yes yes yes - - - yes
preChecked - - - yes - - -
submitValue - - - yes - - -
options - - - - yes yes -

Validations

Each field supports a subset of the validations available. Refer to the table at the end of this section to determine which validations are available to you.

  • blacklist - Takes a list of disallowed strings as its value.

    Example:

    {
      "rule": "blacklist",
      "value": [ "do not allow this", "or_this!" ],
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • format - Asserts that the field conforms to a certain format. It takes one of the following predefined formats as its value:

    Example:

    {
      "rule": "format",
      "value": "email",
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
    • alpha - Only allows alphabetic characters, and must contain at least one character. Defined as /^[a-z]+$/i.

    • alphaExtended - Only allows alphabetic characters, dashes (-), and single quotes('). The field value must contain at least one character. Defined as /^[a-zA-Z\-']+$/.

    • alphaExtendedSpaces - Only allows alphabetic characters, dashes (-), single quotes('), and whitespace characters (\r, \n, \t, and \f). Defined as /^[a-zA-Z\-'\s]+$/.

    • alphaNumeric - Only allows alphabetic and numeric characters. The field value must contain at least one character. Defined as /^[a-z0-9]+$/i.

    • alphaNumericExtended - Only allows alphabetic and numeric characters. Allows for dashes (-), underscores (_), and periods (.) within the value, so long as they are not at the beginning or the end. The field value must contain at least three characters. Defined as /^[a-z][-a-z0-9\s_.]*[a-z0-9]$/i.

    • email - Only allows valid email addresses. Defined as /^.+@(?:[^.]+\.)+(?:[^.]{2,})$/.

    • i18nAlphaNumeric - Allows only alphanumeric characters without excluding characters containing accents (for example, é). Defined as /^[^-\s^`~!@#$%^&*()_=+\[{\]}\|;:‘“,<.>/?]+$/, it disallows the following characters:

      • whitespace characters (\r, \n, \t, and \f)
      • dashes (-)
      • carets (^)
      • backticks (` )
      • exclamation points (!)
      • at signs (@)
      • number signs (#)
      • dollar signs ($)
      • percent signs (%)
      • ampersands (&)
      • asterisks (*)
      • parentheses (())
      • underscores (_)
      • equal signs (=)
      • plus signs (+)
      • square brackets ([])
      • curly braces ({})
      • pipes (|)
      • semicolons (;)
      • colons (:)
      • single quotes (')
      • double quotes (")
      • commas (,)
      • angle brackets (<>)
      • periods (.)
      • forward slashes (/)
      • question marks (?)
    • noWhitespace - Disallows whitespace characters (\r, \n, \t, and \f). Defined as /^\S*$/.

    • numeric - Only allows numeric characters. Defined as /^(\d+)$/.
    • numericReal - Only allows real number values. Defined as /^(\d+\.?\d*|\.\d+|\-\d+\.?\d*|\-\.\d+)$/, it allows numbers in the following formats:

      • 1234
      • 12.34
      • .1234
      • -1234
      • -12.34
      • -.1234
    • phone - Only allows valid phone numbers. Defined as /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/, it allows phone numbers in the following formats:

      • (123)-456-7890
      • (123).456.7890
      • (123) 456 7890
      • 123-456-7890
      • 123.456.7890
      • 123 456 7890
    • phoneInternational - Similar to the phone validation, but allows for an optional one to four preceding numbers. Defined as /^(\d{1,4}[-. ]?)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.

    • zipCode - Only allows five character numeric values. Defined as /^\d{5}$/.
    • zipCode+4 - Similar to the zipCode validation, but allows for an optional plus-four code. Defined as /^\d{5}(\-\d{4})?$/.
  • match - Asserts that a field value matches the value of another field. Its value must be set to another existing field.

    Example:

    {
      "rule": "match",
      "value": "confirmPasswordField",
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • matchOptions - Protects against invalid input on select fields by enforcing that the value submitted be one of the options defined in the field. Set this to false only if you plan on dynamically populating the select options yourself. This is added to select fields by default.

    Example:

    {
      "rule": "matchOptions",
      "value": True
    }
  • maxLength - Asserts that the value of a field is at most the length set as the value of this validation.

    Example:

    {
      "rule": "maxLength",
      "value": 30,
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • minLength - Asserts that the value of a field is at least the length set as the value of this validation.

    Example:

    {
      "rule": "minLength",
      "value": 4,
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • minYears - Asserts that the value from a dateselect field is at least so many years in the past.

    Example:

    {
      "rule": "minYears",
      "value": 18,
      "message": {
        "key": "63f7c18f-521a-4b4f-94c4-0b04b870c82e"
      }
    }
  • required - Asserts that a value is provided for this field. Set to true to enable this validation.

    Example:

    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • unique - Asserts that the value of this field is unique when compared to all records within the Janrain application. Set to true to enable this validation.

    Example:

    {
      "rule": "unique",
      "value": true,
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • whitelist - Takes a list of allowed strings as its value. All other strings are disallowed.

    Example:

    {
      "rule": "whitelist",
      "value": ["only allow this", "or_this_one!"],
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • clientFunctionName - Name of the function to use for validation on the client.

    Example:

    {
      "rule": "clientFunctionName",
      "value": "functionName",
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
  • serverRegexSetting - Server Setting of regex to use for validation.

    Example:

    {
      "rule": "serverRegexSetting",
      "value": "serverRegexSetting",
      "message": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      }
    }
checkbox dateselect email password radio select text textarea
blacklist - - - - - - yes -
format - - yes* yes - - yes yes
match - - yes yes yes yes yes -
matchOptions - - - - - yes - -
maxLength - - yes yes - - yes yes
minLength - - yes yes - - yes yes
minYears - yes - - - - - -
required yes yes yes yes yes yes yes yes
unique - - yes - - - yes -
whitelist - - - - - - yes -
clientFunctionName - yes yes yes - yes yes yes
serverRegexSetting - yes yes yes - yes yes yes

*: Fields of type email check for correctly-formatted emails by default. This cannot be overridden.

Full Examples

Full Example: checkbox

{
  "type": "checkbox",
  "name": "myCustomCheckboxField",
  "schemaAttribute": "optIn.status",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "preChecked": true,
  "submitValue": "yes",
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }
  ]
}

Full Example: dateselect

{
  "name": "birthdate",
  "schemaAttribute": "birthday",
  "type": "dateselect",
  "label": {
    "key": "8122c314a4e9d558f6d3eedfb2446376"
  },
  "yearLabel": {
    "key": "acb8b9cedb63cb5930bae0fb1c2d50cc"
  },
  "monthLabel": {
    "key": "ace9326798de56c595568a7a4141972c"
  },
  "dayLabel": {
    "key": "6f44a1db770c928b0d40bb980548f43d"
  },
  "monthNames": [
    {
      "key": "66fcba24722d94d03167df4d29a3fcde"
    }, {
      "key": "eec9c536de325f7f66669a7a61a55fc0"
    }, {
      "key": "b8a35f47cfde6c15643c74804f9a6421"
    }, {
      "key": "399c58387be99853b53ffc4f778814ab"
    }, {
      "key": "ab66d779cf23720afbc4f2c49a296728"
    }, {
      "key": "9089a6c3cc7b9d447c5aa870a38a49bf"
    }, {
      "key": "24ea0188feb2be9c0a6fc0fffa329009"
    }, {
      "key": "f814c7e7884980bfbe637bc8b7d5a798"
    }, {
      "key": "cbbd277bc1b7f3034d4b8a5fc7c0a717"
    }, {
      "key": "17ef13bbd9bd987fc16b4a26665e99ce"
    }, {
      "key": "dd1b34fbac69ea3440260d0b25f660ea"
    }, {
      "key": "368ace206c6cd848a8eb028fcf44a895"
    }
  ],
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }, {
      "rule": "minYears",
      "value": 18,
      "message": {
        "key": "63f7c18f-521a-4b4f-94c4-0b04b870c82e"
      }
    }
  ]
}

Full Example: email

{
  "type": "email",
  "name": "myCustomEmailField",
  "schemaAttribute": "email",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "socialProfileData": "profile.email",
  "placeholder": "6e15067b-2ca5-43c3-af96-930766d63375",
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }
  ]
}

Full Example: password

{
  "type": "password",
  "name": "myCustomPasswordField",
  "schemaAttribute": "password",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "placeholder": "6e15067b-2ca5-43c3-af96-930766d63375",
  "validation": [
    {
      "rule": "minLength",
      "value": 16,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }, {
      "rule": "match",
      "value": "myCustomPasswordConfirmField",
      "message": {
        "key": "63f7c18f-521a-4b4f-94c4-0b04b870c82e"
      }
    }
  ]
}

Full Example: radio

{
  "type": "radio",
  "name": "myCustomRadioField",
  "schemaAttribute": "favorites.breakfastFood",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "options": [
    {
      "selected": true,
      "label": {
        "key": "8a8508aa-f939-472b-bad2-59f6c0089a60"
      },
      "value": "waffles"
    },
    {
      "label": {
        "key": "c8050744-9b1d-4360-89e7-b37802d59c4a"
      },
      "value": "pancakes"
    }
  ],
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }
  ]
}

Full Example: select

{
  "type": "select",
  "name": "myCustomSelectField",
  "schemaAttribute": "favorites.lunchFood",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "options": [
    {
      "selected": true,
      "label": {
        "8a8508aa-f939-472b-bad2-59f6c0089a60"
      },
      "value": "hotdogs"
    },
    {
      "label": {
        "c8050744-9b1d-4360-89e7-b37802d59c4a"
      },
      "value": "hamburgers"
    }
  ],
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }
  ]
}

Full Example: text

{
  "type": "text",
  "name": "myCustomTextField",
  "schemaAttribute": "displayName",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "socialProfileData": "profile.displayName",
  "placeholder": "6e15067b-2ca5-43c3-af96-930766d63375",
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }, {
      "rule": "unique",
      "value": true,
      "message": {
        "key": "63f7c18f-521a-4b4f-94c4-0b04b870c82e"
      }
    }
  ]
}

Full Example: textarea

{
  "type": "textarea",
  "name": "myCustomTextareaField",
  "schemaAttribute": "profileBlurb",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "socialProfileData": "profile.aboutMe",
  "placeholder": "6e15067b-2ca5-43c3-af96-930766d63375",
  "validation": [
    {
      "rule": "maxLength",
      "value": 500,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    }
  ]
}

Modifying Forms

You can add or remove fields from forms. Doing so allows you to control what data may be included in the form submissions to your Capture application. Forms can also have features, which add different types of functionality to forms.

Form Features

Currently, the only feature available to forms is captcha. The captcha feature adds Google reCaptcha to the form rendered by the Capture widget.

Below is an example of a form with captcha enabled:

{
  "features": [
    {
      "name": "captcha"
    }
  ],
  "fields": [
    {
      "name": "firstName",
      "required": true
    },
    {
      "name": "lastName",
      "required": true
    }
  ]
}

Security Schemes

Basic Authentication basic

Config API supports basic HTTP authentication using your Capture owner credentials. To create the authorization code, combine your client ID and secret like this client_id + ":" + secret, then base64 encode the result.

Authorization string

Used to send the authorization code.

Example: Authorization: Basic aW1fYV9saXR0bGVfdGVhX3BvdF9zaG9ydF9hbmRfc3Q6b3V0X2hlcmVfaXNfbXlfaGFuZGxlX2hlcmVfaXNfbXk=

Responses

401 Unauthorized

A request was made without credentials or the credentials were invalid.

403 Forbidden

The credentials provided were incorrect for the requested resource.

Endpoints

https://{version}.api.{region}.janrain.com

URI Parameters

region string required

The region that corresponds with the location of your Capture application.

Possible values:
  • us
  • eu
  • au
  • sa
  • cn
version string required
Possible values:
  • v1

/config/{app}

URI Parameters

app string required

The Capture application ID.

get

Description

Returns flows and schemas configured for this app.

Security

Responses

200 OK

Response Example (application/json)
{
  "_relationships": {
    "flows": [
      {
        "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/standard",
        "name": "standard"
      }
    ],
    "schemas": [
      {
        "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/schemas/user",
        "name": "user"
      }
    ]
  },
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz",
  "name": "v86cchggr5cdvbfh7ydk8s63zz"
}

404 Not Found

Capture application could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Capture application not found."
}

/config/{app}/flows

get

Description

Returns a list of flows.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/standard",
    "name": "standard"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow",
    "name": "myCoolFlow"
  }
]

404 Not Found

Capture application could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Capture application not found."
}

/config/{app}/flows/{flow}

URI Parameters

flow string required

The flow name.

get

Description

Returns the current version of the flow.

Responses

200 OK

Response Example (application/json)
{
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow",
  "name": "myCoolFlow",
  "version": "2015111701280483247",
  "userData": [
      "email",
      "displayName",
      "givenName"
  ],
  "schemas": [
      "myCoolEntityType"
  ]
}

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

put

Description

Updates/replaces userData object and/or entityTypes in the flow. userData lists the schema attributes to store in the janrainCaptureProfileData object in Local Storage for a logged-in user.

Security

Request Example (application/json)

{
  "userData": [
    "email",
    "displayName",
    "familyName",
    "primaryAddress.country"
  ],
  "schemas": [
    "myCoolEntityType"
  ]
}

Responses

204 No Content

Successfully updated the Flow.

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/copy

post

Description

Creates a new flow by copying an existing flow. The name attribute in the request specifies the name of the new flow. This endpoint cannot be used to overwrite an existing flow.

Security

Request Example (application/json)

{
  "name": "myCoolFlow"
}

Responses

201 Created

Successfully created a new flow.

Response Headers

Location string

The location of the newly-created flow.

Example: Location: /config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow
Response Example (application/json)
{
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow",
  "name": "myCoolFlow",
  "version": "2015111705580676795"
}

404 Not Found

Capture application could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Capture application not found."
}

/config/{app}/flows/{flow}/fields

get

Description

Returns a list of fields defined in the flow.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/signInEmailAddress",
    "name": "signInEmailAddress"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/currentPassword",
    "name": "currentPassword"
  }
]

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

post

Description

Adds a field to the flow. The schemaAttribute must be a dot-separated path to an existing schema attribute. Call the schemas endpoint for a list of valid attributes.

Security

Request Example (application/json)

{
  "type": "text",
  "name": "myCustomTextField",
  "schemaAttribute": "displayName",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "socialProfileData": "profile.displayName",
  "placeholder": {
    "key": "6e15067b-2ca5-43c3-af96-930766d63375"
  },
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    },
    {
      "rule": "unique",
      "value": true,
      "message": {
        "key": "63f7c18f-521a-4b4f-94c4-0b04b870c82e"
      }
    }
  ]
}

Responses

201 Created

Successfully created a new field.

Response Headers

Location string

The location of the newly-created field.

Example: Location: /config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/myField

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/fields/{field}

URI Parameters

field string required

The field name.

get

Description

Returns a field definition from the flow. Includes validations.

Security

Query Parameters

locale string

If supplied, the field will be translated into the specified locale before being returned. The response will be identical to calling /config/{app}/f lows/{flow}/locales/{locale}/fields/{field}

Responses

200 OK

Response Example (application/json)
{
  "_relationships": {
    "forms": [
      {
        "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/forms/editProfileForm",
        "name": "editProfileForm"
      }
    ]
  },
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/myCustomTextField",
  "type": "text",
  "name": "myCustomTextField",
  "schemaAttribute": "displayName",
  "label": {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/b6ced670-7140-4446-9839-da3474860b1a",
    "key": "b6ced670-7140-4446-9839-da3474860b1a",
    "path": "fields.displayName.label",
    "values": {
      "en-US": "Display Name"
    }
  },
  "tip": {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/8b93448a-6f00-448c-952b-0f1536107cf7",
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7",
    "path": "fields.displayName.tip",
    "values": {
      "en-US": ""
    }
  },
  "socialProfileData": "profile.displayName",
  "placeholder": {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/6e15067b-2ca5-43c3-af96-930766d63375",
    "key": "6e15067b-2ca5-43c3-af96-930766d63375",
    "path": "fields.displayName.placeholder",
    "values": {
      "en-US": "Display Name"
    }
  },
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/bb2b21a1-98df-4dce-84f7-534013c46225",
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225",
        "path": "fields.displayName.validation.messages.required",
        "values": {
          "en-US": "Display name is required."
        }
      }
    },
    {
      "rule": "unique",
      "value": true,
      "message": {
        "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/63f7c18f-521a-4b4f-94c4-0b04b870c82e",
        "key": "63f7c18f-521a-4b4f-94c4-0b04b870c82e",
        "path": "fields.displayName.validation.messages.unique",
        "values": {
          "en-US": "That display name is already taken."
        }
      }
    }
  ]
}

404 Not Found

Field could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Field not found."
}

put

Description

Updates/replaces a field in the flow.

Security

Request Example (application/json)

{
  "type": "text",
  "name": "myCustomTextField",
  "schemaAttribute": "displayName",
  "label": {
    "key": "b6ced670-7140-4446-9839-da3474860b1a"
  },
  "tip": {
    "key": "8b93448a-6f00-448c-952b-0f1536107cf7"
  },
  "socialProfileData": "profile.displayName",
  "placeholder": {
    "key": "6e15067b-2ca5-43c3-af96-930766d63375"
  },
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": {
        "key": "bb2b21a1-98df-4dce-84f7-534013c46225"
      }
    },
    {
      "rule": "unique",
      "value": true,
      "message": {
        "key": "63f7c18f-521a-4b4f-94c4-0b04b870c82e"
      }
    }
  ]
}

Responses

204 No Content

Successfully updated the Field.

404 Not Found

Field could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Field not found."
}

delete

Description

Removes a field from the flow. Also removes the field from any forms that were using it.

Security

Query Parameters

force string

Forces the deletion of a field even if it's still being used in forms. Forms in question will have the field removed.

Possible values:
  • true
  • false

Responses

204 No Content

Successfully deleted the Field.

404 Not Found

Field could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Field not found."
}

/config/{app}/flows/{flow}/forms

get

Description

Returns a list of forms in the flow.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/forms/signInForm",
    "name": "signInForm"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/forms/editProfileForm",
    "name": "editProfileForm"
  }
]

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/forms/{form}

URI Parameters

form string required

The form name.

get

Description

Returns a list of fields in a form.

Security

Responses

200 OK

Response Example (application/json)
{
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/forms/signInForm",
  "fields": [
    {
      "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/signInEmailAddress",
      "name": "signInEmailAddress",
      "required": false
    },
    {
      "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/currentPassword",
      "name": "currentPassword",
      "required": false
    }
  ]
}

404 Not Found

Form could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Form not found."
}

put

Description

Updates/replaces the list of fields and features in the form. Any fields added to the form must already exist in the flow.

Security

Request Example (application/json)

{
  "fields": [
    {
      "name": "signInEmailAddress"
    },
    {
      "name": "currentPassword"
    }
  ]
}

Responses

204 No Content

Successfully updated the Form.

404 Not Found

Form could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Form not found."
}

/config/{app}/flows/{flow}/locales

get

Description

Returns a list of locales that are available.

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US",
    "name": "en-US"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/it-IT",
    "name": "it-IT"
  }
]

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/locales/{locale}

URI Parameters

locale string required

get

Description

Returns the translation values for a locale.

Responses

200 OK

Response Example (application/json)
{
    "1ab1f15d-2555-49af-bd88-cf984ad40a13": "Come se scrive?",
    "a8670648-f9f7-4c0b-92cd-e477fe67b617": "Come se dice.",
    "991a5781-cbe1-4770-bbf1-395168a11d59": "Olio di gomito."
}

404 Not Found

Locale could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Locale not found."
}

/config/{app}/flows/{flow}/locales/{locale}/fields

get

Description

Returns a list of fields defined in the flow. Alias of /config/{app}/flows/{flow}/fields.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US/fields/signInEmailAddress",
    "name": "signInEmailAddress"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US/fields/currentPassword",
    "name": "currentPassword"
  }
]

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

post

Description

Adds a field to the flow. Works just like /config/{app}/flows/{flow}/fields/{field} except translatable values are accepted in the locale specified. The schemaAttribute must be a dot- separated path to an existing schema attribute. Call the schemas endpoint for a list of valid attributes.

Security

Request Example (application/json)

{
  "type": "text",
  "name": "myCustomTextField",
  "schemaAttribute": "displayName",
  "label": "foo",
  "tip": "foo",
  "socialProfileData": "profile.displayName",
  "placeholder": "foo",
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": "foo"
    },
    {
      "rule": "unique",
      "value": true,
      "message": "foo"
    }
  ]
}

Responses

201 Created

Successfully created a new field.

Response Headers

Location string

The location of the newly-created field.

Example: Location: /config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/myField

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/locales/{locale}/fields/{field}

URI Parameters

field string required

get

Description

Returns a field definition from the flow translated into the locale specified. Includes validations.

Security

Responses

200 OK

Response Example (application/json)
{
  "_relationships": {
    "forms": [
      {
        "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/forms/editProfileForm",
        "name": "editProfileForm"
      }
    ]
  },
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/fields/myCustomTextField",
  "type": "text",
  "name": "myCustomTextField",
  "schemaAttribute": "displayName",
  "label": "foo",
  "tip": "foo",
  "socialProfileData": "profile.displayName",
  "placeholder": "foo",
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": "foo"
    },
    {
      "rule": "unique",
      "value": true,
      "message": "foo"
    }
  ]
}

404 Not Found

Field could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Field not found."
}

put

Description

Updates/replaces a field in the flow.

Security

Request Example (application/json)

{
  "type": "text",
  "name": "myCustomTextField",
  "schemaAttribute": "displayName",
  "label": "foo",
  "tip": "foo",
  "socialProfileData": "profile.displayName",
  "placeholder": "foo",
  "validation": [
    {
      "rule": "required",
      "value": true,
      "message": "foo"
    },
    {
      "rule": "unique",
      "value": true,
      "message": "foo"
    }
  ]
}

Responses

204 No Content

Successfully updated the Field.

404 Not Found

Field could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Field not found."
}

/config/{app}/flows/{flow}/locales/{locale}/mailTemplates

get

Description

Returns a list of all email templates in the specified locale.

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US/mailTemplates/reactivateAccount",
    "name": "reactivateAccount"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US/mailTemplates/passwordRecover",
    "name": "passwordRecover"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US/mailTemplates/registrationVerification",
    "name": "registrationVerification"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US/mailTemplates/emailAddressChanged",
    "name": "emailAddressChanged"
  }
]

/config/{app}/flows/{flow}/locales/{locale}/mailTemplates/{template}

URI Parameters

template string required

get

Description

Returns a single email template in the specified locale.

Responses

200 OK

Response Example (application/json)
{
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/locales/en-US/mailTemplates/registrationVerification",
  "name": "registrationVerification",
  "subject": "Verify your email",
  "textBody": "Welcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.\n\n{*&email_verification_url*}\n",
  "htmlBody": "<p>\nWelcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.\n</p>\n<p>\n<a href=\"{*email_verification_url*}\">{*email_verification_url*}</a>\n</p>\n"
}

put

Description

Update a single email template in the specified locale.

Request Example (application/json)

{
  "subject": "Verify your email",
  "textBody": "Welcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.\n\n{*&email_verification_url*}\n",
  "htmlBody": "<p>\nWelcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.\n</p>\n<p>\n<a href=\"{*email_verification_url*}\">{*email_verification_url*}</a>\n</p>\n"
}

Responses

204 No Content

Successfully updated the email template.

/config/{app}/flows/{flow}/locales/{locale}/mailTemplates/{template}/body

get

Description

Returns the body for this email template in the specified locale. The Accept header determines whether the text or html version is returned.

Request Headers

Accept string required

Specify the format to return.

Possible values:
  • text/plain
  • text/html

Responses

200 OK

Response Example (text/plain)
Welcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.

{*&email_verification_url*}
Response Example (text/html)
<p>
Welcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.
</p>
<p>
<a href=\"{*email_verification_url*}\">{*email_verification_url*}</a>
</p>

406 Not Acceptable

A GET request was made with an Accept header, or a PUT/POST request was made with a Content-Type header, that is invalid. Refer to the headers section of this method to see what types are acceptable.

Response Example (application/json)
{
  "errors": {
    "received": "application/json",
    "accepts": [
      "text/html",
      "text/plain"
    ]
  }
}

put

Description

Update the body for this email template in the specified locale. The Content-Type header determines whether the text or html version is updated.

Request Headers

Content-Type string required

Specify the format to modify.

Possible values:
  • text/plain
  • text/html

Request Example (text/plain)

Welcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.

{*&email_verification_url*}

Request Example (text/html)

<p>
Welcome to {*#settings*}{*&site_name*}{*/settings*}, {*#user*}{*&displayName*}{*/user*}! To complete your new registration, just click on or browse to the URL below to verify this email address.
</p>
<p>
<a href=\"{*email_verification_url*}\">{*email_verification_url*}</a>
</p>

Responses

204 No Content

Successfully updated the subject.

406 Not Acceptable

A GET request was made with an Accept header, or a PUT/POST request was made with a Content-Type header, that is invalid. Refer to the headers section of this method to see what types are acceptable.

Response Example (application/json)
{
  "errors": {
    "received": "application/json",
    "accepts": [
      "text/html",
      "text/plain"
    ]
  }
}

/config/{app}/flows/{flow}/locales/{locale}/mailTemplates/{template}/subject

get

Description

Returns the subject for this email template in the specified locale.

Request Headers

Accept string required
Possible values:
  • text/plain

Responses

200 OK

Response Example (text/plain)
Verify your email

406 Not Acceptable

A GET request was made with an Accept header, or a PUT/POST request was made with a Content-Type header, that is invalid. Refer to the headers section of this method to see what types are acceptable.

Response Example (application/json)
{
  "errors": {
    "received": "application/json",
    "accepts": [
      "text/html",
      "text/plain"
    ]
  }
}

put

Description

Update the subject for this email template in the specified locale.

Request Headers

Content-Type string required
Possible values:
  • text/plain

Request Example (text/plain)

Verify your email

Responses

204 No Content

Successfully updated the subject.

406 Not Acceptable

A GET request was made with an Accept header, or a PUT/POST request was made with a Content-Type header, that is invalid. Refer to the headers section of this method to see what types are acceptable.

Response Example (application/json)
{
  "errors": {
    "received": "application/json",
    "accepts": [
      "text/html",
      "text/plain"
    ]
  }
}

/config/{app}/flows/{flow}/locales/{locale}/strings

get

Description

Returns a list of Strings defined in the flow.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/locales/en-US/strings/emailAddressData",
    "name": "emailAddressData"
  },
  {
    "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/locales/en-US/strings/poweredByJanrain",
    "name": "poweredByJanrain"
  }
]

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

post

Description

Adds a String to the flow.

Security

Request Example (application/json)

{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/locales/en-US/strings/poweredByJanrain",
  "name": "poweredByJanrain",
  "value": "Powered by Janrain"
}

Responses

201 Created

Successfully created a new String.

Response Headers

Location string

The location of the newly-created String.

Example: Location: /config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/strings/poweredByJanrain

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

/config/{app}/flows/{flow}/locales/{locale}/strings/{string}

URI Parameters

string string required

get

Description

Returns a String definition from the flow.

Security

Responses

200 OK

Response Example (application/json)
{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/locales/en-US/strings/poweredByJanrain",
  "name": "poweredByJanrain",
  "value": "Powered by Janrain"
}

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

put

Description

Updates/replaces a string in the flow.

Security

Request Example (application/json)

{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/locales/en-US/strings/poweredByJanrain",
  "name": "poweredByJanrain",
  "value": "Powered by Janrain"
}

Responses

204 No Content

Successfully updated the String.

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

delete

Description

Removes a String from the flow.

Security

Responses

204 No Content

Successfully deleted the String.

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

/config/{app}/flows/{flow}/promote

post

Description

Promotes a flow to another app. The app_id and credentials must be specified in the request body. The flow name remains the same. If the other app has a flow with the same name, it will be overwritten.

Security

Request Example (application/json)

{
  "app_id": "someotherappid12345678",
  "client_id": "someotherclientid1234568",
  "client_secret": "someotherclientsecret12345678"
}

Responses

201 Created

Successfully created a new flow.

Response Headers

Location string

The location of the newly-created flow.

Example: Location: /config/someotherappid12345678/flows/myCoolFlow
Response Example (application/json)
{
  "_self": "/config/someotherappid12345678/flows/myCoolFlow",
  "name": "myCoolFlow",
  "version": "2015111705580676795"
}

404 Not Found

Capture application could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Capture application not found."
}

/config/{app}/flows/{flow}/screens

get

Description

Returns a dictionary of all screens for a flow.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/screens/traditionalAuthenticateMerge",
    "name": "traditionalAuthenticateMerge"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/screens/reactivateAccountSuccess",
    "name": "reactivateAccountSuccess"
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/screens/signIn",
    "name": "signIn"
  }
]

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/screens/{screen}

URI Parameters

screen string required

The screen name.

get

Description

Returns a list of information for a specific screen in a flow.

Security

Responses

200 OK

Response Example (application/json)
{
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/screens/signIn",
  "modal": true,
  "name": "signIn"
}

404 Not Found

Screen could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Screen not found."
}

put

Description

Updates the modal value for a screen in a flow. Requires 'modal' value as True/False and 'name' of a valid screen name. '_self' path is optional.

Security

Request Example (application/json)

{
  "modal": false,
  "name": "signIn"
}

Responses

204 No Content

Successfully updated the Screen.

404 Not Found

Screen could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Screen not found."
}

/config/{app}/flows/{flow}/strings

get

Description

Returns a list of Strings defined in the flow.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/emailAddressData",
    "name": "emailAddressData"
  },
  {
    "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/poweredByJanrain",
    "name": "poweredByJanrain"
  }
]

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

post

Description

Adds a String to the flow.
Strings must contain either schemaId or value. Do not provide both.

Security

Request Example (application/json)

{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/myCoolString",
  "name": "myCoolString",
  "schemaId": "myCoolAttribute",
  "value": {
    "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/myCoolString",
    "key": "a0861174cd5d46eb65d38ee3ec137d55",
    "path": "strings.myCoolString.value",
    "values": {
      "en-US": "This is a cool string"
    }
  }
}

Responses

201 Created

Successfully created a new string.

Response Headers

Location string

The location of the newly-created string.

Example: Location: /config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/strings/myCoolString

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

/config/{app}/flows/{flow}/strings/{string}

URI Parameters

string string required

get

Description

Returns a String definition from the flow.

Security

Responses

200 OK

Response Example (application/json)
{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/myCoolString",
  "name": "myCoolString",
  "schemaId": "myCoolAttribute",
  "value": {
    "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/myCoolString",
    "key": "a0861174cd5d46eb65d38ee3ec137d55",
    "path": "strings.myCoolString.value",
    "values": {
      "en-US": "This is a cool string"
    }
  }
}

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

put

Description

Updates/replaces a string in the flow.
Strings must contain either schemaId or value. Do not provide both.

Security

Request Example (application/json)

{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/myCoolString",
  "name": "myCoolString",
  "schemaId": "myCoolAttribute",
  "value": {
    "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/strings/myCoolString",
    "key": "a0861174cd5d46eb65d38ee3ec137d55",
    "path": "strings.myCoolString.value",
    "values": {
      "en-US": "This is a cool string"
    }
  }
}

Responses

204 No Content

Successfully updated the String.

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

delete

Description

Removes a String from the flow.

Security

Responses

204 No Content

Successfully deleted the String.

404 Not Found

String could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "String not found."
}

/config/{app}/flows/{flow}/translations

get

Description

Returns a dictionary of all translations.

Request Headers

Accept string

Specify the format to return.

Possible values:
  • application/json
  • text/csv

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/991a5781-cbe1-4770-bbf1-395168a11d59",
    "key": "991a5781-cbe1-4770-bbf1-395168a11d59",
    "path": "fields.someField.label",
    "values": {
      "en-US": "Register",
      "fr-FR": "Faire inscrire",
      "it-IT": "Registrati"
    }
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/1ab1f15d-2555-49af-bd88-cf984ad40a13",
    "key": "1ab1f15d-2555-49af-bd88-cf984ad40a13",
    "path": "fields.anotherField.label",
    "values": {
      "en-US": "Hello!",
      "fr-FR": "Bonjour!",
      "it-IT": "Bongiorno!"
    }
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/a8670648-f9f7-4c0b-92cd-e477fe67b617",
    "key": "a8670648-f9f7-4c0b-92cd-e477fe67b617",
    "path": "fields.oneMoreField.label",
    "values": {
      "en-US": "Goodbye!",
      "fr-FR": "Au revoir!",
      "it-IT": "Arrivederci!"
    }
  }
]
Response Example (text/csv)
path,key,en-US,it-IT,fr-FR
fields.someField.label,991a5781-cbe1-4770-bbf1-395168a11d59,Register,Registrati,Faire inscrire
fields.anotherField.label,1ab1f15d-2555-49af-bd88-cf984ad40a13,Hello!,Bongiorno!,Bonjour!
fields.oneMoreField.label,a8670648-f9f7-4c0b-92cd-e477fe67b617,Goodbye,Arrivederci!,Au revoir!

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

patch

Description

Updates existing translations. This endpoint does not delete data.

Request Example (application/json)

[
  {
    "key": "a8670648-f9f7-4c0b-92cd-e477fe67b617",
    "values": {
      "en-US": "See ya!"
    }
  }
]

Request Example (text/csv)

key,en-US
a8670648-f9f7-4c0b-92cd-e477fe67b617,See ya!

Responses

204 No Content

Successfully updated the translations.

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

post

Description

Adds new translation strings to the translations dictionary. You must supply a list of values for each locale defined in the flow. For a list of locales, call /config/{app}/flows/{flow}/locales.

Request Example (application/json)

[
  {
    "values": {
      "en-US": "Hello!",
      "fr-FR": "Bonjour!",
      "it-IT": "Bongiorno!"
    }
  },
  {
    "values": {
      "en-US": "Goodbye!",
      "fr-FR": "Au revoir!",
      "it-IT": "Arrivederci!"
    }
  }
]

Request Example (text/csv)

en-US,it-IT
Hello!,Bongiorno!
Goodbye,Arrivederci!

Responses

201 Created

Returns a partial rendering of the affected locales.

Response Headers

Content-Location string

The location of the full translation dictionaries.

Example: Content-Location: /config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations
Response Example (application/json)
{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/translations",
  "translations": [
    {
      "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/translations/5ac7ea6d-48b8-46d5-abed-ac3b6b12268f",
      "path": "",
      "values": {
        "it-IT": "Arrivederci!",
        "en-US": "Goodbye!",
        "fr-FR": "Au revoir!"
      },
      "key": "5ac7ea6d-48b8-46d5-abed-ac3b6b12268f"
    },
    {
      "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/translations/6bdb687e-3d9f-4018-be6b-613011ad8b70",
      "path": "",
      "values": {
        "it-IT": "Bongiorno!",
        "en-US": "Hello!",
        "fr-FR": "Bonjour!"
      },
      "key": "6bdb687e-3d9f-4018-be6b-613011ad8b70"
    }
  ]
}

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/translations/{key}

URI Parameters

key string required

get

Description

Returns a dictionary of all translations for a key.

Responses

200 OK

Response Example (application/json)
{
  "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/991a5781-cbe1-4770-bbf1-395168a11d59",
  "key": "991a5781-cbe1-4770-bbf1-395168a11d59",
  "path": "",
  "values": {
    "en-US": "Elbow grease.",
    "it-IT": "Olio di gomito."
  }
}

404 Not Found

Translation string could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Translation string not found."
}

delete

Description

Deletes a translation string if it is not in use.

Responses

204 No Content

Successfully deleted the Translation string.

404 Not Found

Translation string could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Translation string not found."
}

409 Conflict

The request could not be completed because the string is in use.

Response Example (application/json)
{
  "errors": "Cannot delete a translation key that is still in use"
}

/config/{app}/flows/{flow}/versions

get

Description

Returns a list of all versions for a particular flow, along with a change note for each version.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "change": "Updated field: givenName",
    "version": "HEAD"
  },
  {
    "change": "Updated field: givenName",
    "version": "201601201956110829464"
  },
  {
    "change": "Updated field: firstName",
    "version": "201601201954520534731"
  },
  {
    "change": "Created.",
    "version": "201601201954370741786"
  }
]

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow not found."
}

/config/{app}/flows/{flow}/versions/{version}

URI Parameters

version string required

get

Description

Returns the version of the flow.

Security

Responses

200 OK

Response Example (application/json)
{
    "authProfileData": [
        "name",
        "verifiedEmail",
        "identifier"
    ],

    "...shortened...": "...for brevity...",

    "userData": [
        "email",
        "displayName"
    ],
    "version": "00000000-0000-0000-0000-000000000000"
}

404 Not Found

Flow Version could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow Version not found."
}

post

Description

Restores flow to version

Security

Responses

404 Not Found

Flow Version could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Flow Version not found."
}

/config/{app}/schemas

get

Description

Returns a list of entity types.

This is just a presentation layer on top of apid's /entityType.list.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/schemas/user",
    "name": "user"
  }
]

404 Not Found

Capture application could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Capture application not found."
}

/config/{app}/schemas/{schema}

URI Parameters

schema string required

The schema name.

get

Description

Returns a list of attributes in the schema.

This is just a presentation layer on top of apid's /entityType.

Security

Responses

200 OK

Response Example (application/json)
[
  {
    "attribute_path": "birthday",
    "type": "dateTime"
  },
  {
    "attribute_path": "primaryAddress.mobile",
    "type": "string"
  }
]

404 Not Found

Schema could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "Schema not found."
}

/config/{app}/schemas/{schema}/{attribute}

URI Parameters

attribute string required

The schema attribute name.

schema string required

get

Description

Returns the definition of a Schema Attribute

Security

Responses

200 OK

Response Example (application/json)
{
  "case-sensitive": true,
  "length": 1,
  "name": "test",
  "type": "string"
}

404 Not Found

SchemaAttribute could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "SchemaAttribute not found."
}

put

Description

Creates a Schema Attribute

Security

Request Example (application/json)

{
  "case-sensitive": true,
  "length": 1,
  "name": "test",
  "type": "string"
}

Responses

204 No Content

Successfully updated the SchemaAttribute.

404 Not Found

SchemaAttribute could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "SchemaAttribute not found."
}

delete

Description

Deletes a Schema Attribute

Security

Responses

204 No Content

Successfully deleted the SchemaAttribute.

404 Not Found

SchemaAttribute could not be found. Please check the value and try again.

Response Example (application/json)
{
  "errors": "SchemaAttribute not found."
}