Not every API will return a Response body/content when executing completed, some APIs only return a status code (such as 200 OK , 204 Created ).
The API in your case is used to create a repository dispatch event to trigger a workflow run, when executing completed, this API will only return a status code and No Response Content.
If you execute the API on a client (such as Postman), you can directly see the status code and Response body on the client UI.
If you execute the API in the workflow, you can try using Invoke-WebRequest to execute the API and get the status code. In your your case, it will return 204 if the API completed successfully.
$response = Invoke-WebRequest -Uri $uri -Headers $headers -Body $body -Method POST
$StatusCode = $Response.StatusCode
If an API has Response body returned, you can try using Invoke-RestMethod to execute the API and get Response body.
$response = Invoke-RestMethod -Uri $uri -Headers $headers -Body $body -Method POST
$response | ConvertTo-Json