403 Forbidden when calling POST /api/v2/recordings/recordings/stop via New Relic Lambda

We are instrumenting Genesys Cloud call recordings for New Relic APM. The goal is to trigger a custom event whenever a recording stops, so we can correlate it with specific transaction traces.

The setup involves a Lambda function that listens to the routing.recording.stop webhook. Inside the handler, we make an authenticated POST request to the Recording API to fetch the metadata before pushing it to New Relic.

The issue is that the stop command itself is failing with a 403 Forbidden error, even though the service account has the recording:recording:write permission. It works fine for starting recordings (/start), but /stop throws this error.

Here is the relevant Python snippet using requests:

import requests
import json

headers = {
 'Authorization': f'Bearer {access_token}',
 'Content-Type': 'application/json'
}

# This works
start_url = f"{base_url}/api/v2/recordings/recordings/start"
start_payload = {"recordingType": "interaction"}
requests.post(start_url, headers=headers, json=start_payload)

# This fails with 403
stop_url = f"{base_url}/api/v2/recordings/recordings/stop"
stop_payload = {"recordingType": "interaction"}
response = requests.post(stop_url, headers=headers, json=stop_payload)
print(response.status_code) # 403
print(response.json())

The error payload looks like this:

{
 "code": "forbidden",
 "message": "Forbidden",
 "status": 403,
 "contextId": "abc-123-def"
}

We have verified the token is valid. The service account is an admin. We are in the America/Sao_Paulo timezone, but that shouldn’t matter for the API itself.

Is there a specific permission missing for stopping recordings programmatically? Or is the endpoint path incorrect for the stop action?