GoliathDevelopersGet an API key
Reference/Contactsgenerated from the gateway manifest

removeContactTags

Strip tags.

POST/api/v1/callWRITEidempotent · 24 hruns as the key's owner
View as Markdown

Strip tags (tag ids from searchContactTags) off contacts: the removal twin of addContactTags, and the undo for a bulk tag that leaves the tag definition alone. The tag survives and stays on every contact you did not name; deleteContactTags is the destructive org-wide one. Async bulk job: returns a bulkTaskId to poll with getBulkTask; an immediate read-back will not show the change. Only FREE-FORM tag ids do anything: a list or custom-field id is IGNORED, not rejected, so the task completes having removed nothing. Take ids from searchContactTags tags (not lists); drop list membership with removeContactsFromList. A contact without the tag is skipped, not failed. POTENTIALLY OUTBOUND, like the add side: removal publishes a tags-changed event carrying removeTagIds, and a CONTACT workflow whose tag trigger is EXCLUSIVE ("tag removed") matches it and can send. Check the org’s workflows or confirm with the user before sweeping a large selection.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "removeContactTags",
    "variables": {
      "contactIds": [
        "<String>"
      ],
      "tagIds": [
        "<String>"
      ]
    }
  }'
import { GoliathClient } from '@goliath-data/sdk'

const goliath = new GoliathClient({
  apiKey: process.env.GOLIATH_API_KEY!,
  baseUrl: 'https://server.goliathdata.com',
})

const result = await goliath.contacts.removeContactTags(
  {
    contactIds: [
      '<String>'
    ],
    tagIds: [
      '<String>'
    ]
  },
  { idempotencyKey: crypto.randomUUID() },
)
const res = await fetch('https://server.goliathdata.com/api/v1/call', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({
    operationId: 'removeContactTags',
    variables: {
      contactIds: [
        '<String>'
      ],
      tagIds: [
        '<String>'
      ]
    }
  }),
})
const { data, errors } = await res.json()

Variables

The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.

contactIds[String!]!required
tagIds[String!]!required

Response

What comes back under data: a list shows as one entry, and a value as its type.

response shape
{
  "data": {
    "contactMutation": {
      "removeTagsFromContacts": {
        "mode": "SYNC",
        "bulkTaskId": "…"
      }
    }
  }
}

Errors

Idempotency

Send an Idempotency-Key of 1 to 255 characters. A finished request retried with the same key replays its stored response, marked Idempotency-Replayed: true; one still in flight returns 409 idempotency_conflict. Keys expire after 24 hours. Write without fear →