# 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/35744>\
**Category:** AWX Project\
**Created:** [September 16, 2021, 8:53am UTC](https://forum.ansible.com/t/not-able-to-create-ansible-tower-template-job-through-an-api-call/35744 "2021-09-16T08:53:35Z")\
**Posts on this page:** 1\
**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 16, 2021, 8:53am UTC](https://forum.ansible.com/t/not-able-to-create-ansible-tower-template-job-through-an-api-call/35744/1 "2021-09-16T08:53:35Z")

</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 logincredentials/token. 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. I tried with bearer token as well for the below run

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?
