Convert data with a saved template using an API
Use our API to run one of your saved templates on an uploaded file, a URL, or a saved dataset
POST
https://dataconverter.io/api/v1/convert/template
Don't have a saved template?
Convert files directly instead. You'll send uploadSettings and downloadSettings with each request.
After signing up and verifying your email, you will be able to create an API Token in your account settings.
The template supplies the source and target formats, so you only send its ID plus your data. Copy template IDs from your Saved Templates page and dataset IDs from your Datasets page.
Headers
-
Authorization (required)
Bearer <<YOUR_API_TOKEN_HERE>>
Request Body — (multipart/form-data)
-
templateId (required)
string -
file (required)
string <binary>
Request Body — (application/json)
-
templateId (required)
string -
url
string -
datasetId
string -
Send exactly one of
urlordatasetId.
Upload a file
curl -X POST "https://dataconverter.io/api/v1/convert/template" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-F "templateId=YOUR_TEMPLATE_ID" \
-F "file=@data.csv" \
-OJ
Use a URL or dataset
curl -X POST "https://dataconverter.io/api/v1/convert/template" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"templateId":"YOUR_TEMPLATE_ID","datasetId":"YOUR_DATASET_ID"}' \
-OJ
-OJ saves the download using the file name and format defined by the template.