I am trying to update json file from local machine to cartodb.I used below command but it is not working. curl -v -F file=@C:/Users/k/Desktop/In/da.json --request "PUT" "https://account-name.cartodb.com/api/v1/synchronizations/Import-ID/sync_now?api_key={API-KEY}"

Is there any specific command for updating data from local machine?

  • PUT? should it be POST? docs.cartodb.com/cartodb-platform/maps-api.html curl -X POST 'https://{account}.cartodb.com/api/v1/map/named/:template_id' -H 'Content-Type: application/json'
    – Mapperz
    May 27, 2015 at 17:38
  • Initially I used POST command for uploading data in to cartodb after that I am just trying to replace old data with new data.Every it is creating new file instead of replacing old file.
    – Kavi
    May 27, 2015 at 17:57

1 Answer 1


Once you have created a Sync table you cannot update the field from which it's being updated.

Also, a Sync Table cannot be created from a local file. CartoDB needs the file to be publicly accessible in the Internet (or safe inside your Dropbox/GDrive account).

If you already have a Sync Table and you want to force a Sync, just follow the API:

curl -v --request "PUT" "https://{account}.cartodb.com/api/v1/synchronizations/<import_id>/sync_now?api_key={account API Key}" --header "Content-Length:0"

If you have a Sync Table but you want to Sync another file, you'll have to start from the beginning of the process, just creating a new table.

If you have a local file and you want it to be Synced, you can use Dropbox/Google Drive or use the SQL API in order to add your data by pieces in CartoDB tables by using INSERT or UPDATE statements.

This question is very related to yours: Can you force cartoDB to read a file as a synced table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.