# Ajax post to JSON API

**URL:** <http://forum.companieshouse.gov.uk/t/ajax-post-to-json-api/147>\
**Category:** API Issues\
**Created:** [July 13, 2015, 11:14pm UTC](http://forum.companieshouse.gov.uk/t/ajax-post-to-json-api/147 "2015-07-13T23:14:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![csmith](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/csmith/32/8_2.png) [@csmith](http://forum.companieshouse.gov.uk/u/csmith)\
**Post date:** [July 14, 2015, 9:46am UTC](http://forum.companieshouse.gov.uk/t/ajax-post-to-json-api/147/2 "2015-07-14T09:46:42Z")

</div>

This might be because your AJAX query is not sending the Origin header. This is mandatory for CORS to work. See the following… let us know if that does fix your issue?

> [@Jquery Ajax Get request](http://forum.aws.chdev.org/t/jquery-ajax-get-request/69/8):
>
> In your API key registration, did you configured the domain (s) that you are making the Ajax request from? If you do not do this, our API will not negotiate permission with the CORS protection implemented by your client. Generally, an API with CORS protection will compare the Origin: header sent by a JS client against an authorisation list. If a match is made, an Access-Control-Allow-Origin: matched-domain is sent back which authorises the client. Log onto the developer hub and edit your API k…

---

_[View the full topic](http://forum.companieshouse.gov.uk/t/ajax-post-to-json-api/147)._
