Add a Competitor
POST/competitors
A brandId outside the key's reach answers 400, identically to one that does not exist. A brand tracks at most 500 competitors; adding one past that answers 409.
Needs write access. About keys
Request
curl -X POST "https://app.vyingfor.com/api/v1/competitors" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"brandId":"BRAND_ID","name":"Rival Co"}'Body
| Field | Type | Description |
|---|---|---|
brandId required | string | |
name required | string | |
domains | string[] | |
aliases | string[] |
Response
201 Competitor created
| Field | Type | Description |
|---|---|---|
id | string | |
brandId | string | |
name | string | |
domains | string[] | |
aliases | string[] | |
createdAt | string | |
updatedAt | string |
Errors
400Invalid request data401Authentication required403The key is valid but doesn't have the access this request needs.409The brand already has the most competitors allowed.429Per-key rate limit exceeded.500Internal server error