Update theme with API


(Eric) #1

Hello,

Is there a way to update the HTML and CSS of an existing theme using the Discourse API? In our use case, we’d like to automatically update our theme as part of a CI build.

I didn’t find anything about it in the API docs, but wanted to double check.

Thanks,
Eric


(Simon Cossar) #2

Yes, it can be done. See How to reverse engineer the Discourse API for details about how to find the correct request. It’s working for me using Postman to send the request, with the api_key and api_username set as query params, and the theme json in the request body.


(Eric) #3

Thanks @Simon_Cossar, that link is super informative!