CSV Import API
Transform and validate your CSV data using our AI-powered API. Automatically clean, standardize, and map your data to a canonical format.
POST
/csv-import
Request
Send your CSV data for processing. The API accepts both raw CSV content and JSON-wrapped CSV data.
Headers
Authorization: Bearer your_api_key_hereContent-Type: text/csvX-Canonical-Fields: product_name,quantity_sold,unit_priceX-Return-Transformed: true # Optional, defaults to false
Request Formats
Content-Type: text/csvProduct Name,Units Sold,PriceProduct A,100,29.99Product B,50,19.99
Response
Returns either the field mapping or the transformed CSV, depending on the X-Return-Transformed header.
{"mappedFields": {"Product Name": "product_name","Units Sold": "quantity_sold","Price": "unit_price"}}
Code Examples
# Send raw CSVcurl -X POST https://api.sheetsheep.com/csv-import \-H "Authorization: Bearer your_api_key_here" \-H "Content-Type: text/csv" \-H "X-Canonical-Fields: product_name,quantity_sold,unit_price" \-H "X-Return-Transformed: true" \--data-binary @data.csv# Send JSON-wrapped CSVcurl -X POST https://api.sheetsheep.com/csv-import \-H "Authorization: Bearer your_api_key_here" \-H "Content-Type: application/json" \-H "X-Canonical-Fields: product_name,quantity_sold,unit_price" \-d '{"csvData": "Product,Units,Price\nA,100,29.99"}'