Skip to main content

CDP API

API Reference

You can perform CDP Actions using REST API calls

  • URL - https://stage-askribe-askribe-ohlibf5r4a-el.a.run.app/api/v1/consumer/cdp-action
  • Request Method - POST
  • Headers - "Content-Type": "application/json"
  • Body
    • askribeKey
      • Type: String
      • Required
      • Obtain the API key required to connect with Askribe servers from the Settings section in your Askribe flow dashboard.
    • cdpId
      • Type: String
      • Required
      • This can be acquired from the CDP dashboard
    • cdpActionType
      • Type: Enum
      • Required
      • Allowed values
        • CREATE_CONTACT - Used to create a new contact in the CDP
        • UPDATE_CONTACT - Used to update one or more existing contacts in the CDP
        • DELETE_CONTACT - Used to delete one or more existing contacts in the CDP
        • ADD_TAGS_TO_CONTACT - Used to add one or more tags to one or more existing contacts in the CDP
        • REMOVE_TAGS_FROM_CONTACT - Used to remove one or more tags from one or more existing contact in the CDP
        • FIND_CONTACT - Used to find ONE contact in the CDP using an identifier column
        • FILTER_CONTACTS - Used to find multiple contacts using condition
        • CREATE_TAG - Used to create one or more tags in CDP
        • DELETE_TAG - Used to delete one or more tags in CDP
    • getContactsMechanism
      • Type: Enum
      • Required if cdpActionType is one of UPDATE_CONTACT || DELETE_CONTACT || ADD_TAGS_TO_CONTACT || REMOVE_TAGS_FROM_CONTACT
      • Allowed values
        • FIND_BY_IDENTIFIER - Use this when you want to get a single contact based on an identifier column
        • FILTER_CONDITION - Use this when you want to get multiple contacts using condition
        • CONTACT_ID - Use this when you want to get one or more contacts using their ids. This is particularly useful when you have already fetched contacts via FIND_CONTACT or FILTER_CONTACTS API
    • findMap
      • Type: Map with a single string key and string value
      • Required when cdpActionType is FIND_CONTACT or getContactsMechanism is FIND_BY_IDENTIFIER
      • Used to find a contact with an identifier key-value pair.
    • filterCondition
      • Type: String
      • Required when cdpActionType is FILTER_CONTACTS or getContactsMechanism is FILTER_CONDITION
      • Used to find all the contacts that match a condition.
    • contactIds
      • Type: List<String>
      • Required when getContactsMechanism is CONTACT_ID
      • Used to find all the contacts by their ids.
    • contactData
      • Type: Map<String, String>
      • Required when cdpActionType is one of UPDATE_CONTACT || CREATE_CONTACT
      • Contains the data for the new or updated contact
    • tagNames
      • Type: List<String>
      • Required when cdpActionType is one of ADD_TAGS_TO_CONTACT || REMOVE_TAGS_FROM_CONTACT || CREATE_TAG || DELETE_TAG
      • Contains the list of tag names
    • conflictResolutionType
      • Type: Enum
      • To be sent optionally when the cdpActionType = CREATE_CONTACT
      • Allowed values
        • OLD_DATA_WINS - No-op
        • NEW_DATA_WINS - The new contact overrides existing contact
        • MERGE_WITH_OLD_DATA_WINS - An attempt to merge both the contacts is made. In case of conflicting fields, no-op happens
        • MERGE_WITH_NEW_DATA_WINS - An attempt to merge both the contacts is made. In case of conflicting fields, new data overrides exsiting data