# Incorrect format, please input the right format to import

**URL:** <https://community.postman.com/t/incorrect-format-please-input-the-right-format-to-import/51307>\
**Category:** Help Hub\
**Tags:** scripts\
**Created:** [September 4, 2023, 2:17am UTC](https://community.postman.com/t/incorrect-format-please-input-the-right-format-to-import/51307 "2023-09-04T02:17:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![toguro.genkai1992](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@toguro.genkai1992](https://community.postman.com/u/toguro.genkai1992)\
**Post date:** [September 4, 2023, 2:17am UTC](https://community.postman.com/t/incorrect-format-please-input-the-right-format-to-import/51307/1 "2023-09-04T02:17:56Z")

</div>

Hello! Good day to everyone. I need your expertise on this json script. I’m trying to import this in POSTMAN but I’m having the Incorrect format error. This is the script for your reference. I appreciate your help on this. Thanks!!!

```auto
var myHeaders = new Headers();

var formdata = new FormData();
formdata.append("accname", "testAccount");
formdata.append("api_key", "API_KEY_123");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: formdata,
  redirect: 'follow'
};

fetch("https://pro.dat.com/safpi/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

```

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 4, 2023, 10:28am UTC](https://community.postman.com/t/incorrect-format-please-input-the-right-format-to-import/51307/2 "2023-09-04T10:28:27Z")

</div>

Hey @toguro.genkai1992 👋

Welcome to the Postman Community! :postman:

The import feature only allows specific formats to be used, Collections, Environments, API Specs, etc.

> **[Importing data into Postman | Postman Learning Center](https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-data/)**
>
> Importing data into Postman: documentation for Postman, the collaboration platform for API development. Create better APIs—faster.

Your example looks like a `fetch` script, you would need to manually enter that into the request builder.

If you were to get the same request in cURL format, you could paste that directly into the URL address bar and it will populate those various parts of the request.

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [September 4, 2023, 11:06am UTC](https://community.postman.com/t/incorrect-format-please-input-the-right-format-to-import/51307/3 "2023-09-04T11:06:04Z")

</div>

That looks like a straight forward request that you would setup using the Postman GUI.

Should take all of 2 minutes?

It only looks like you are setting two form data key\value pairs, and although it has code for headers, it doesn’t look like its adding any extra headers (so can probably be ignored).

![image](https://us1.discourse-cdn.com/getpostman/original/3X/5/3/530506f650abbf784b398590d634587577070406.png)

If you are new to Postman, then I would suggest a visit to the Learning Centre.

[Overview | Postman Learning Center](https://learning.postman.com/docs/introduction/overview/)

Including the Postman Training links under “Other Resources”.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/b/3b763d56d66445f4c34eeb66c64631335559a741.png)

I would recommend the “Galaxy APIs 101” course first as it gets you used to the application features.

Then the “Galaxy Testing and Automation” course which teaches you how to assert the responses. It includes defining and using variables from responses.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [October 19, 2023, 11:06am UTC](https://community.postman.com/t/incorrect-format-please-input-the-right-format-to-import/51307/4 "2023-10-19T11:06:55Z")

</div>

Closed on October 19, 2023, 11:06am UTC

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.
