# Company routes: update

URL: /code/api/company/records-update · Id: `page:code/api/company/records-update`

> The Company Verbs update as api.sb routes, with inputs, result, refusals and an example.

Reference for [Company](/business/nouns/company), one group of [Company routes](/code/api/company).

### Company.update
Changes the given properties of a Company. [Verb page](/business/nouns/company/update?interface=api).

```text
PATCH /{namespace}/companies/{id}
```

Path: `id`. Body, as JSON: the other inputs. Emits `Company.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Company. |
| `name` | `string` | No | The legal or personal name. |
| `legalName` | `string` | No | The registered name. |
| `jurisdiction` | `string` | No | Where it is incorporated. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `company` | [Company](/business/nouns/company) | Yes | The Company. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X PATCH https://api.sb/leaseline.app/companies/company_28zYNZEno0 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"legalName":"Leaseline Inc."}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "company": {
    "$id": "https://api.sb/leaseline.app/companies/company_28zYNZEno0",
    "$type": "Company",
    "name": "Leaseline",
    "legalName": "Leaseline Inc.",
    "jurisdiction": "US-DE",
    "status": "forming"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Company.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```