SparrowDesk
Companies

Update a company

Domains are additive — any supplied are appended to the company's existing domains, leaving the primary domain unchanged. This endpoint cannot remove a domain.

PATCH
/companies/{id}
AuthorizationBearer <token>

In: header

Path Parameters

idinteger

Unique identifier of the company

At least one field must be provided

name?string
domains?array<string>

Domains owned by the company. The first entry is the primary and is what the favicon and the domain field resolve to. A domain may belong to only one company per account.

domain?string

Single-domain shorthand, equivalent to sending a one-item domains array. Ignored when domains is supplied.

phone?string
address?string
notes?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://app.sparrowdesk.com/v1/companies/0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": 0,
    "name": "string",
    "domains": [
      "string"
    ],
    "domain": "string",
    "logo": "string",
    "industry": "string",
    "phone": "string",
    "address": "string",
    "notes": "string",
    "other_details": {},
    "total_contacts_linked": 0,
    "created_at": 0,
    "updated_at": 0
  }
}
{
  "error": {
    "message": "At least one field must be provided"
  }
}
{
  "error": {
    "message": "Company not found"
  }
}
{
  "error": {
    "message": "Company with this name already exists"
  }
}
{
  "error": {
    "message": "Error while updating company"
  }
}