Create CRM audience

1. Authorize

chevron-rightPOST /account/loginhashtag

Purpose

Login with username and password

Request (cURL)

curl --location '{{_.base_url}}/account/login' \
--header 'Content-Type: application/json' \
--data-raw '{
	"userName": "{{userName}}",
	"password": "{{password}}"
}'

Request body

{
	"userName": "{{userName}}",
	"password": "{{password}}"
}

Response

Explanation:

  • data: true → login succeeded.

  • The server sets a session cookie (e.g., digitalAudience) for authenticated requests.

2. Create campaign

chevron-rightPOST /campaign/createhashtag

Purpose

Create a new marketing campaign associated with the authenticated user.

Request (cURL)

curl --location '{{_.base_url}}/campaign/createcampaign' \
--header 'Content-Type: application/json' \
--header 'Cookie: digitalAudience=123' \
--data '{
  "name": "api_camp"
}'

Request Body

{
  "name": "{{_.campaign_name}}"
}

Notes:

  • Replace {{_.campaign_name}} with your campaign name.

  • Include the Cookie header from login.

Response

3. Create CRM audience

chevron-rightPOST /audience/createcrmaudiencehashtag

Purpose

Create an audience within a campaign for segmentation.

Request (cURL)

curl --location '{{_.base_url}}/audience/create/api/audience/createcrmaudience' \
--header 'Content-Type: application/json' \
--header 'Cookie: digitalAudience=123' \
--data '{
  "name": "{{_.audience_name}}",
  "description": "{{_.audience_description}}",
  "campaignId": {{_.campaign_id}}
}'

Request Body

{
  "name": "{{_.audience_name}}",
  "description": "{{_.audience_description}}",
  "campaignId": "{{_.campaing_id}}",
}

Notes:

  • Replace template variables with actual values.

  • Strings must be quoted in JSON.

  • Use the cookie from login for authentication.

  • *Description is optional.

Response

{
  "data": {
    "userId": 123,
    "description": "audience description",
    "campaignId": 123,
    "campaignName": "audience campaign",
    "dataUpdated": null,
    "startDate": null,
    "endDate": null,
    "activationStatus": "New",
    "activationStatusId": 0,
    "lifetimeStatus": null,
    "lifetimeStatusId": null,
    "tagCollection": null,
    "crmData": null,
    "audienceState": "NODATA",
    "audienceStateId": 5,
    "type": "ONBOARDING",
    "typeId": 0,
    "sourceAudienceId": null,
    "sourceAudienceTypeId": null,
    "canCreateLookalike": false,
    "hasSegments": false,
    "id": 69249,
    "name": "testfhdfhdfh",
    "created": "2025-12-15T11:36:16.489708Z",
    "updated": "2025-12-15T11:36:16.489708Z"
  },
  "status": {
    "statusCode": 0,
    "message": null
  },
  "success": true
}

4. Onboard CRM data

The CRM data can now be onboarded to your S3 bucket. Follow the guidelines for onboarding your CRM data. You would be creating a folder for your CRM data, using the audience id retrieved from previous step.

Examples

Last updated