I’m hoping you can assist me with an issue I’m having with the Management API with regards to sending a verification email. I am able to get the following code in curl to work but in Postman, I’m getting an error that I cannot resolve.
From curl:
[appldev@orlap02:~]$ curl -L ‘…api/v2/jobs/verification-email’ \
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-H 'Authorization: Bearer '$API_ACCESS_TOKEN
-d ‘{“user_id”:“auth0|681282b187b33ccc37385da8”,“client_id”:“ItMejeJxtdcUjogBFh0vxvCbCoUf3QYD”}’
{“type”:“verification_email”,“status”:“pending”,“created_at”:“2025-05-01T16:33:55.246Z”,“id”:“job_CZ2mXv6BOBiKOaLR”}
And it sends the email as expected.
But in Postman (and PL/SQL), using the exact same parameters, I’m getting the following error:
{
“statusCode”: 400,
“error”: “Bad Request”,
“message”: “Path validation error: ‘String does not match pattern ^job_[A-Za-z0-9]{16}$: verification-email’ on property id (ID of the job).”,
“errorCode”: “invalid_uri”
}
Hi @tbland
By using either the cURL or if you pass in the body parameters of an email verification job through Postman, the request should be fine.
I have tested the job using both the Management API page and Postman and the job was created successfully several times.
I passed in the body as raw
and these are the parameters I have used:
{
"user_id": "{{random_user.id}}",
"client_id": "{{random_application.id}}"
}
And this is the response received through Postman:
{
"type": "verification_email",
"status": "pending",
"created_at": "2025-05-02T20:23:43.501Z",
"id": "job_tCznXcO28TOGONNu"
}
May I ask if you are using the right api token or domain inside Postman? If so, what are the settings used for the email verification job inside postman?
Kind Regards,
Nik
Hi Nik,
Thanks for your response. The token is the same as used in the other API endpoints for the management API and if I don’t have a correct one, I get a 401 error, so I don’t think that is the issue.
I noticed that you used extra ‘{’ brackets so I tried that as well but am still getting the 400 error. I am using a raw body with {“user_id”:“auth0|681282b187b33ccc37385da8”,“client_id”:“ItMejeJxtdcUjogBFh0vxvCbCoUf3QYD”}.
All of my other management API calls are working perfectly, it’s only this one that is giving me trouble. Note that all of my API’s are ultimately coded in Oracle PL/SQL but Postman is giving the exact same error response as PL/SQL so I use that as the test.
Thanks for your help,
Tim
Hi Nik,
I’ve figured out the issue, using get when needed post, don’t know how I missed that.
Sorry for the confusion.
Best Regards,
Tim
Thanks for letting us know!
If you have any other questions, let us know or post again on the community!
Kind Regards,
Nik