Skip to main content
POST
/
api
/
blocked-companies
Add one or more blocked companies
curl --request POST \
  --url https://app.puffle.ai/api/blocked-companies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "<string>",
  "name": "<string>",
  "reason": "<string>"
}
'
{ "blocked": { "id": "bc111111-1111-1111-1111-111111111111", "user_id": "11111111-1111-1111-1111-111111111111", "domain": "acme.com", "name": "Acme Corp", "reason": "Existing customer", "created_at": "2026-04-22T10:00:00Z" } }

Overview

Block one company ({ domain, name?, reason? }) or many at once ({ entries: [...] }). Domains are normalized (lowercase, protocol and www. stripped). Duplicate domain entries with a name are upserted; duplicate domain entries without a name are skipped to preserve existing names. Name-only duplicates are silently ignored.
This operation shares the URL path /api/blocked-companies with other verbs. See the sibling page for related operations on the same resource.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Either a single { domain, name?, reason? } or a bulk { entries: [...] } shape. The server detects which based on presence of entries.

domain
string

Domain to block. Normalized server-side (lowercased, protocol and www. stripped). Either domain or name is required.

name
string

Company display name. Used when blocking by name rather than domain. Either domain or name is required.

reason
string

Free-form note explaining why the caller is blocking this.

Response

Row(s) inserted or upserted. blocked is an object on the single path and an array on the bulk path.

On the single path, blocked is the inserted row. On the bulk path, blocked is an array (may be empty if all were duplicates).

blocked
object
required

Single inserted row (single-add path) or an array of inserted rows (bulk path).

failedEntries
object[]

Present only on the bulk path when one or more name-only inserts failed for a non-duplicate reason.