Skip to main content

Create companies

Create new client accounts under your agency account, each with its own prospect database, campaigns, and team access.

Each company created via API will automatically have an API key generated. Use /companies/{company_id}/api_keys to fetch it.

Request

The user making the request will automatically become the owner of the company. The request follows an all-or-none rule - if any company in the request is invalid (e.g., the name is already taken), none will be created.

warning

Adding a new client account comes with a fee, and you'll be charged periodically for each active account. See the pricing page for more details.

Endpoint

POST https://api.woodpecker.co/rest/v2/agency/companies

Headers

x-api-key: {YOUR_API_KEY}
Content-Type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Body

{
"companies": [
{
"name": "My first client"
},
{
"name": "My second client"
}
]
}
info

You can add up to 10 companies in one request

Body schema

FieldTypeRequiredDescription
companiesarray[object]YesA list of companies to be created
└─companies[].namestringYesName of a company

Request sample

Create new companies

curl --request POST \
--url "https://api.woodpecker.co/rest/v2/agency/companies" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"companies": [
{
"name": "My first client"
},
{
"name": "My second client"
}
]
}'

Response

Response examples

A list of created companies

{
"companies": [
{
"id": 98764,
"name": "My first client",
"owner": "Michael Scott",
"active": true
},
{
"id": 98765,
"name": "My second client",
"owner": "Michael Scott",
"active": true
}
]
}

Body schema

FieldTypeDescription
companiesarray[object]An array of created companies
└─idintegerCompany ID
└─namestringCompany name
└─ownerstringOwner of the company, the user making the request
└─activebooleanIndicates whether this company is active or not. When creating a company always true