# Company routes: dissolve, incorporate, register

URL: /code/api/company/verbs · Id: `page:code/api/company/verbs`

> The Company Verbs dissolve, incorporate, register 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.dissolve
Dissolve winds up a Company that holds no business: it files final returns and the certificate, and keeps every record. [Verb page](/business/nouns/company/dissolve?interface=api).

```text
POST /{namespace}/companies/{company}/dissolve
```

Path: `company`. Body, as JSON: the other inputs. Emits [`Company.dissolved`](/business/events/Company.dissolved).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `company` | [Company](/business/nouns/company) | Yes | The Company to wind up. |
| `reason` | `text` | Yes | Why it ends, recorded as a Decision. |

**Returns**

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

**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. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/companies/company_28zYNZEno0/dissolve \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
```

```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": "dissolved"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Company.dissolve",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Company.incorporate
Incorporate forms a Company in a chosen jurisdiction, with its founders, shares and registered agent on record. [Verb page](/business/nouns/company/incorporate?interface=api).

```text
POST /{namespace}/companies/incorporate
```

Body, as JSON: the inputs. Emits [`Company.incorporated`](/business/events/Company.incorporated).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `legalName` | `string` | Yes | The registered name. |
| `jurisdiction` | `string` | Yes | Where the Company forms. |

**Returns**

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

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The input does not match the schema of the operation. | [`invalid-input`](/code/api/errors/invalid-input) | Read the schema of the operation, then send every required field with the right type. | None. |
| 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. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

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

```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": "incorporated"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Company.incorporate",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Company.register
Register applies for a sales tax, VAT or GST registration in one jurisdiction and records the grant as a Credential. [Verb page](/business/nouns/company/register?interface=api).

```text
POST /{namespace}/companies/register
```

Body, as JSON: the inputs. Emits [`Company.registered`](/business/events/Company.registered).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `jurisdiction` | `string` | Yes | Where to register, such as `US-TX` or `EU-DE`. |
| `kind` | `string` | Yes | Which tax the registration collects. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `credential` | [Credential](/business/nouns/credential) | Yes | The registration, with its number and filing frequency once granted. |
| `company` | [Company](/business/nouns/company) | Yes | The Company now registered in the jurisdiction. |

**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 POST https://api.sb/leaseline.app/companies/register \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jurisdiction":"US-TX","kind":"salesTax"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "credential": {
    "$id": "https://api.sb/leaseline.app/credentials/credential_Abb9zatRR1",
    "$type": "Credential",
    "issuer": "Example issuer",
    "jurisdiction": "US-DE"
  },
  "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.register",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```