# How can I add document by api?

**URL:** <https://community.swiftype.com/t/how-can-i-add-document-by-api/336>\
**Category:** API\
**Tags:** api\
**Created:** [March 23, 2017, 5:24am UTC](https://community.swiftype.com/t/how-can-i-add-document-by-api/336 "2017-03-23T05:24:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elias](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@elias](https://community.swiftype.com/u/elias)\
**Post date:** [March 23, 2017, 5:24am UTC](https://community.swiftype.com/t/how-can-i-add-document-by-api/336/1 "2017-03-23T05:24:36Z")

</div>

[https://api.swiftype.com/api/v1/engines/enginename/document\_types/stores/documents.json?auth\_token=MyAPIKey&document=](https://api.swiftype.com/api/v1/engines/enginename/document_types/stores/documents.json?auth_token=MyAPIKey&document=){“external\_id”:“1”,“fields”:[{“name”:“title”,“value”:“Mat %26 Max”,“type”:“string”}]}

I tried to add document using the api like the above.  
But I received the following response.

{  
“error”: “Internal server error. Please email [support@swiftype.com](mailto:support@swiftype.com) if this error persists.”  
}

Plz solve this problem.  
Thanks.
