REST (Custom) Activity Format

You can use the REST activity to extend Journey Builder by posting requests to API endpoints.

Helpful Hints 

  • The outcome of this decision affects goal statistics.
  • API timeouts can impact the execution of this activity. For more information about limits that apply to Marketing Cloud Engagement APIs, see API Limits and Guidelines.
  • If the useJwt property is set to true for any of the REST activity's methods, then a JWT for the account is generated, encoded, and sent as the POST body.
  • If the execute method timeout is greater than the maximum allowed for the account, then use the maximum timeout value as configured in the account settings.

Compatibility Information 

This information is provided for developers upgrading their activities from the legacy format to the Journey Specification.

0.5 SerializedObject1.0 Serialized Object
execute.uriconfigurationArguments.url
execute.verbconfigurationArguments.method
execute.bodyarguments.execute-body
execute.format(Not supported—the default format is JSON)
execute.useJwtconfigurationArguments.useJwt
execute.timeoutconfigurationArguments.timeout
execute.inArgumentsarguments.executeInArguments
execute.headersarguments.header

Sample Activity 

{
    "key": "rest-1",
    "name": "My Rest Activity",
    "type": "Rest",
    "metaData": {
        "flowDisplayName":"myFlow" // Displayed in the UI
    },
    "outcomes": [
        {
            "key": "rest-1-outcome-1",
            "next": "<key of next activity>"
        }
    ],
    "configurationArguments": {
        "save": {
            "url": "https://www.example.com/endpoint",
            "useJwt": false,
            "timeout": 3000,
            "headers": "https://www.example.com/endpoint",
            "body":"Hello"
        },
        "validate": {
            "url": "https://www.example.com/endpoint",
            "useJwt": false,
            "timeout": 3000,
            "headers": "https://www.example.com/endpoint",
            "body":"Hello"
        },
        "publish": {
            "url": "https://www.example.com/endpoint",
            "useJwt": false,
            "timeout": 3000,
            "headers": "https://www.example.com/endpoint",
            "body":"Hello"
        }
    },
    "arguments": {
        "execute": {
            "url": "https://www.example.com/endpoint",
            "headers": "",
            "inArguments": [{
                 "myArgument":""
             }],
            "body":"Hello . This field kept for backward compatibility.", // notice the Data Binding
            "method": "POST",
            "useJwt": true,
            "timeout": 3000
        }
    }
}

Related Items