# Creating an API definition

Use the POST method on the /api-definitions endpoint to import an API definition to Talend Cloud API Designer.

## Before you begin

You have generated a Personal Access Token. For further information, see [Generating a Personal Access Token](https://help.qlik.com/talend/r/en-US/Cloud/management-console-user-guide/cloud-access-token).

## Procedure

1. Open Talend Cloud API Tester and create a new request.
2. In the METHOD drop-down list, select POST.
3. Enter the following URI with the correct region parameter:

   https://apid.{region}.cloud.talend.com/api/v1/api-definitions

   The region can be:
   * us-west
   * us
   * eu
   * ap
   * au

   For more information, see [Accessing Talend Cloud applications](https://help.qlik.com/talend/en-US/installation-guide-windows/Cloud/talend-cloud-application-url).
4. Optional: Expand QUERY PARAMETERS and click Add query parameters.

   The following parameters are available:
   | Parameter | Description |
   | --- | --- |
   | format | Format of the API definition that you are<br>importing. The value can be:<br><br><ul> <li> <kbd>OpenApi3</kbd> (default value)</li> <li> <kbd>Swagger20</kbd> </li> <li> <kbd>Swagger12</kbd> </li> <li> <kbd>Raml10</kbd> </li> <li> <kbd>Raml08</kbd> </li> </ul> |
   | failOnWarnings | Specify if you want to stop the process at the<br>first warning on the model transformation. The value can be<br>true or false. The default value is<br>false. |
   | mainFile | If you are importing an API definition with<br>multiple files in a ZIP file, enter the name of the main definition<br>file. |
5. Click the Add header button and enter Authorization in the name field and Bearer followed by a space and your token in the value field.

   Information noteTip: In Talend Cloud API Tester, you can add your token as a private environment variable and reference it in your requests using the expression builder. For more information, see [Using environments](https://help.qlik.com/talend/r/en-US/Cloud/api-tester-user-guide/using-environments).
6. Optional: Edit the Content-Type header.

   By default Talend Cloud API Tester adds a Content-Type header with the value application/json to POST requests. If you want to import your definition as a YAML or ZIP file, change this value to application/x-yaml or application/zip.
7. Add your API definition:
   * Enter the definition in the BODY text box. ![The body text box contains an API definition.](https://help.qlik.com/talend/en-US/api-user-guide/Resources/images/create_api_definition_1_enter_definition.png)
   * Click the Text drop-down list above the request body and select File, then browse to the file or drag and drop it. !["File" is selected and a message asks to drag and drop a file in this area.](https://help.qlik.com/talend/en-US/api-user-guide/Resources/images/create_api_definition_2_import_file.png)
8. Once your request is configured, click Send.

## Results

The API definition is created in Talend Cloud API Designer. The response returned contains its ID and other metadata such as the creator ID and creation date. ![On Talend Cloud API Designer, a response containing the API definition ID and other metadata.](https://help.qlik.com/talend/en-US/api-user-guide/Resources/images/create_response.png)