All Collections
Inbox: Forms & Requests
Create a Custom API Source
Create a Custom API Source
Updated over a week ago

In this tutorial, we'll show you how to create a request source with a custom API.

☝ API (Application Programming Interface) is an intermediary software that allows communication and exchange of information between two programs.

Create a new API source

From the Home Dashboard, go to Settings.

Click on Inbox Center Settings.

Click on New source.

Select the type of inbound source you want to create:

  • Shared company email: use this email for your company emails which can be viewed by your team

  • Simple form: create your form and embed it in your website

  • Custom API source: create a form that will be connected from your website to Samdock through API

For the purpose of this tutorial, we'll choose a Custom API source.



Set up the URL for the request

Copy the URL below with the ID for your API interface. This URL will be used by your provider (normally, your form provider) to submit information to Samdock via API.

Prepare the body of the request

When posting to a source, the body of the request should match the fields that are set up in the source settings.

Below, you'll find the field key names and the value types that are expected by the API.

{
"person":{
"email":"String@email.com",
"firstName":"String",
"lastName":"String",
"gender":"female",
"namePrefix":"Prefix",
"nameSuffix":"Suffix",
"mobileNumber":"String",
"phoneNumber":"String",
"officeNumber":"String",
"homeNumber":"String",
"privateNumber":"String",
"faxNumber":"String",
"website":"www.string.com",
"linkedin":"String",
"xing":"String",
"twitter":"String",
"facebook":"String",
"instagram":"String",
"birthday":"yyyy-mm-dd",
"address":{
"street":"String",
"number":"String",
"postcode":"String",
"city":"String"
},
"customFields":{
"person-text":"String",
"person-singleSelect":[
"optionID"
],
"person-multiSelect":[
"optionID",
"optionID"
],
"person-currency":"Number"
}
},
"organization":{
"website":"www.string.com",
"name":"String",
"email":"String@email.com",
"isCustomer":true,
"phoneNumber":"String",
"faxNumber":"String",
3"linkedin":"String",
"xing":"String",
"twitter":"String",
"facebook":"String",
"instagram":"String",
"vatRegNo":"String",
"address":{
"street":"String",
"number":"String",
"postcode":"String",
"city":"String"
},
"customFields":{
"organization-text":"String",
"organization-singleSelect":[
"optionID"
],
"organization-multiSelect":[
"optionID",
"optionID"
],
"organization-currency":"Number"
},
"lead":{
"name":"String",
"customerRequirement":"String"
}
}


❗️❗️person.lastName, organization.name and lead.name are MANDATORY fields ❗️❗️

Implementation

This step depends on what you are trying to connect with Samdock.

Make sure to check the documentation of your providers to learn how to implement it.

Should any problems arise, contact our Support team, so they can guide you.

Did this answer your question?