# External ID not getting saved in topic created by API

**URL:** https://meta.discourse.org/t/external-id-not-getting-saved-in-topic-created-by-api/296935
**Category:** Development
**Tags:** rest-api
**Created:** [February 27, 2024, 5:56pm UTC](https://meta.discourse.org/t/external-id-not-getting-saved-in-topic-created-by-api/296935 "2024-02-27T17:56:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)
#### Post date: [February 27, 2024, 5:56pm UTC](https://meta.discourse.org/t/external-id-not-getting-saved-in-topic-created-by-api/296935/1 "2024-02-27T17:56:06Z")

</div>

I’m importing topics with a script and trying to set the external\_id for each topic but it’s not working. I can see that the external\_id field is included in the POST to create the topic. The topic is created successfully but when I look at the new topic in the database the external\_id field is NULL.

Here are the request headers & payload.

 ![Screenshot 2024-02-27 at 11.50.39 AM](https://global.discourse-cdn.com/meta/original/4X/3/3/a/33ab0a72387e5731c96c3357de7e6ad8bd238b67.png)

 ![Screenshot 2024-02-27 at 11.45.39 AM](https://global.discourse-cdn.com/meta/original/4X/c/f/b/cfbd25c9b7c0f18de382e77707e76e8f22de17f9.png)

Any idea why the external ID isn’t being saved with the new topic?
