0

Is it possible to use marketing cloud rest api to check if contact with specific key exists in all contacts without any contact data creation or modifications?

I tried to search rest api documentation but did not see such call?

0

You can search for a contact by attributes. Just search where a given Contact Key equals some value, and then check the response to confirm whether a contact was found for that criteria.

Host: https://www.exacttargetapis.com
POST /contacts/v1/contacts/search
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
Payload: 

{ 
   "request":{ 
      "attributes":[ 
         { 
            "key":"Contact.Contact Key"
         }
      ]
   },
   "conditionSet":{ 
      "operator":"And",
      "conditionSets":[ 

      ],
      "conditions":[ 
         { 
            "attribute":{ 
               "key":"Contact.Contact Key"
            },
            "operator":"Equals",
            "value":{ 
               "items":[ 
                  "SomeKey"
               ]
            }
         }
      ]
   }
}
| improve this answer | |
  • Hey Jason - do you have a link to the reference/documentation for this API? – Cameron Robert Oct 16 '19 at 0:58
  • I tried this and got 404 not found. I'm using newer endpoints with subdomains *.rest.marketingcloudapis.com – roisto Oct 16 '19 at 8:54
  • Can you edit your answer to post what you have tried? The endpoint and payload above should give you a 200 response. – Jason Hanshaw Oct 16 '19 at 14:10
  • my mistake as I was using GET instead of POST method. I can get 200 response correctly now – roisto Oct 17 '19 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.