Keith John Hutchison
Keith John Hutchison

Reputation: 5277

Changing a discourse topic slug via api

We’re moving a Wordpress Sabai Discussion forum to Discourse.

Within Sabai, a title can be substantially different from the slug.

I’ve tried passing in a different slug and tried a topic_slug on a POST. I’ve tried passing in a different slug and tried a topic_slug on a PUT. The slug is not changing.

Example {“title”: “This is a test question for the system”, “slug”:“test-question”}

With the discourse API how can you make the slug to be substantially different from the title?

Upvotes: 0

Views: 171

Answers (1)

Keith John Hutchison
Keith John Hutchison

Reputation: 5277

From Régis Hanol https://meta.discourse.org/u/zogstrip/summary

https://meta.discourse.org/t/changing-a-topic-slug-via-api/101893/2?u=csmu

The slug is automatically generated from the title of the topic.

I don’t think there’s a way to set the slug via the API.

Upvotes: 0

Related Questions