Skip to main content

Get companies

Retrieve a list of companies managed by your agency, including their ID, name, owner's name, status (active or inactive), number of running campaigns, and number of connected accounts.

Use this endpoint to get company IDs for other requests. Refer to the related /companies endpoints.

Request

Endpoint

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

Headers

x-api-key: {YOUR_API_KEY}

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

Parameters

ParameterRequiredTypeDescription
activeNobooleanWhether to return only active or inactive comapnies
pageNointegerRequested results page (1-based)

Request sample

Retrieve first page of companies

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/agency/companies" \
--header "x-api-key: {YOUR_API_KEY}"

Retrieve a second page of active companies

curl --request GET \
--url "https://api.woodpecker.co/rest/v2/agency/companies?active=true&page=2" \
--header "x-api-key: {YOUR_API_KEY}"

Response

Response examples

A list of clients companies. If there are no clients companies, content will be an empty array.

{
"content": [
{
"id": 12345678,
"name": "Dunmore High School",
"owner": "Jim Halpert",
"active": true,
"running_campaigns": 2,
"email_slots": 2,
"linkedin_slots": 1
},
{
"id": 12345679,
"name": "Beets Beets Beets",
"owner": "Dwight Schrute",
"active": false,
"running_campaigns": 0,
"email_slots": 0,
"linkedin_slots": 0
}
],
"pagination_data": {
"total_elements": 2,
"total_pages": 1,
"current_page_number": 1,
"page_size": 50
}
}

Body schema

FieldTypeDescription
contentarray[object]Array of company objects
└─idintegerCompany ID
└─namestringCompany name
└─ownerstringOwner of the company, one of the team members
└─activebooleanWhether this company is active or not
└─running_campaignsintegerNumber of campaigns running for that specific company
└─email_slotsintegerNumber of connected emails accounts
└─linkedin_slotsintegerNumber of connected LinkedIn accounts
pagination_dataobjectPagination information. See the pagination section

Pagination

The response body contains pagination details. It will support you in navigating through larger datasets.

Use page parameter to view a specific page.

info

Each page contains up to 50 companies

{
"content": [],
"pagination_data": {
"total_elements": 300,
"total_pages": 6,
"current_page_number": 2,
"page_size": 50
}
}
FieldTypeDescription
pagination_dataobjectPagination information
└─total_elementsintegerTotal number of companies
└─total_pagesintegerTotal number of available pages
└─current_page_numberintegerCurrent page number (1-based)
└─page_sizeintegerMaximum number of items per page