Adding tags and data tags to a party

34 views
Skip to first unread message

Sam Penny

unread,
Nov 26, 2018, 4:26:26 AM11/26/18
to Capsule API
Hi there,

Fairly new to the API in general. At the moment I'm testing out adding tags and data tags to parties. I'm using curl to test, but will eventually translate into a webhook via Zapier.

How do I add tags and data tags to parties? I know you update parties using PUT, but I can't figure out the actual code.

curl -i -X PUT -H "Authorization: Bearer {Token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"party": [ {
"tag": {
"name": "Prospect"
} ]
}' https://api.capsulecrm.com/api/v2/parties/123

--

What am I getting wrong here? I have a tag/data tag called 'Prospect' that I want to add via the API.

I also want to add

Data tag: "Prospect"
Field: "Main product of interest": "Interest"

Tom Bell

unread,
Nov 26, 2018, 4:43:32 AM11/26/18
to Capsule API
Good day Sam,

You will need to include the ID of the tag definition (https://developer.capsulecrm.com/v2/operations/Tag#listTags) in the tag object. If you get any other error messages, please copy and paste them here and I will be able to help further.

Thanks,
Tom - Capsule

Sam Penny

unread,
Nov 27, 2018, 8:09:00 AM11/27/18
to Capsule API
Thanks Tom, I tried:

curl -i -X PUT -H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"party": [ {
"tag": {
"id":2296791,
"name": "Water Report Subscriber",
"description: "null",
"dataTag":false
} ]
}' https://api.capsulecrm.com/api/v2/parties/153512590/


Trying to add the 'Water Report Subscriber' tag. I retrieved the ID, but I received 'could not find resource' and a bunch of other messages

Tom Bell

unread,
Nov 27, 2018, 8:10:41 AM11/27/18
to Capsule API
Almost there, the "tag" property needs to be "tags" and an array of objects.
Reply all
Reply to author
Forward
0 new messages