Guest API POST /api/v2/conversations/messaging/messages returns 401 despite valid token

Trying to bypass the widget and send messages directly via the Guest API. My Node.js script uses the same bearer token that works fine for the analytics endpoints. Here’s the request:

const res = await axios.post(
 `https://api.mypurecloud.com/api/v2/conversations/messaging/messages/${conversationId}/messages`,
 { text: 'test' },
 { headers: { Authorization: `Bearer ${token}` } }
);

Getting a 401 Unauthorized. The token scopes look correct in the debugger. Is there a specific scope missing for the Guest API or is the endpoint path wrong?