Skip to main content

Quick profile import

Description

Imports a profile to a database in a quick way. The request has a linear structure and fits simple integrations.

To have access to extended import options please use /api/v1.1/profiles/import.

The request imports or updates the profile;if you pass the resource ID and contact details, it adds subscriptions.

Request URL

Method: POST. Data can be passed both in URL parameters and in the body of the request.

https://example.com/api/integrations/any/profile_import

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
db_idint1YesDatabase ID
matchingstring"email"NoProfiles matching mode:
  • email
  • email_profile
  • phone
  • field_name
By default – email
resource_idint1NoSubscribe to a resource using request contact data
emailstring"example@example.com"NoEmail address
phonestring"+75551111444"NoPhone number
_regipstring"172.16.0.1"NoRegistration IPv4 or IPv6. For IPv4 geodata will be retrieved
_regurlstring"https://example.com/?"NoRegistration URL or HTTP head "referer" value.
*

YesSpecify at least one database field. To retrieve field information use /api/v1.1/databases/fields_get
trigger_idint13NoThe ID of the trigger campaign. If the trigger_id is set, the profile will be imported and the trigger campaign will be start at the same time; if not — the profile will be imported in the usual way.
workflow_idint1NoScenario ID. If workflow_id is set, there will be a simultaneous import of the profile and adding the profile to the scenario; if not — the profile will be imported in the usual way.

Response parameters

Quick import returns HTTP code and response description.

HTTP codeDescription
200Import successful
400Bad request, please verify request parameters
402Tariff account limit reached
403Invalid API key
404No database or subscription resource found
402Account exceeds tariff limits
409More than one profiles matches, inaccurate matching
435Unable to keep field unique - this can be email while matching by other parameters
500Internal server error

Request example

curl "https://example.com/api/integrations/any/profile_import" \
-d token="abcdefghijklmnqrstuvwxyz" \
-d db_id=1 \
-d resource_id=1 \
-d email="john.doe@example.com" \
-d _fname="John" \
-d _lname="Doe"

Response example

Successfully added 5beeea0ad861602a078a6f34