> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://developers.outpave.com/v1/llms.txt
> - v2: https://developers.outpave.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.outpave.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.outpave.com/_mcp/server.

# Create a business

POST https://api.outpave.com/api/v1/business
Content-Type: application/json

Creates a buyer business. You must include an `admin` — that person
becomes the business's first Admin. Sending the same `externalId` again
later updates the business instead of creating a duplicate.


Reference: https://developers.outpave.com/api-reference/customer-portal-api/businesses/post-api-v-1-business

## Authentication

- `Authorization` header (bearer token, required) — A short-lived access token from `POST /api/v1/access-token` (30 minutes by default). Send as `Authorization: Bearer <jwt>`.

## Request

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — The business's display name.
- `ein` (string, optional) — The business's Employer Identification Number (US).
- `website` (string, optional) — The business's website domain.
- `externalId` (string, optional) — The business's identifier in your system. Send it again on a later request to update the same record.
- `admin` (ApiV1BusinessPostRequestBodyContentApplicationJsonSchemaAdmin, optional) — The first admin contact. Required when the business has no contacts yet; becomes the business Admin.

## Response

### 200

Business created.

- `data` (ApiV1BusinessPostResponsesContentApplicationJsonSchemaData, required) — A buyer business — the company an invoice is addressed to.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 401 Unauthorized Error

The credential is missing, invalid, expired, or not permitted on this endpoint.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 409 Conflict Error

A unique-constraint conflict (e.g. duplicate EIN, website, or externalId).

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 500 Internal Server Error

An unexpected server error occurred. Retry the request; if the problem persists, contact support.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

## Types

### ApiV1BusinessPostRequestBodyContentApplicationJsonSchemaAdmin

The first admin contact. Required when the business has no contacts yet; becomes the business Admin.

- `email` (string, required) — The admin's email address.
- `firstName` (string, optional) — The admin's first name.
- `lastName` (string, optional) — The admin's last name.

### ApiV1BusinessPostResponsesContentApplicationJsonSchemaData

A buyer business — the company an invoice is addressed to.

- `id` (string, required) — The business's unique identifier.
- `name` (string, required) — The business's display name.
- `companyInvoiceVisibility` (enum, required) — Who can see invoices sent to the business's main email.
  - Allowed values: `EVERYONE`, `ADMINS`
- `status` (enum, required) — The business's current status.
  - Allowed values: `ACTIVE`, `DISABLED`
- `externalId` (string, optional, nullable) — The business's identifier in your system.
- `ein` (string, optional, nullable) — The business's Employer Identification Number.
- `website` (string, optional, nullable) — The business's website domain.
- `email` (string, optional, nullable) — The business's main (company-level) email.

## Examples

**Request**

```json
{
  "name": "Acme Construction"
}
```

**Response**

```json
{
  "data": {
    "id": "string",
    "name": "string",
    "companyInvoiceVisibility": "EVERYONE",
    "status": "ACTIVE",
    "externalId": "string",
    "ein": "string",
    "website": "string",
    "email": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.outpave.com/api/v1/business"

payload = { "name": "Acme Construction" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.outpave.com/api/v1/business';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Acme Construction"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.outpave.com/api/v1/business"

	payload := strings.NewReader("{\n  \"name\": \"Acme Construction\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.outpave.com/api/v1/business")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Acme Construction\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.outpave.com/api/v1/business")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Acme Construction\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.outpave.com/api/v1/business', [
  'body' => '{
  "name": "Acme Construction"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.outpave.com/api/v1/business");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Acme Construction\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["name": "Acme Construction"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.outpave.com/api/v1/business")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```