How to assign a `external_id` to a topic?

I know that there’s a way to get a topic via external ID, but is there a way to assign an external_id to a topic without one?

It’s not possible to add an external_id to an existing topic via an API request. For that to work, external_id would need to be added to the tracked_topic_fields in a similar way to how featured_link has been added here:

It should be possible to add an external_id when you first create a topic via the API. The only ways I can think of to update the external_id of an existing topic would be to make the change from the Rails console, or possibly from a Discourse plugin.


Are you importing a bunch of topics? Maybe use an import script?

What problem are you solving with the external ID?