Take a look at this example:
dynamicVariable.bpmn (6.8 KB)
You can correlate with a POST to /message in teh API such as:
{
"messageName" : "MyCustomMessage",
"localCorrelationKeys" : {
"customMatchVariable" : {"value" : "cat", "type": "String"}
}
}