ActiveCampaign New User Flow
user_0020588
plain_text
3 years ago
930 B
18
Indexable
// POST request to create contacts
curl --request POST \
--url https://oktopi.api-us1.com/api/3/contacts \
--header 'Api-Token: {{API_TOKEN}}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"contact": {
"email": {{email}},
"firstName": {{firstName}},
"lastName": {{lastName}},
"phone": {{phone}}
}
}'
// POST request to assign contacts to automations
// we can get the contactId from the response of the previous POST request
// the automationId should be set to 229 (I already set the automation up)
curl --request POST \
--url https://oktopi.api-us1.com/api/3/contactAutomations \
--header 'Api-Token: {{API_TOKEN}}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"contactAutomation": {
"contact": {{contactId}},
"automation": 229
}
}'Editor is loading...