Go to yourdomain.agentcisapp.com.
Navigate to Settings > API & Integrations.
Access the API tab and create a new token.
Copy the generated token; this will serve as your bearer token.
Open your lead form.
Copy the text following "/online-form/" from the URL; this is the slug of your lead form.
Example:
For the URL https://demo.agentcisapp.com/online-form/social-media-form
, the slug is social-media-form
.
URL: https://{yourdomain}.agentcisapp.com/api/v2/online-form/{slug}/docs
Replace {yourdomain}
with your Agentcis subdomain.
Replace {slug}
with the slug obtained from the previous step.
Example Response:
HTTP Method: GET
Status: 200
Headers:
{
"accept": "application/json",
"content-type": "application/json",
"authorization": "Bearer {your bearer token from step 1}"
}
Response Body:
[
{
"id": 469,
"name": "first_name",
"is_required": true,
"slug": "first_name",
"type": "string"
},
{
"id": 470,
"name": "last_name",
"is_required": true,
"slug": "last_name",
"type": "string"
},
{
"id": 471,
"name": "date_of_birth",
"is_required": true,
"slug": "date_of_birth",
"type": "date"
},
{
"id": 472,
"name": "phone",
"is_required": false,
"slug": "phone",
"type": "string"
},
{
"id": 473,
"name": "email",
"is_required": false,
"slug": "email",
"type": "string"
},
{
"id": 474,
"name": "secondary_email",
"is_required": false,
"slug": "secondary_email",
"type": null
},
{
"id": 475,
"name": "contact_preference",
"is_required": false,
"slug": "contact_preference",
"type": "string"
},
{
"id": 476,
"name": "street",
"is_required": false,
"slug": "street",
"type": "string"
},
{
"id": 477,
"name": "city",
"is_required": false,
"slug": "city",
"type": "string"
},
{
"id": 478,
"name": "state",
"is_required": false,
"slug": "state",
"type": "string"
},
{
"id": 479,
"name": "postal_code",
"is_required": false,
"slug": "postal_code",
"type": "string"
},
{
"id": 480,
"name": "country",
"is_required": false,
"slug": "country",
"type": "string"
},
{
"id": 483,
"name": "country_of_passport",
"is_required": false,
"slug": "country_of_passport",
"type": "string"
},
{
"id": 1,
"name": "TOEFL",
"is_required": false,
"slug": "TOEFL",
"meta": null,
"bands": [
{
"id": 1,
"name": "Listening",
"is_required": false
},
{
"id": 2,
"name": "Reading",
"is_required": false
},
{
"id": 3,
"name": "Writing",
"is_required": false
},
{
"id": 4,
"name": "Speaking",
"is_required": false
}
]
},
{
"id": 2,
"name": "IELTS",
"is_required": false,
"slug": "IELTS",
"meta": null,
"bands": [
{
"id": 5,
"name": "Listening",
"is_required": false
},
{
"id": 6,
"name": "Reading",
"is_required": false
},
{
"id": 7,
"name": "Writing",
"is_required": false
},
{
"id": 8,
"name": "Speaking",
"is_required": false
}
]
},
{
"id": 3,
"name": "PTE",
"is_required": false,
"slug": "PTE",
"meta": null,
"bands": [
{
"id": 9,
"name": "Listening",
"is_required": false
},
{
"id": 10,
"name": "Reading",
"is_required": false
},
{
"id": 11,
"name": "Writing",
"is_required": false
},
{
"id": 12,
"name": "Speaking",
"is_required": false
}
]
},
{
"id": 4,
"name": "SAT I",
"is_required": false,
"slug": "SAT I",
"meta": null,
"bands": []
},
{
"id": 5,
"name": "SAT II",
"is_required": false,
"slug": "SAT II",
"meta": null,
"bands": []
},
{
"id": 6,
"name": "GRE",
"is_required": false,
"slug": "GRE",
"meta": null,
"bands": []
},
{
"id": 7,
"name": "GMAT",
"is_required": false,
"slug": "GMAT",
"meta": null,
"bands": []
},
{
"id": 497,
"name": "dropdown-custom-field",
"type": "dropdown",
"slug": "e2d24773-e171-4e8f-ba0f-f34efb1ef038",
"is_required": false,
"meta": null,
"is_custom_field": true,
"items": [
"aaa",
"aa"
]
},
{
"id": 498,
"name": "text-type-custom-field",
"type": "text",
"slug": "7ca31d9e-adc6-46f7-987c-a4b231623888",
"is_required": false,
"meta": null,
"is_custom_field": true,
"items": []
}
]
HTTP Method: POST
URL: https://{yourdomain}.agentcisapp.com/api/v2/online-form/{slug}/
Headers:
{
"accept": "application/json",
"content-type": "application/json",
"authorization": "Bearer {your bearer token from step 1}"
}
Payload:
payload format
{
"slug" : "value"
}
Example Payload 1 with test score
{
"first_name": "chandan",
"last_name": "sharma",
"e2d24773-e171-4e8f-ba0f-f34efb1ef038": [
"aaa",
"aa"
],
"date_of_birth": "2020-09-11",
"phone": {
"number": "9843617001",
"country_code": "NP"
},
"country": "nepal",
"country_of_passport": "nepal"
}
Response:
Status: 200
Response Body:
{
"message": "Successfully submitted enquiry form",
"data": {
"id": 1,
"name": "lead name lead last name"
}
}
Please replace placeholders like {yourdomain}
, {slug}
, and other relevant values with your actual information.
Example Payload 2 with test score
{
"first_name": "chandan",
"last_name": "office",
"email": "chandan.sharma@globalyhub.com",
"form_id": 3,
"test_scores": [
{
"test_id": 2, // test id
"score": 1 //overall test score
},
{
"test_id": 3, // test id
"score": 2, // overall test score
"bands": [ // score by bands. These fields are only available on enabling "Enable all individual fields" in form setting
{
"id": 9,
"score": 2
},
{
"id": 10,
"score": 2
},
{
"id": 11,
"score": 3
},
{
"id": 12,
"score": 3
}
]
},
{
"test_id": 4,
"score": 3
},
{
"test_id": 5,
"score": 3
},
{
"test_id": 6,
"score": 3
},
{
"test_id": 7,
"score": 3
}
]
}
Retrieve a comprehensive list of countries with currency information, supporting search functionality for dynamic dropdowns and form selections.
Base URL: https://{tenant-domain}/api/countries
|
Endpoint:/
Method: GET
Description:Lists countries and itβs description like currency code and many more
Response:
[ { "id": 1, "country_name": "Australia", "currency_code": "AUD", "currency_name": "Australian Dollar", "country_dialing_code": "61", "value": "Australia - AUD [Australian Dollar]" }, { "id": 2, "country_name": "United States", "currency_code": "USD", "currency_name": "US Dollar", "country_dialing_code": "1", "value": "United States - USD [US Dollar]" }, { "id": 3, "country_name": "United Kingdom", "currency_code": "GBP", "currency_name": "British Pound Sterling", "country_dialing_code": "44", "value": "United Kingdom - GBP [British Pound Sterling]" } β¦. ] |
Endpoint:/list?keyword={character}
Method: GET
Description:Lists countries also supports wildcards for searching specific country
country_name is a parameter which accepts country name and fetch specific country
Endpoint:/list?keyword=Austr
Response:
[ { "id": 11, "country_name": "Australia", "currency_name": "Australian dollar", "currency_code": "AUD", "country_code": "AU", "country_dialing_code": "61", "country_code_iso_alpha3": "AUS", "value": "Australia" }, { "id": 12, "country_name": "Austria", "currency_name": "euro", "currency_code": "EUR", "country_code": "AT", "country_dialing_code": "43", "country_code_iso_alpha3": "AUT", "value": "Austria" } ] |