API Key

You can specify one API Key in the CRM Settings → Integrations. This key will allow you to use all available kinds of requests.

User Permissions

Take into account user permissions while using API. Check the CRM Settings → Access to ensure the user you are going to perform actions from has all required permissions.

Supported methods

Method's nameRequired User PermissionsDescription
getcompanybynameAccess to main menu CRMGet company by name or ID
getcontactbynameAccess to main menu CRMGet contact by name or ID
getcompaniesAccess to main menu CRMGet the list of companies
getcontactsAccess to main menu CRMGet the list of contacts
sync Access to main menu CRMStart synchronization of JIRA users
setcrmpropertiesAccess to main menu CRMSet custom field type "Crm Property" in issue
addcompanyAdd companiesAdd company
addcontactAdd contactAdd contact
setcontactAdd exising contact to companySet company for contacts
adddictionaryvalueAdd the values to dictionariesAdd a new value to a custom directory
removedictionaryvalueRemove the values from dictionariesRemove value from a custom directory
searchentitiesSearch CRM objects by parametersGet CRM objects by parameters
editcontact Edit contactsSet the contact attribute value using id or name.
editcompanyEdit companies

Set the company attribute value using id or name.
(warning) Ensure there are no extra prefixes in the id (like "clients-")

updateOrCreateEntityAdd / Edit Objects

Example:

/plugins/servlet/crm/api?command=updateOrCreateEntity&userName=&apiKey=&tableName=PRODUCTS&crm_param_1=Product%20Name&crm_param_1_value=Test&id=&crm_param_2=Price&crm_param_2_value=10&crm_param_3=Vendor&crm_param_3_value=Atlassian&crm_param_4=area&crm_param_4_value=area
CODE

tableName - record type

crm_param_1 - name of the first field

crm_param_1_value - value of the first field

Also, you can set the id for the existing record.

transactionsList
Search CRM transactionsSearch CRM transactions by given parameters

Calls Examples


Register organization "Adobe" to contact "Ted Johnson":

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=setcontact&companyName=Adobe&contactName=TedJohnson


Add contact with ID=6 to organization with ID=15:

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=setcontact&companyId=15&contactId=6


Add contact with the specified attributes.

http://YOURDOMAIN/plugins/servlet/crm/api?command=addcontact&userName=${userName}&apiKey=${apiKey}&clients-contact_name=new contact&clients-contact_company=newCompany&view-clients-contact_company=newCompany&clients-contact_email=new@new.com


Add company with the specified attributes.

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=addcompany&clients-org_name=test Company Name&clients-org_www=test.com&tableName=CLIENTS&view-clients-org_industry=Consulting&view-clients-org_sla=SLA-1 Free


Receive all organizations:

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcompanies


Receive all contacts:

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcontacts


Receive organization with ID=2:

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcompanybyname&companyId=2


Receive organization with name "Teamlead":

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcompanybyname&companyName=Teamlead


Receive contact with ID=2:

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcontactbyname&contactId=2


Receive contact with name "Vladimir Putin":

http://YOURDOMAIN/plugins/servlet/crm/api?apiKey=${apiKey}&userName=${userName}&command=getcontactbyname&contactName=Vladimir Putin


Add value "Green" to the custom dictionary "Colors":

http://YOURDOMAIN/plugins/servlet/crm/api?command=adddictionaryvalue&userName=${userName}&apiKey=${apiKey}&dictionaryName=Colors&newvalue=Green


Remove value "Green" from the custom dictionary "Colors":

http://YOURDOMAIN/plugins/servlet/crm/api?command=removedictionaryvalue&userName=${userName}&apiKey=${apiKey}&dictionaryName=Colors&valuetoremove=Green


Search for all contacts of "Teamlead" organization:

http://YOURDOMAIN/plugins/servlet/crm/api?command=searchEntities&crm_param_1=Company&crm_param_1_value=Teamlead&tableName=CONTACTS&userName=${userName}&apiKey=${apiKey}


Edit contact:

http://YOURDOMAIN/plugins/servlet/crm/api?command=editcontact&apiKey=${apiKey}&userName=${userName}&contactId=${contactId}&view-clients-contact_position=${position}&clients-contact_position=${position}&clients-contact_email=${email}&clients-contact_login=${userName}


Edit company:

http://YOURDOMAIN/plugins/servlet/crm/api?command=editcompany&apiKey=${apiKey}&userName=${userName}&companyId=${companyId}&view-clients-clients_field_d1facd51-01e0-4a68-a4f3-4aa3641a590e=Development,Training&clients-clients_field_d1facd51-01e0-4a68-a4f3-4aa3641a590e=Development,Training

http://YOURDOMAIN/plugins/servlet/crm/api?command=editcompany&apiKey=${apiKey}&userName=${userName}&companyId=${companyId}&clients-clients_field_d8927b73-09ba-4094-b281-af6738e4432d=testest

http://YOURDOMAIN/plugins/servlet/crm/api?command=editcompany&apiKey=${apiKey}&userName=${userName}&companyId=${companyId}&Сompany%20name=${companyName}

Search CRM transactions 
http://YOURDOMAIN/plugins/servlet/crm/api?command=transactionslist&userName=${userName}&apiKey=${apiKey}&saleVal=${issuekey}


where:

  • ${apiKey} -  API Key (password) in the Administration/Plugins/CRM/Access
  • ${userName} - JIRA user's login