This is HTTPS-only API. Authentication will be performed based on the email address of the user and the respective API Key.
Email and API key should pass HTTP Basic Authentication. (Use email address as username and the respective API Key as password)
![Finding API Key] (https://github.com/ghanraut/hello-world/blob/master/api/RestNew01_censored.jpg)
All API requests should be made to: https://{domain}.agilecrm.com/dev/
Note: All the data is case-sensitive. Emails, names and other values are case sensitive. For example, "Test" and "test" are considered as two different words.
Field Name | Description | Value Type | Read-Only | Mandatory | Accepted values |
---|---|---|---|---|---|
id | Unique id is generated when contact is created | integer | Yes | Yes, to update and delete calls. | N/A |
type | Type distinguishes a contact and a company. | string | No | No. | Defaults to "PERSON" if not mentioned."PERSON" or "COMPANY" |
tags | Unique identifiers added to contact, for easy management of contacts. This is not applicable for companies. | list | no | no | Tag name should start with an alphabet and can not contain special characters other than underscore and space. |
lead_score | Score of contact. This is not applicable for companies. | integer | no | no | Any positive integer |
contact_company_id | This field should be added in the Contact object only, to specify that the contact is working in the given company. | Long | No | No | We should give the company id. It will accept long values only. |
star_value | Rating of contact (Max value 5). This is not applicable for companies. | short | no | no | 0 to 5 |
properties | Contact properties are represented by list of JSON objects, each JSON object should follow the prototype shown. Custom fields will have type as CUSTOM and others will have type as SYSTEM. | List of JSON objects | no | first_name is mandatory | |
campaignStatus | Information about the campaigns ran on that contact like name, status, start time, end time of campaign | List of JSONObjects | Yes | Only if this contact has campaigns | N/A |
unsubscribeStatus | Information about the campaign from which the contact is unsubscribed. | List of JSONObjects | Yes | Only if this contact has campaigns | N/A |
emailBounceStatus | Information about the email bounce and spam while running the campaign | List of JOSNObjects | Yes | Only if this conatct has campaigns | N/A |
Field Name | Description | Value Type | Read-Only | Mandatory | Accepted values |
---|---|---|---|---|---|
name | Name of the field. | String | No | Yes | Any string |
type | Type of the field (Whether it is system defined field or custom field). | String | No | Yes | SYSTEM or CUSTOM |
subtype | Sub type of the field.Only SYSTEM properties like email will have the sybtypes. | String | No | No | The value of this field depends up on the property name. |
value | Value of the property. | String | No | No | Any String. |
The below are the subtypes for respective property fields.
Field Name | Type | Syb types |
---|---|---|
SYSTEM | work,personal | |
phone | SYSTEM | work,home,mobile,main,home fax,work fax,other |
address | SYSTEM | home,postal,office |
website | SYSTEM | URL,SKYPE,TWITTER,LINKEDIN,FACEBOOK,XING,FEED,GOOGLE_PLUS,FLICKR,GITHUB,YOUTUBE |
Note: There will be subtypes for custom fields. User should specify the above mentioned subtype for those respective properties only.
{
"id": 27001,
"type": "PERSON",
"created_time": 1349974226,
"updated_time": 1364483386,
"star_value": 0,
"lead_score": 0,
"tags": [
"Buyer",
"Deal Closed"
],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "Adam"
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Smith"
},
{
"type": "SYSTEM",
"name": "company",
"value": "Invox"
},
{
"type": "SYSTEM",
"name": "title",
"value": "Evangelist"
},
{
"type": "SYSTEM",
"name": "email",
"subtype": "",
"value": "jagan@clickdesk.com"
},
{
"type": "CUSTOM",
"name": "My Custom Field",
"value": "Custom value"
}
],
"campaignStatus": [
{
"start_time": 1418204274,
"end_time": 1418204293,
"campaign_id": "5338160762454016",
"campaign_name": "Send Email",
"status": "5338160762454016-DONE"
}
],
"unsubscribeStatus": [
{
"campaign_id": "5338160762454016",
"unsubscribeType": "CURRENT"
}
],
"emailBounceStatus": [
{
"email": "hard_bounce@test.mandrillapp.com",
"emailBounceType": "HARD_BOUNCE",
"time": 1418204263,
"campaign_id": "5338160762454016"
}
],
"widget_properties": "{\"Twitter\":\"11458852\"}",
"domainUser": {
"id": 314001,
"domain": "mycompany",
"email": "crm-user@mycompany.com",
"is_admin": true,
"is_account_owner": false,
"is_disabled": false,
"name": "angel",
"password": "PASSWORD",
"info_json_string": "{\"logged_in_time\":1364879569,\"created_time\":1361958281}",
"hashedString": "81dc9bdb52d04dc20036dbd8313ed055"
}
}
Method: GET
For the Response in the XML format, add the header 'Accept' as application/xml. By default, the response will be in XML format. Paging can be applied using the page_size and cursor query parameters. Count of the contacts will be in the first contact and Cursor for the next page will be in the last contact of the list. If there is no cursor, it means that it is the end of list.
curl https://{domain}.agilecrm.com/dev/api/contacts?page_size=20&cursor=E-ABAIICNGoRc35hZ2lsZS1jcm0tY2xvdWRyFAsSB0NvbnRhY3QYgICAgKLThAoMogEIcHJhYmF0aGuIAgAU -H "Accept : application/xml" -v -u {email}:{apikey}```
###Example XML response
```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<contacts>
<contact>
<id>40002</id>
<type>PERSON</type>
<created_time>1356589886</created_time>
<updated_time>1357107323</updated_time>
<star_value>0</star_value>
<lead_score>93</lead_score>
<tags>sales</tags>
<tags>bruik</tags>
<tags>walt</tags>
<tags>los</tags>
<tags>vo</tags>
<tags>steady</tags>
<properties>
<type>SYSTEM</type>
<name>first_name</name>
<value>Los </value>
</properties>
<properties>
<type>SYSTEM</type>
<name>last_name</name>
<value>Bruikheilmer</value>
</properties>
<properties>
<type>SYSTEM</type>
<name>company</name>
<value>steady.inc</value>
</properties>
<properties>
<type>SYSTEM</type>
<name>title</name>
<value>VP Sales</value>
</properties>
<properties>
<type>SYSTEM</type>
<name>email</name>
<subtype>work<subtype/>
<value>bruik@walt.inc</value>
</properties>
<properties>
<type>SYSTEM</type>
<name>address</name>
<value>{"address":"","city":"","state":"","zip":"","country":""}</value>
</properties>
<domainUser>
<id>106010</id>
<domain>yaswanth</domain>
<email>praveen@invox.com</email>
<is_admin>true</is_admin>
<is_account_owner>true</is_account_owner>
<is_disabled>false</is_disabled>
<name>yaswanth</name>
<password>PASSWORD</password>
<info_json_string>
{"logged_in_time":1359434638,"created_time":1358831084}
</info_json_string>
</domainUser>
</contact>
</contacts>
For the Response in the JSON format, add the header 'Accept' as application/json.
curl https://{domain}.agilecrm.com/dev/api/contacts?page_size=20&cursor=E-ABAIICNGoRc35hZ2lsZS1jcm0tY2xvdWRyFAsSB0NvbnRhY3QYgICAgKLThAoMogEIcHJhYmF0aGuIAgAU -H "Accept : application/json"
-v -u {email}:{apikey}
[
{
"count": "9",
"id": "40002",
"type": "PERSON",
"created_time": "1356589886",
"updated_time": "1357107323",
"star_value": "0",
"lead_score": "93",
"tags": [
"sales", "bruik", "walt", "los", "vo", "steady"
],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "Los "
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Bruikheilmer"
},
{
"type": "SYSTEM",
"name": "company",
"value": "steady.inc"
},
{
"type": "SYSTEM",
"name": "title",
"value": "VP Sales"
},
{
"type": "SYSTEM",
"name": "email",
"subtype": "work",
"value": "bruik@walt.inc"
},
{
"type": "SYSTEM",
"name": "address",
"value": "{\"address\":\"\",\"city\":\"\",\"state\":\"\",\"zip\":\"\",\"country\":\"\"}"
}
],
"domainUser": {
"id": "106010",
"domain": "yaswanth",
"email": "praveen@invox.com",
"is_admin": "true",
"is_account_owner": "true",
"is_disabled": "false",
"name": "yaswanth",
"password": "PASSWORD",
"info_json_string": "{\"logged_in_time\":1359434638,\"created_time\":1358831084}"
}
},
{
"id": "41002",
"type": "PERSON",
"created_time": "1356590542",
"updated_time": "1359367255",
"star_value": "4",
"lead_score": "92",
"tags": [
"president",
"john",
"doe",
"cruzzetech"
],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "John"
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Doe"
},
{
"type": "SYSTEM",
"name": "company",
"value": "cruzzetech.com"
},
{
"type": "SYSTEM",
"name": "email",
"value": "john@cruzzetech.com"
},
{
"type": "SYSTEM",
"name": "title",
"value": "President"
}
],
"tags_with_time_json": "{\"president\":1359365229885,\"john\":1359365229885,\"doe\":1359365229885,\"cruzzetech\":1359365229885}",
"domainUser": {
"id": "106010",
"domain": "yaswanth",
"email": "praveen@invox.com",
"is_admin": "true",
"is_account_owner": "true",
"is_disabled": "false",
"name": "yaswanth",
"password": "PASSWORD",
"info_json_string": "{\"logged_in_time\":1359434638,\"created_time\":1358831084}"
}
}
]
Method: GET
curl https://{domain}.agilecrm.com/dev/api/contacts/{id} -H "Accept :application/xml"
-v -u {email}:{apikey}
Method: POST
Accepts contact JSON as post data along with the credentials of domain User (User name and API Key).
{
"star_value": "4",
"lead_score": "92",
"tags": ["Lead","Likely Buyer","You_can-user $special chars"],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "Los "
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Bruikheilmer"
},
{
"type": "SYSTEM",
"name": "company",
"value": "steady.inc"
},
{
"type": "SYSTEM",
"name": "title",
"value": "VP Sales"
},
{
"type": "SYSTEM",
"name": "email",
"subtype": "work",
"value": "bruik@walt.inc"
},
{
"type": "SYSTEM",
"name": "address",
"value": "{\"address\":\"\",\"city\":\"\",\"state\":\"\",\"zip\":\"\",\"country\":\"\"}"
},
{
"type": "CUSTOM",
"name": "My Custom Field",
"value": "Custom value"
}
]
}
Method: PUT
Accepts contact object with valid id parameter in it, where id refers to the contact that is to be updated. While updating the contact, If that contact is having campaigns, we should include the fields emailBounceStatus, campaignStatus and unsubscribeStatus in the contact object (The data in these fields should be same as it is in the retrieved contact object).
{
"id":8573489754593
"star_value": "4",
"lead_score": "92",
"tags": ["Lead","Likely Buyer","You_can-user $special chars"],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "Los "
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Bruikheilmer"
},
{
"type": "SYSTEM",
"name": "company",
"value": "steady.inc"
},
{
"type": "SYSTEM",
"name": "title",
"value": "VP Sales"
},
{
"type": "SYSTEM",
"name": "email",
"subtype": "work",
"value": "bruik@walt.inc"
},
{
"type": "SYSTEM",
"name": "address",
"value": "{\"address\":\"\",\"city\":\"\",\"state\":\"\",\"zip\":\"\",\"country\":\"\"}"
},
{
"type": "CUSTOM",
"name": "My Custom Field",
"value": "Custom value"
}
]
}
If there is no ID, it will considered as a new contact.
Method: DELETE
curl https://{domain}.agilecrm.com/dev/api/contacts/{id} \
-v -u {email}:{apikey} -X DELETE
Method: POST
curl https://{domain}.agilecrm.com/dev/api/contacts/search/email -H "Accept: application/xml"
-H "Content-Type :application/x-www-form-urlencoded"
-d email_ids=["notifications@basecamp.com"]
-v -u {email}:{apikey} -X POST
Method: GET
Parameters allowed are as below. All parameters are mandatory.
‘q' - Search keyword (all contact/company default fields and searchable custom fields will be searched)
‘page_size’ - Number of results to fetch
'type' - Should be 'PERSON' for searching Contacts and 'COMPANY' for Companies
curl https://{domain}.agilecrm.com/dev/api/search?q=ab&page_size=10&type="COMPANY" -H "Accept: application/json" -v -u {email}:{apikey}
Method: POST
curl https://{domain}.agilecrm.com/dev/api/contacts/email/tags/add -H "Accept: application/xml"
-H "Content-Type :application/x-www-form-urlencoded"
-d email=notifications@basecamp.com&tags=["testing"]
-v -u {email}:{apikey} -X POST
Method: POST
curl https://{domain}.agilecrm.com/dev/api/contacts/email/tags/delete -H "Accept: application/xml"
-H "Content-Type :application/x-www-form-urlencoded"
-d email=notifications@basecamp.com&tags=["testing"]
-v -u {email}:{apikey} -X POST
Method: POST
curl https://{domain}.agilecrm.com/dev/api/contacts/add-score -H "Accept: application/xml" -H "Content-Type :application/x-www-form-urlencoded"
-d email=notifications@basecamp.com&score=5 -v -u {email}:{apikey} -X POST
Method: GET
curl https://{domain}.agilecrm.com/dev/api/contacts/{contact_id}/tasks/sort -H "Accept: application/xml" -v -u {email}:{apikey}
[
{
"id": 5152971570544640,
"type": "EMAIL",
"priority_type": "NORMAL",
"due": 1409596200,
"created_time": 1409567774,
"is_complete": false,
"contacts": [
{
"id": 5716606839685120,
"type": "PERSON",
"created_time": 1403057154,
"updated_time": 1403057154,
"viewed_time": 0,
"viewed": {
"viewed_time": 1409567737463,
"viewer_id": 5345980119515136
},
"star_value": 0,
"lead_score": 0,
"tags": [],
"tagsWithTime": [],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "Basecamp (2Desk)"
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Basecamp (2Desk)"
},
{
"type": "SYSTEM",
"name": "email",
"value": "notifications@basecamp.com"
}
],
"campaign- Status": [],
"entity_type": "contact_entity",
"unsubscribe- Status": [],
"emailBounce- Status": [],
"owner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"name": "prabath kolipaka"
}
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [],
"progress": 0,
"- Status": "YET_TO_START",
"ownerPic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"name": "prabath kolipaka"
}
}
]
Method: POST
We can update a single field of the contact using this call. It is used to add the new property or update the existing property. It accepts property object of contact with valid parameter in it. We need to send the Email-Id of the contact to identify it. This will not effect other fields.
curl https://{domain}.agilecrm.com/dev/api/contacts/add/property?email=test@agile.com -H "Content-Type: application/json" -d '{\"type\" : \"SYSTEM\", \"name\" : \"first_name\", \"value\" : \"AgileTest\"}' 000-v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X POST
{
"type": "SYSTEM",
"name": "first_name",
"value": "Los "
}
If there is no ID, it will considered as a new contact.
Method: POST
We can update the owner of the contact using this call. It will take two parameters. One is the email address of the user (owner_email) and the second one is the ID of the contact(contact_id). Both fields are mandatory.
curl https://{domain}.agilecrm.com/dev/api/contacts/change-owner -H "Content-Type: application/x-www-form-urlencoded" -d 'owner_email=test@agilecrm.com&contact_id=5646748928180224' -V -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X POST
Field Name | Description | Value Type | Read Only | Mandatory | Accepted Values |
---|---|---|---|---|---|
id | Unique id is assigned to every deal, when it is created | integer | no | Yes, if request is to update an existing deal | N/A |
name | Name of the deal | string | no | Yes | N/A |
description | Brief description about deal. | string | no | No | N/A |
expected_value | Estimated value of a deal. | double | no | Yes | Max up to 1000000000000 |
pipeline_id | Track id of the deal. | long | no | Yes | There should be a track with this Id. |
milestone | Milestone of deal (won, progress, lost..). These depend up on the track selected. Milestones may differ based on the tracks. | String | no | Yes | MIlestone in the above mentioned track. |
probability | integer | no | should be ranging between 0-100 | 0 to 100 | |
close_date | close date of deal | long | no | Yes | Epoch time |
created_time | Created time of the deal. Returns time in seconds | long | yes | No, generated automatically on deal creation | Epoch time |
owner_id | owner_id represents id of domain user | string | No, write access is provided to set owner of deal | Yes | The id of the user. |
prefs | JSON string | N/A | |||
contacts | Relates list of contacts to deal | List of contact. | Yes | No | |
contact_ids | Relates list of contacts to deal. They Should be sent in the request while creating and updating contacts. | List of contact id.ex: ["122", 145,201]. | Write access to relate contacts, while returning contact jsons respective to ids set | No | IDs of contacts. |
{
"id" : "822",
"name" : "Game development",
"description" : "Visual 3D based Online Game.",
"expected_value" : "50000",
"pipeline_id" : "43535822",
"milestone" : "progress",
"probability ": "70",
"close_date" : "1349980200",
"created_time" : "1356325843",
"entity_type" : "deal",
"Prefs": {
"id" : "984",
"template" : "blue",
"currency" : "USD",
"signature" : "- Powered by AgileCRM",
"task_reminder" : "true"
}
}
Method: GET
curl https:{domain}.agilecrm.com/dev/api/opportunity?page_size=10&cursor=E-ABAIICNGoRc35hZ2lsZS1jcm0tY2xvdWRyFAsSB0NvbnRhY3QYgICAgKLThAoMogEIcHJhYmF0aGuIAgAU -H "Accept:application/json" -v -u {email}:{API Key}
[
{
"id": 981,
"name": "premium subscriptions",
"contacts": [
{
"id": 2363,
"type": "PERSON",
"created_time": 1359033520,
"updated_time": 1359033533,
"star_value": 0,
"lead_score": 0,
"tags": [],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "John"
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Olsen"
},
{
"type": "SYSTEM",
"name": "email",
"value": "john@example.com.com"
}
],
"domainUser": {
"id": 516,
"email": "test@example.com",
"is_admin": true,
"is_account_owner": false,
"is_disabled": false,
"name": "ram"
}
}
],
"description": "Deal premium plan subscription",
"expected_value": 300,
"pipeline_id" : "43535822",
"milestone": "Open",
"probability": 46,
"close_date": 1371753000,
"created_time": 1360503631,
"entity_type": "deal",
"owner": {
"id": 516,
"email": "test@example.com",
"is_admin": true,
"is_account_owner": false,
"is_disabled": false,
"name": "Test"
},
"prefs": {
"id": 984,
"pic": "",
"template": "blue",
"width": "",
"currency": "USD",
"signature": "- Powered by AgileCRM",
"task_reminder": true,
"currentDomainUserName": "?"
},
"pic": ""
},
{
"id": 981,
"name": "premium subscriptions",
"contacts": []
}
]
Method: GET
Gets the deal with the given ID.
curl https:{domain}.agilecrm.com/dev/api/opportunity/981 -H "Accept : application/json" -v -u {email}:{API Key}
{
"id": 981,
"name": "500 premium subscriptions",
"contacts": [
{
"id": 2363,
"type": "PERSON",
"created_time": 1359033520,
"updated_time": 1359033533,
"star_value": 0,
"lead_score": 0,
"tags": [
],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "John"
},
{
"type": "SYSTEM",
"name": "last_name",
"value": "Olsen"
},
{
"type": "SYSTEM",
"name": "email",
"value": "john@example.com"
},
],
"domainUser": {
"id": 516,
"email": "test@example.com",
"is_admin": true,
"is_account_owner": false,
"is_disabled": false,
"name": "ram",
"password": "PASSWORD",
"info_json_string": "{\"logged_in_time\":1360503513,\"created_time\":1353507148}"
}
}
],
"description": "Deal premium plan subscription",
"expected_value": 300,
"pipeline_id" :"43535822",
"milestone": "Open",
"probability": 46,
"close_date": 1371753000,
"created_time": 1360503631,
"entity_type": "deal",
"owner": {
"id": 516,
"email": "test@example.com",
"is_admin": true,
"is_account_owner": false,
"is_disabled": false,
"name": "ram",
"password": "PASSWORD",
"info_json_string": "{\"logged_in_time\":1360503513,\"created_time\":1353507148}"
},
"prefs": {
"id": 984,
"pic": "",
"template": "blue",
"width": "",
"currency": "USD",
"signature": "- Powered by AgileCRM",
"task_reminder": true,
"currentDomainUserName": "?"
},
"pic": ""
}
Method: POST
curl https://{domain}.agilecrm.com/dev/api/opportunity -H "Content-Type: application/json" -d {\"name\" : \"deal\", \"contact_ids\" : [\"2358\", \"2356\"] , \"owner_id\" : \"516\", \"pipeline_id\" :\"43535822\", \"milestone\" : \"milestone\"} 000-v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X POST
Method: PUT
curl https://{domain}.agilecrm.com/dev/api/opportunity -H "Content-Type: application/json" -d "{\"name\" : \"deal\", \"contact_ids\" : [\"2358\",\"2356\"] , \"owner_id\" : \"516\", \"pipeline_id\" :\"43535822\", \"milestone\" : \"milestone\"}" -v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X PUT
Method: POST
curl https://{domain}.agilecrm.com/dev/api/opportunity/test@agilecrm.com -H "Content-Type: application/json" -d {"name" : "deal", "owner_id" : "516", \"pipeline_id\" :\"43535822\", \"milestone\" : \"milestone\"} 000-v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X POST
Creates a deal for the contact with the given email address. If there is no contact, it will not create any deal.
Method: DELETE
curl https://{domain}.agilecrm.com/dev/api/opportunity/{id} -H "Content-Type: application/json" -v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X DELETE
Method: POST
curl https://{domain}.agilecrm.com/dev/api/opportunity/bulk -H "Content-Type: application/x-www-form-urlencoded" -d {"ids" : ["123", "234", "235"]} -v -u {email}:{API Key} -X POST
Method: GET
curl https://{domain}.agilecrm.com/dev/api/opportunity/byMilestone -H "Accept : application/json" -v -u {email} : {API Key}
{
"Lost": [
{
"cursor": "",
"count": "",
"id": 5086100271923200,
"name": " Nike Endorsement",
"contact_ids": [
],
"custom_data": [
{
"name": "Ddate",
"value": "07/11/2014"
}
],
"description": "Advertisements and apparel for Nike",
"expected_value": 2000000.0,
"pipeline_id" :"43535822",
"milestone": "Lost",
"probability": 98,
"close_date": 1468800,
"owner_id": "",
"created_time": 1405085631,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
}
],
Open: [
{
"cursor": "",
"count": "",
"id": 5115435166990336,
"name": " test deal",
"contact_ids": [
],
"custom_data": [
{
"name": "Ddate",
"value": "07/23/2014"
}
],
"description": "testing",
"expected_value": 1235.0,
"pipeline_id" :"43535822",
"milestone": "Lost",
"probability": 123,
"close_date": 1405555200,
"owner_id": "",
"created_time": 1405518785,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
}
],
Won: [
{
"cursor": "",
"count": "",
"id": 5123586478047232,
"name": " deal test",
"contact_ids": [
],
"custom_data": [
{
"name": "Ddate",
"value": "07/21/2014"
}
],
"description": "",
"expected_value": 1.0E10,
"pipeline_id" :"43535822",
"milestone": "Lost",
"probability": 10,
"close_date": 1405036800,
"owner_id": "",
"created_time": 1405575543,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
}
],
Stage1: [
{
"cursor": "",
"count": "",
"id": 5193799529660416,
"name": " Nike Endorsement",
"contact_ids": [
],
"custom_data": [
],
"description": "Advertisements and apparel for Nike",
"expected_value": 2.0E11,
"pipeline_id" :"43535822",
"milestone": "Lost",
"probability": 98,
"close_date": 0,
"owner_id": "",
"created_time": 1402580362,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
}
]
}
In this above example, Lost, Open, Won, Stage 1 are different milestones. These may vary depending on the user choice.
Method: GET
curl https://{domain}.agilecrm.com/dev/api/opportunity/byPipeline/based?pipeline_id=4756437 -H "Accept : application/json" -v -u {email} : {API Key}
{
"Lost": [
{
"cursor": "",
"count": "",
"id": 5086100271923200,
"name": " Nike Endorsement",
"contact_ids": [
],
"custom_data": [
{
"name": "Ddate",
"value": "07/11/2014"
}
],
"description": "Advertisements and apparel for Nike",
"expected_value": 2000000.0,
"pipeline_id" :"4756437",
"milestone": "Lost",
"probability": 98,
"close_date": 1468800,
"owner_id": "",
"created_time": 1405085631,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
}
],
Open: [
{
"cursor": "",
"count": "",
"id": 5115435166990336,
"name": " test deal",
"contact_ids": [
],
"custom_data": [
{
"name": "Ddate",
"value": "07/23/2014"
}
],
"description": "testing",
"expected_value": 1235.0,
"pipeline_id" :"4756437",
"milestone": "Lost",
"probability": 123,
"close_date": 1405555200,
"owner_id": "",
"created_time": 1405518785,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
}
]
}
In this above example, Lost, Open, Won, Stage 1 are different milestones. These may vary depending on the user choice.
Method: GET
Fetches list of deals from the particular track. Number of milestones depends upon the milestones added by user to that track. The track id has to be sent as a query parameter.
Paging can be applied using the page_size and cursor query parameters. Count of the deal will be in the first deal and Cursor for the next page will be in the last deal of the list. If there is no cursor, it means that it is the end of list.
curl https://{domain}.agilecrm.com/dev/api/opportunity/based?pipeline_id=4756437&page_size=10&cursor=E-ABAIICNGoRc35hZ2lsZS1jcm0tY2xvdWRyFAsSB0NvbnRhY3QYgICAgKLThAoMogEIcHJhYmF0aGuIAgAU -H "Accept : application/json" -v -u {email} : {API Key}
[
{
"cursor": "",
"count": "",
"id": 5086100271923200,
"name": " Nike Endorsement",
"contact_ids": [
],
"custom_data": [
{
"name": "Ddate",
"value": "07/11/2014"
}
],
"description": "Advertisements and apparel for Nike",
"expected_value": 2000000.0,
"pipeline_id" :"4756437",
"milestone": "Lost",
"probability": 98,
"close_date": 1468800,
"owner_id": "",
"created_time": 1405085631,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
},
{
"cursor": "",
"count": "",
"id": 5115435166990336,
"name": " test deal",
"contact_ids": [
],
"custom_data": [
{
"name": "Ddate",
"value": "07/23/2014"
}
],
"description": "testing",
"expected_value": 1235.0,
"pipeline_id" :"4756437",
"milestone": "Lost",
"probability": 123,
"close_date": 1405555200,
"owner_id": "",
"created_time": 1405518785,
"track": "",
"entity_type": "deal",
"notes": [
],
"note_description": "",
"owner": {
"cursor": "",
"count": "",
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
"is_account_owner": true,
"is_disabled": false,
"email_template": "",
"name": "prabath kolipaka"
},
"contacts": [
],
"pic": "https://s3.amazonaws.com/agilecrm/panel/uploaded-logo/1401427105618?id=upload-container"
}
]
In this above example, Lost, Open, Won, Stage 1 are different milestones. These may vary depending on the user choice.
Method: GET
- Fetches list of deals related to specified contact using the contact id.
curl https://{domain}.agilecrm.com/dev/api/contacts/{contact_id}/deals -H "Accept : application/json" -v -u {email} : {API Key}
[
{
"id" : 822,
"name" : "Game Development",
"created_time" : 1356325843,
"contacts" : [
{
id : "445",
created_time : 1356315843
}
...
]
},
{
"id" : 850,
"name" : "Product Design",
"created_time" : "1357794282",
},
...
]
Method: GET
- Fetches list of deals of the current user
curl https://{domain}.agilecrm.com/dev/api/opportunity/my/deals -H "Accept : application/json" -v -u {email} : {API Key}
[
{
"id" : 822,
"name" : "Game Development",
"created_time" : 1356325843,
"contacts" : [
{
id : "445",
created_time : 1356315843
}
...
]
...
},
{
"id" : 850,
"name" : "Product Design",
"created_time" : "1357794282",
},
...
]
Field Name | Description | Value Type | Read Only | Mandatory | Accepted values |
---|---|---|---|---|---|
id | Unique id generated when note is created | Long | no | no | N/A |
created_time | Creation time of note | Long | yes | no | epoch time |
subject | Subject of the note | String | no | yes | N/A |
description | Description of note | String | no | yes | N/A |
contact_json | list of contact ids | String array | no | no | N/A |
Method: POST
curl https://{domain}.agilecrm.com/dev/api/notes/ -H "Content-Type : application/json" -H "Accept : application/json" -d {"subject" : " Note subject" , "description" : "Note description", "contact_ids" : ["721001", "722001"] } -v -u {email} : {APi Key} -X POST
{
"id" : 80001
"created_time" : 1360561958,
"subject" : "Note subject",
"description" : "Note description",
"contacts" : ["721002"],
"entity_type" : "note"
}
Method: POST
curl https://{domain}.agilecrm.com/dev/api/contacts/email/note/add -H "Accept: application/xml"
-H "Content-Type :application/x-www-form-urlencoded"
-d email=notifications@basecamp.com¬e={"subject":"test","description":"testing description"} -v -u {email}:{apikey} -X POST
Method: GET
curl https://{domain}.agilecrm.com/dev/api/contacts/710002/notes -H "Accept : application/json" -v -u {email} : {API Key}
[
{
"id" : 79001,
"created_time" : 1360561958,
"subject" : "Note subject1",
"description" : "Note description1",
"contacts" : ["721002"],
"entity_type" : "note"
},
{
"id" : 80001
"created_time" : 1360561722,
"subject" : "Note subject2",
"description" : "Note description2",
"contacts" : ["721002"],
"entity_type" : "note"
}
]
Method: DELETE
curl https://{domain}.agilecrm.com/dev/api/contacts/{contact_id}/notes/{note_id} -H "Accept : application/json" -v -u {email} : {API Key} -X DELETE
Field Name | Description | Value Type | Read Only | Mandatory | Accepted values |
---|---|---|---|---|---|
id | Unique id generated when task is created | Long | no | no | N/A |
type | Determines the type to which the task belongs. The type should be in the given list. It is case sensitive. It should only be specified as mentioned here - | String | no | yes | CALL, EMAIL, FOLLOW_UP, MEETING, MILESTONE, SEND, TWEET, OTHER. |
priority_type | Determines the priority of the task. It is case sensitive. It should only be specified as mentioned here. | String | no | yes | There are 3 kinds of priorities - HIGH, NORMAL, LOW. |
due | Due date of the task. It should be specified as Epoch Time. | Long | no | yes | Epoch time |
created_time | Creation time of task | Long | yes | no | Epoch time |
is_complete | Determines whether the task is completed or not. If completed, then true. Else, false. | Boolean | no | no | true/false |
contacts | List of contacts related to the task. While saving, the contact ids have to be given as a string array to relate them to the task. | String array | no | no | IDs of the contacts. |
subject | Subject of the task. | String | no | yes | N/A |
entity_type | It is a read only variable. Its value is task always. | String | yes | no | task |
notes | It is the list of notes related to this task. While adding or editing a task, the list of note ids has to be sent as a string array in order to save them. | String array | no | no | N/A |
progress | It is used to determine the progress of the task. (0-100%) | Int | no | no | 0 to 100 |
status | Determines the status of the task. | String | no | no | YET_TO_START, IN_PROGRESS, COMPLETED. These are case sensitive. |
taskOwner | It has the information about the owner of the task. | JSON object | yes | no | N/A |
owner_id | lId of the user who is the owner of the task. Send this field in the task object while adding or updating the task in order to assign the task to the owner. | Long | no | no | Id of the user(Owner) |
Method: GET
- Retrieves all the pending tasks of all the users. It will return a list of tasks as a JSON Array.
curl https:{domain}.agilecrm.com/dev/api/tasks -H "Accept:application/json" -v -u {email}:{API Key}
Status 401: Unauthorised. (when the user name and password fields are wrong.)
[
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": -19800,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
},
{
"id": 5176288276905984,
"type": "EMAIL",
"priority_type": "LOW",
"due": -19800,
"created_time": 1409649695,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
...
}
]
Method: GET
- Get all the tasks of all the users. It will get both the pending and the completed tasks of all the users.
curl https:{domain}.agilecrm.com/dev/api/tasks/all -H "Accept:application/json" -v -u {email}:{API Key}
Status 401: Unauthorised. (when the user name and password fields are wrong.)
[
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": -19800,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
},
{
"id": 5176288276905984,
"type": "EMAIL",
"priority_type": "LOW",
"due": -19800,
"created_time": 1409649695,
"is_complete": true,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
...
}
]
Method: GET
- Retrieve the pending tasks of all the users which are num-days days away from the due date. It will return the list of tasks as a JSON Array.
curl https:{domain}.agilecrm.com/dev/api/tasks/pending/3 -H "Accept:application/json" -v -u {email}:{API Key}
Status 401: Unauthorised. (when the user name and password fields are wrong.)
[
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": -19800,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
},
{
"id": 5176288276905984,
"type": "EMAIL",
"priority_type": "LOW",
"due": -19800,
"created_time": 1409649695,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
...
}
]
Method: GET
curl https:{domain}.agilecrm.com/dev/api/tasks/my/tasks -H "Accept:application/json" -v -u {email}:{API Key}
Status 401: Unauthorised. (when the user name and password fields are wrong.)
[
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": -19800,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
},
{
"id": 5176288276905984,
"type": "EMAIL",
"priority_type": "LOW",
"due": -19800,
"created_time": 1409649695,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
...
}
]
Method: GET
Paging can be applied using the page_size and cursor query parameters. Count of the tasks will be in the first task and Cursor for the next page will be in the last task of the list. If there is no cursor, it means that it is the end of list.
curl https:{domain}.agilecrm.com/dev/api/tasks/based?pending=true&type=EMAIL&page_size=10&cursor=E-ABAIICNGoRc35hZ2lsZS1jcm0tY2xvdWRyFAsSB0NvbnRhY3QYgICAgKLThAoMogEIcHJhYmF0aGuIAgAU -H "Accept:application/json" -v -u {email}:{API Key}
Status 401: Unauthorised. (when the user name and password fields are wrong.)
[
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": -19800,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
},
{
"id": 5176288276905984,
"type": "EMAIL",
"priority_type": "LOW",
"due": -19800,
"created_time": 1409649695,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
...
}
]
Method: GET
- Gets the task of the contact with the given ID.
curl https:{domain}.agilecrm.com/dev/api/tasks/5149503652888576 -H "Accept:application/json" -v -u {email}:{API Key}
Status 401: Unauthorised. (when the user name and password fields are wrong.)
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": -19800,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "Contact created in agile crm",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
}
Method: POST
- Creates a new task.
curl https://{domain}.agilecrm.com/dev/api/tasks -H "Content-Type: application/json" -d {"subject" : "test", "contacts" : ["5704147139559424"] , "owner_id" : "5345980119515136", \"type\" : \"EMAIL\", \"priority_type\" : \"HIGH\", \"due\" : 11545245654} 000-v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X POST
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": 11545245654,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "test",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
}
Method: POST
- Creates a new task and relates it to the contact having the email.
curl https://{domain}.agilecrm.com/dev/api/tasks/email/test@agilecrm.com -H "Content-Type: application/json" -d {"subject" : "test", "owner_id" : "5345980119515136", \"type\" : \"EMAIL\", \"priority_type\" : \"HIGH\", \"due\" : 11545245654} 000-v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X POST
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": 11545245654,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "test",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
}
Method: PUT
- Updates a task. The ID of the task has to be specified.
curl https://{domain}.agilecrm.com/dev/api/tasks -H "Content-Type: application/json" -d {"id" : 5149503652888576", "subject" : "test", "contacts" : ["5704147139559424"] , "owner_id" : "5345980119515136", \"type\" : \"EMAIL\", \"priority_type\" : \"HIGH\", \"due\" : 11545245654} 000-v -u test@example.com:4uet78u6atfn38m9dounnq9g4u -X PUT
{
"id": 5149503652888576,
"type": "EMAIL",
"priority_type": "HIGH",
"due": 11545245654,
"created_time": 1409649528,
"is_complete": false,
"contacts": [
{
"id": 5704147139559424,
"type": "PERSON",
"created_time": 1398421585,
"updated_time": 1406619697,
...
}
],
"subject": "test",
"entity_type": "task",
"notes": [
],
"progress": 0,
"status": "YET_TO_START",
"taskOwner": {
"id": 5345980119515136,
"domain": "prabathk",
"email": "prabath.kolipaka@gmail.com",
"is_admin": true,
...
}
Method: DELETE
- Deletes the task having the given ID.
curl https:{domain}.agilecrm.com/dev/api/tasks/5149503652888576 -H "Accept:application/json" -v -u {email}:{API Key} -X DELETE
Field Name | Description | Value Type | Read Only | Mandatory | Accepted Values | |
---|---|---|---|---|---|---|
id | Unique id generated when event is created | Long | no | no | N/A | |
created_time | Creation time of Event | Long | yes | no | Epoch time | |
allDay | Determines whether the event lasts for the whole day or not. | Boolean | no | no | true / false | |
contacts | List of contacts related to the event. While saving, the contact ids have to be given as a string array to relate them to the event. | String array | no | no | IDs of the contacts | |
title | Title of the event | String | no | yes | N/A | |
color | Color states the priority of the event. | The colors are case sensitive. All of them should be specified in the same case. | String | no | no | High = red, Normal = #36C, Low = green. |
start | Start time of Event in epoch time format. | Long | no | yes | epoch time | |
end | End time of Event in epoch time format. | Long | no | yes | epoch time | |
is_event_starred | It determines whether the particular event is starred or not. | Boolean | no | no | true / false |
Method: GET
curl https:{domain}.agilecrm.com/dev/api/events?start=1409423400&end=1413052200 -H "Accept:application/json" -v -u {email}:{API Key}
[
{
"id": 5758048710688768,
"start": 1409682600,
"end": 1409768100,
"is_event_starred": false,
"allDay": true,
"title": "Today Test event",
"color": "red",
"created_time": 1409569472,
"contacts": [
{
"id": 5716606839685120,
"type": "PERSON",
"star_value": 0,
"lead_score": 0,
"tags": [],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "Basecamp (2Desk)"
},
...
],
...
}
]
},
{
"id": 5740240702537728,
"start": 1409769000,
"end": 1409855340,
"is_event_starred": false,
"allDay": false,
"title": "tlest",
"color": "green",
"created_time": 1410421808,
"contacts": [
{
"id": 5727217287954432,
"type": "PERSON",
"star_value": 0,
"lead_score": 1,
"tags": [
" mobile",
"test"
],
"properties": [
{
"type": "SYSTEM",
"name": "first_name",
"value": "test first"
}
...
],
...
}
]
}
]
Method: GET
curl https://{domain}.agilecrm.com/dev/api/contacts/{contact_id}/events/sort -H "Accept: application/xml" -v -u {email}:{apikey}
[
{
"id": 5758048710688768,
"start": 1409682600,
"end": 1409768100,
"is_event_starred": false,
"allDay": true,
"title": "Today Test event",
"color": "red",
"created_time": 1409569472,
"contacts": [
{
"id": 5716606839685120,
"type": "PERSON",
...
}
]
}
]
Method: POST
curl https://{domain}.agilecrm.com/dev/api/events -H "Content-Type : application/json" -H "Accept : application/json" -d {"title" : "Today Test event" , "allDay" : true, "color" : "red" , "start":1409682600,"end":1409768100, "contact_ids" : ["721001", "722001"] } -v -u {email} : {APi Key} -X POST
{
"id": 5758048710688768,
"start": 1409682600,
"end": 1409768100,
"is_event_starred": false,
"allDay": true,
"title": "Today Test event",
"color": "red",
"created_time": 1409569472,
"contacts": [
{
"id": 721001,
"type": "PERSON",
...
}
]
}
Method: PUT
curl https://{domain}.agilecrm.com/dev/api/events -H "Content-Type : application/json" -H "Accept : application/json" -d {"id": 5758048710688768, "title" : "Today Test event" , "allDay" : true, "color" : "red" , "start":1409682600,"end":1409768100, "contact_ids" : ["721001", "722001"] } -v -u {email} : {APi Key} -X PUT
{
"id": 5758048710688768,
"start": 1409682600,
"end": 1409768100,
"is_event_starred": false,
"allDay": true,
"title": "Today Test event",
"color": "red",
"created_time": 1409569472,
"contacts": [
{
"id": 721001,
"type": "PERSON",
...
}
]
}
Method: DELETE
curl https:{domain}.agilecrm.com/dev/api/events/5149503652888576 -H "Accept:application/json" -v -u {email}:{API Key} -X DELETE
Field Name | Description | Value Type | Read Only | Mandatory | Accepted values |
---|---|---|---|---|---|
id | Unique id generated when Track is created | Long | no | no | N/A |
name | Name of the track | String | no | yes | N/A |
milestones | Comma separated strings. Each string is a milestone and these are case sensitive. All of them should be specified in the same case. The first letter of the track needs to be specified in upper case. | String | no | yes | N/A |
Method: GET
curl https://{domain}.agilecrm.com/dev/api/milestone/pipelines -H "Accept: application/xml" -v -u {email}:{apikey}
[
{
"id": 5146448186310656,
"milestones": "Open,New,Prospect,Proposal,Won,Lost",
"name": "Default"
}
]
Method: POST
``sh
curl https://{domain}.agilecrm.com/dev/api/milestone/pipelines -H "Content-Type : application/json" -H "Accept : application/json" -d {"name" : "Test" , "milestone" : "Open,New,Prospect,Proposal,Won,Lost" } -v -u {email} : {APi Key} -X POST
###Example Response:
```javascript
{
"id": 5146448186310656,
"milestones": "Open,New,Prospect,Proposal,Won,Lost",
"name": "Default"
}
Method: PUT
curl https://{domain}.agilecrm.com/dev/api/milestone/pipelines -H "Content-Type : application/json" -H "Accept : application/json" -d {"id": 5146448186310656,
"name" : "Test" , "milestone" : "Open,New,Prospect,Proposal,Won,Lost" } -v -u {email} : {APi Key} -X PUT
{
"id": 5146448186310656,
"milestones": "Open,New,Prospect,Proposal,Won,Lost",
"name": "Default"
}
Method: DELETE
curl https:{domain}.agilecrm.com/dev/api/milestone/pipelines/5149503652888576 -H "Accept:application/json" -v -u {email}:{API Key} -X DELETE