> For the complete documentation index, see [llms.txt](https://docs.agentnoon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agentnoon.com/technical-documentation/what-is-a-live-data-integration/available-data-integration-methods/importing-data-via-rest-api.md).

# Importing Data via REST API

### Prerequisites

* Agentnoon account
* Valid API key for authentication. This can be requested from <SupportSWP@dayforce.com>
* CSV file to be uploaded.
* API endpoint URL for file upload.
* Whitelisted IP Address - Contact <SupportSWP@dayforce.com> to whitelist the IP address from which you will be uploading data.
* Schema Configuration - Work with your account manager to configure Agentnoon to align with the schema of the data being uploaded.
* Upload Cadence - Determine the appropriate upload frequency based on your business needs.

### Steps

1. Prepare the CSV File
2. Ensure the CSV file is properly formatted.
3. Verify that the data within the CSV file is accurate and complete.
4. Configure Agentnoon
5. Collaborate with your account manager to configure Agentnoon's schema to match the structure of the data within your CSV file.
6. Construct the API Request
7. Use an HTTP client or programming language capable of making POST requests.
8. Set the API endpoint URL as the destination for the request.
9. Include the CSV file in the request body.
10. Set the \`Content-Type\` header to \`multipart/form-data\`.
11. Include the bearer token in the \`API-KEY\` header as \`\<api-key>\`.
12. Request the Board ID to Agentnoon’s account manager
13. Send the API Request
14. Execute the constructed API request.
15. Upload API URI: <https://api.agentnoon.co/v1/import-mapping/\\>\<my\_board\_id>/import-csv-file
16. Handle the API Response
17. Check the HTTP status code of the response.
18. 200 OK indicates a successful upload.
19. Other status codes indicate errors.
20. Parse the response body for any additional information or error messages.

### Summary Checklist

1. Verify the API KEY
2. Prepare the CSV file.
3. Work with your account manager to configure the Agentnoon schema.
4. Contact <SupportSWP@dayforce.com> to whitelist your IP address.
5. Construct the API request.
6. Send the API request.
7. Handle the API response.

#### Example Request Headers

| Header       | Value                    |
| ------------ | ------------------------ |
| API-KEY      | \`an\_U8RgYNME5Hc88Knb\` |
| Content-Type | \`multipart/form-data\`  |

#### Example Request Body

The request body should be in \`multipart/form-data\` format, including the CSV file. The specific format will depend on the HTTP client or programming language used.

### Error Handling

| HTTP Status Code | Description                                                                                                                                                                         |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400              | Bad Request - The request could not be understood or contained invalid data.                                                                                                        |
| 401              | Unauthorized - Authentication failed due to an invalid or missing API Key.                                                                                                          |
| 403              | Forbidden - The request was valid, but the server is refusing to respond to it. Contact <SupportSWP@dayforce.com> if you receive this error to ensure your IP has been whitelisted. |
| 415              | Unsupported Media Type - The server does not support the provided file type.                                                                                                        |
| 500              | Internal Server Error - An unexpected error occurred on the server.                                                                                                                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agentnoon.com/technical-documentation/what-is-a-live-data-integration/available-data-integration-methods/importing-data-via-rest-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
