# Not able to create Ansible tower template job through an API call

**URL:** <https://forum.ansible.com/t/not-able-to-create-ansible-tower-template-job-through-an-api-call/35743>\
**Category:** Ansible Project\
**Created:** [September 15, 2021, 4:21pm UTC](https://forum.ansible.com/t/not-able-to-create-ansible-tower-template-job-through-an-api-call/35743 "2021-09-15T16:21:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivek\_kumar](https://avatars.discourse-cdn.com/v4/letter/v/22d042/32.png) [@vivek\_kumar](https://forum.ansible.com/u/vivek_kumar)\
**Post date:** [September 15, 2021, 4:21pm UTC](https://forum.ansible.com/t/not-able-to-create-ansible-tower-template-job-through-an-api-call/35743/1 "2021-09-15T16:21:51Z")

</div>

Hi,

I am trying to make an API call using curl command from my unix box to create template job in Ansible tower with my login credentials. I am getting error “You do not have permission to perform this action”.

However I am able to perform other POST actions like creating inventory, adding host to inventory and other GET api calls.

Below my code snippet

curl -k -s -u $CREDENTIAL -X POST -H “Content-Type: application/json”   
“https://{tower-url}/api/v2/organizations/{id}/job\_templates/”   
– data ‘{  
“name”: “”  
“job\_type”: “”  
“inventory”: “”  
“project”: “”  
“playbook”: “”  
“verbosity”: “”  
}’

I am not able to see any examples in google for creating a job template, but in the below ansible site APIs are present, [https://docs.ansible.com/ansible-tower/latest/html/towerapi/api\_ref.html#/](https://docs.ansible.com/ansible-tower/latest/html/towerapi/api_ref.html#/)

Is it possible to create job template via API?

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [September 15, 2021, 6:03pm UTC](https://forum.ansible.com/t/not-able-to-create-ansible-tower-template-job-through-an-api-call/35743/2 "2021-09-15T18:03:01Z")

</div>

I have no idea, but this is the ansible mailing list.  
You will probably get a better response on the dedicated awx list:  
[https://groups.google.com/g/awx-project](https://groups.google.com/g/awx-project)

---

<div class="post-metadata">

**Author:** ![The\_Vandyy\_Vines](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Post date:** [September 15, 2021, 6:53pm UTC](https://forum.ansible.com/t/not-able-to-create-ansible-tower-template-job-through-an-api-call/35743/3 "2021-09-15T18:53:58Z")

</div>

Yes you can refer the sex mailing list … But what error in api call request are you facing?
