Private Message Send API

Stai impostando l’archetipo? In futuro, se includi la richiesta che stai inviando, sarà più facile aiutarti.

Il seguente esempio funziona per me:

curl https://$DISCOURSE_HOSTNAME/posts \
  -H "api-key: $DISCOURSE_API_KEY" \
  --data 'title=Testing PM creation&archetype=private_message&target_recipients=user1,user2' \
  --data-urlencode 'raw=PM body, long enough to meet site rules & may be complex ♥'

:information_source: se stai utilizzando una chiave API all_users, devi anche specificare api-username