Skip to main content

Get list of email accounts assigned to the client

This endpoint returns list of the email accounts linked to the client. By using this feature you can GET information including the type of email account, provider, and additional information such as error status, from name, IMAP ID, and the number of running campaigns associated with each account. For further actions, such as adding, refer to the related /companies endpoints.

Request

Endpoint

GET https://api.woodpecker.co/rest/v2/agency/companies/{company_id}/email_accounts/

Headers

x-api-key: {YOUR_API_KEY}

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

Parameters

ParameterRequiredDescription
company_idYesCompany ID. This parameter is required.

Request sample

Get list of email accounts

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

Response

Response examples

A list of email accounts used by a specific agency client.

{
"content": [
{
"id": 0,
"type": "IMAP",
"details": {
"email": "example@email.com",
"provider": "provider1",
"error": "string",
"from_name": "string",
"imap_id": 0,
"running_campaigns": 2
}
},
{
"id": 1,
"type": "SMTP",
"details": {
"email": "example@email.com",
"provider": "provider1",
"error": "string",
"from_name": "string",
"imap_id": 0,
"running_campaigns": 0
}
}
]
}

Body schema

FieldTypeDescription
contentJSON objectList of email accounts
└─idintegerEmail account ID
└─typestringType of email account
└─detailsJSON objectObject with email account details
    └─emailstringEmail account address
    └─providerstringEmail account provider name
    └─errorstringError details
    └─from_namestringFrom name
    └─imap_idintegerIMAP ID
    └─running_campaignsintegerNumber of running campaigns