How can I send submissions via new API or other method

I’m trying to find a complete API documentation but without luck, until now I found the following approach:

Using the Kobo REST API ( that resource explain some endpoints explain how to get the access token and some endpoint usage

I need more detailed documentation,

I tried to use de old API but I got always the same 500 error message when I send a submission. Now trying to use the new I found the entry point: /assets/uid/submissions but in the documentation say:

**It's not allowed to create submissions with kpi 's API**

How can I send data to kobo, via curl or using some programming language like JavaScript or python?

Thanks so much for the help.

Hi @finlay,

Would you mind sharing the screenshot of the curl command that you had used along with a description of what you wish to do and the error message that you see at your end. Maybe the community could help you out if there is any typo in your curl command.

Have a great day!

Thanks @Kal_Lam , for your reply:

for API v1:

curl -X POST -F xml_submission_file=submissions.xml https://kc.domain.tld/api/v1/submissions -u user:secret

A long html with:

500 Error

for API v2:

curl -X POST  https://kf.domain.tld/assets/adpukpDhKvFEw8y6SRUtDv/submissions.json -H "Authorization: Token TOKENSTRING" -d "{'field':'Text'}"

{"detail":"Method \"POST\" not allowed."}
  • Looks like you might be missing an @ symbol before submissions.xml.
  • Since your submissions.xml has a plural filename, I advise you that xml_submission_file must contain only one submission. If you have multiple submissions, POST multiple times.
  • Try your command with (create a free account there if you haven’t already) before trying on your private instance (assuming you have one based on kc.domain.tld in your example). If you still receive a 500 error, we can review our logs to see why.

I fix it running:

curl -v -X POST -F "xml_submission_file=@submission.xml;type=text/xml" https://kc.domain.tld/api/v1/submissions -u user:pass

The sintaxis of submission.xml is:

<?xml version="1.0" ?>
<data id="formId" >



Great, I’m glad it’s working for you. Some of your XML looks a bit odd; I’m not sure what type="str" is doing, and you really should include <meta><instanceID> (the specification requires it) even if KoBoCAT accepts a submission without it.

Here’s an example of an expert creating XML submissions programmatically. I reformatted the XML template he uses to be more readable and included it below.

<?xml version='1.0' ?>
<data id="covid-19_A0" version="2020032802" xmlns:ev="" xmlns:h="" xmlns:jr="" xmlns:odk="" xmlns:orx="" xmlns:xsd="">

Yes the xml looks more than bit odd, thanks for the recommendations I’ll update the post.


Good Day jnm, Please I have been having sleepless night. I want to post submission via api but to no avail.

This is my code and the error message is {“detail”:“Method "POST" not allowed.”}