---
title: "Add a competitor"
method: POST
path: "/brands/{brandId}/entities"
tags: ["entities"]
---

# Add a competitor

`POST /brands/{brandId}/entities`

## Request

- Base URL: `https://shruwd.io/api/v1`
- URL: `https://shruwd.io/api/v1/brands/{brandId}/entities`
- Auth: HTTP bearer

Competitors only; the self entity comes with the brand.

Aliases are exact strings matched on token boundaries — no patterns, no
fuzzy matching. The name is always one of them; `aliases` adds other
spellings ("Beta List" for BetaList). A given alias equal to the name in
any case stands for it, so a case-sensitive acronym stays case-sensitive.

**Short or common-word names need context terms.** A name or alias of
six characters or fewer, or an ordinary English word ("Arc", "Linear",
"Notion"), matches sentences that are not about the company. Such an
entity is refused with `422 context_terms_required` until
`contextTerms` is given, and `details.spelling` names the spelling; a
mention then counts only when one of the terms appears nearby.

## Request body

- CreateEntityRequest
  - `name` string, required
  - `aliases` AliasInput[]: Defaults to the entity's name.
    - `alias` string, required: An exact string, matched on token boundaries. Not a pattern.
    - `kind` 'name' | 'product' | 'abbreviation' | 'misspelling'
    - `caseSensitive` boolean
  - `domains` string[]: Hosts or URLs; reduced to registrable domains. A citation of one of them counts for this entity.
  - `exclusions` string[]: Literal phrases that contain an alias but are not the entity ("arc welding" for "Arc").
  - `contextTerms` string[]: When non-empty, a mention counts only if one of these appears nearby. Required for short or common-word names. The entity's domains are added to them.

## Response `201`

Created.

- Entity
  - `entityId` string, required
  - `name` string, required
  - `isSelf` boolean, required: True for the brand itself.
  - `requiresContext` boolean, required: Mentions count only near one of `contextTerms`.
  - `needsContextTerms` boolean, required: The name or an alias is six characters or fewer or an ordinary English word, so the entity needs context terms to count only real mentions. True with `requiresContext` false means the entity is matching without them; set some with PUT /entities/{entityId}, or remove the alias.
  - `genericSpelling` string, nullable, required: The spelling, name or alias, that makes `needsContextTerms` true; null when none does.
  - `contextTerms` string[], required
  - `aliases` Alias[], required
    - `aliasId` string, required
    - `alias` string, required
    - `kind` 'name' | 'product' | 'abbreviation' | 'misspelling', required
    - `caseSensitive` boolean, required: True for acronyms: `SAP`, not `sap`.
  - `domains` string[], required
  - `exclusions` string[], required
  - `createdAt` string, date-time, required

## Other responses

- `404`: `not_found`: no such resource in this workspace.
- `409`: `domain_taken`: another entity of this brand owns the domain.
- `422`: `context_terms_required`, `invalid_alias`, `invalid_domain`, `invalid_name`.
- `default`: Every failure has this body.

---

[API](https://skmtc.dev/shruwd/apis/shruwd-api.md) · [All operations](https://skmtc.dev/shruwd/apis/shruwd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shruwd/apis/shruwd-api/revisions/64a5da079928?raw)
