All Collections
Integrations
Agency API
Fetching client's email accounts
Fetching client's email accounts
Weronika Wróblewska avatar
Written by Weronika Wróblewska
Updated over a week ago

Sometimes you need to see what email accounts are used to send campaigns on behalf of your client and what is their current state. You can automate this process with a dedicated endpoint.

IMPORTANT!

Only admins, owners and authorized team members can get a list of client's email accounts via API.

To get a list of all email accounts added to your client's company, use the following request:

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

where {{CID}} stands for company ID.

Sample response:

{
"content": [{
"id": 123456,
"type": "SMTP",
"details": {
"email": "[email protected]",
"provider": "Google",
"error": null,
"from_name": "James Halpert",
"imap_id": 123455,
"running_campaigns": 2
}
},
{
"id": 123455,
"type": "IMAP",
"details": {
"email": "[email protected]",
"provider": "Google",
"error": null
}
},
{
"id": 123460,
"type": "SMTP",
"details": {
"email": "[email protected]",
"provider": "Google",
"error": null,
"from_name": "Pam Beesly",
"imap_id": 123459,
"running_campaigns": 1
}
},
{
"id": 123459,
"type": "IMAP",
"details": {
"email": "[email protected]",
"provider": "Other",
"error": "Connected conditionally."
}
}]
}

Response data type:

  • content - JSON object, list of companies managed by your agency.

  • id - number, mailbox ID.

  • type - string, indicates whether it's an SMTP or IMAP.

  • details - JSON object, a detailed information about the specific mailbox.

  • email - string, email address.

  • provider - string, a mailbox provider.

  • error - string, an error message. If null, everything is okay.

  • from_name - string, a name associated with email account.

  • imap_id - number, IMAP ID associated with the given SMTP. Check Note for more details.

  • running_campaigns - number, number of campaigns being sent from that specific SMTP.

Note:

You can associate multiple SMTPs with one IMAP.


Want to integrate with us?

If you're interested in building a native integration with Woodpecker, fill out this form and we'll get back to you.

Did this answer your question?