arazzo: 1.0.1
info:
title: ActiveCampaign Create Contact, Subscribe to List, and Tag
summary: Create a contact, subscribe it to a list, then apply a tag in one pass.
description: >-
The canonical ActiveCampaign onboarding flow. A new contact is created from
an email and name, the contact is then subscribed to a mailing list by
setting its list status to active, and finally a tag is applied to the
contact for segmentation. Every step spells out its request inline,
including the Api-Token authentication header, so the flow can be read and
executed without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: contactsApi
url: ../openapi/activecampaign-contacts-api-openapi.yml
type: openapi
workflows:
- workflowId: create-contact-add-to-list-tag
summary: Create a contact, subscribe to a list, and apply a tag.
description: >-
Creates a contact, subscribes the new contact to the supplied list, and
applies the supplied tag to the contact for segmentation.
inputs:
type: object
required:
- apiToken
- email
- listId
- tagId
properties:
apiToken:
type: string
description: ActiveCampaign API token sent in the Api-Token header.
email:
type: string
description: Email address of the contact to create.
firstName:
type: string
description: Optional first name of the contact.
lastName:
type: string
description: Optional last name of the contact.
phone:
type: string
description: Optional phone number of the contact.
listId:
type: integer
description: Identifier of the list to subscribe the contact to.
tagId:
type: integer
description: Identifier of the tag to apply to the contact.
steps:
- stepId: createContact
description: Create the contact from the supplied email and name fields.
operationId: create-a-new-contact
parameters:
- name: Api-Token
in: header
value: $inputs.apiToken
requestBody:
contentType: application/json
payload:
contact:
email: $inputs.email
firstName: $inputs.firstName
lastName: $inputs.lastName
phone: $inputs.phone
successCriteria:
- condition: $statusCode == 201
outputs:
contactId: $response.body#/contact/id
- stepId: subscribeToList
description: Subscribe the new contact to the supplied list by activating its status.
operationId: update-list-status-for-contact
parameters:
- name: Api-Token
in: header
value: $inputs.apiToken
requestBody:
contentType: application/json
payload:
contactList:
list: $inputs.listId
contact: $steps.createContact.outputs.contactId
status: 1
successCriteria:
- condition: $statusCode == 200
outputs:
contactListId: $response.body#/contacts/0/id
- stepId: applyTag
description: Apply the supplied tag to the contact for segmentation.
operationId: create-contact-tag
parameters:
- name: Api-Token
in: header
value: $inputs.apiToken
requestBody:
contentType: application/json
payload:
contactTag:
contact: $steps.createContact.outputs.contactId
tag: $inputs.tagId
successCriteria:
- condition: $statusCode == 201
outputs:
contactTagId: $response.body#/contactTag/id
outputs:
contactId: $steps.createContact.outputs.contactId
contactTagId: $steps.applyTag.outputs.contactTagId
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.