I can confirm this works:
{{restEndpoint}}/messaging/v1/email/messages/{{$guid}}
Headers:
Content-Type: application/json
Authorization: Bearer {{accessToken}}
Body:
{
"definitionKey": "abcde",
"recipient":
{
"contactKey": "subscriberKey12345",
"to": "[email protected]",
"attributes": {
"UserAttribute_1": "value_1",
"UserAttribute_n": "value_n"
}
}
}
optionally also without attributes
{
"definitionKey": "abcde",
"recipient":
{
"contactKey": "subscriberkey12345",
"to": "[email protected]"
}
}
This looks pretty similar to your code, so maybe the error is inside your variables.
Please ensure the [ ] are not physically in your code.
"abcde" in my example is the event definition key of my journey.
{{$guid}} in my example is a POSTMan standard to create a unique identifier for the sendout event, and is NOT the same as the email customerkey. This is a reference number that you set by sending the request for the sendout, not any existing IDs or key from inside SFMC.