---
title: "POST /public/v1/do-not-contact/sync"
method: POST
path: "/public/v1/do-not-contact/sync"
tags: ["Workspaces"]
---

# POST /public/v1/do-not-contact/sync

`POST /public/v1/do-not-contact/sync`

## Request

- Base URL: `https://api.joinvalley.co`
- URL: `https://api.joinvalley.co/public/v1/do-not-contact/sync`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/joinvalley/apis/valley-public-api/docs/public/v1/do-not-contact/sync/post.ts> (a function with typed inputs; its response is checked against the schema)

Sync one outside record (for example a Salesforce Lead, Contact or Account) into the workspace Do Not Contact list. action "add" blocks the record's emails, company domains (everyone at that company) and any Valley person matching them or its LinkedIn URLs, and stops their in-flight campaigns at the next send, LinkedIn and email alike. Calling add again for the same externalId with the same contents changes nothing; with new contents it replaces what that record blocked. action "remove" lifts exactly what that record blocked; someone also blocked for another reason (an opt-out reply, a manual block) stays blocked. Workspace owners, admins and managers only.

## Request body

- object
  - `workspaceId` string: Required unless the key is scoped to one workspace.
  - `externalId` string, required: The outside record id, e.g. a Salesforce record id.
  - `source` string: The outside system. Defaults to "salesforce".
  - `action` 'add' | 'remove'
  - `emails` string[]
  - `domains` string[]: Company domains: blocks everyone at that company. Freemail domains are refused.
  - `linkedinUrls` string[]

## Response `200`

Default Response

- object
  - `statusCode` number
  - `status` boolean
  - `message` string
  - `data` object
    - `externalRef` string
    - `status` string: add: blocked, updated or unchanged. remove: removed.
    - `prospectsMatched` number
    - `emails` string[]
    - `domains` string[]
    - `removed` number
    - `rejected` object[]
      - `value` string
      - `reason` string

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `429`: Default Response
- `500`: Default Response

## Changes

- **2026-10-22** `f783c1756212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/joinvalley/apis/valley-public-api/changes/public/v1/do-not-contact/sync/post.md)

---

[API](https://skmtc.dev/joinvalley/apis/valley-public-api.md) - [All operations](https://skmtc.dev/joinvalley/apis/valley-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/joinvalley/apis/valley-public-api/revisions/798c2eb1b512?raw)
