Merci pour votre réponse
J’ai créé ce script vous permettant de créer une catégorie puis de modifier sa description :
curl -X POST "https://site-discourse/categories.json" \
-H "Api-Key: api-key" \
-H "Api-Username: api-username" \
-d "name=Catégorie 1"
sleep 2
latest_posts_response=$(curl -X GET "https://site-discourse/posts.json" \
-H "Content-Type: application/json" \
-H "Api-Key: api-key" \
-H "Api-Username: api-username")
post_id=$(echo $latest_posts_response | jq '.latest_posts[0] .id')
curl -X PUT "https://site-discourse/posts/$post_id.json" \
-H "Content-Type: application/json" \
-H "Api-Key: api-key" \
-H "Api-Username: api-username" \
-d '{
"post": {
"raw": "Description de la catégorie 1"
}
}'