Search⌘ K
AI Features

Add, Edit, and Delete a Secondary Contact

Explore how to manage secondary contacts within client profiles using FreshBooks API. Learn to add, retrieve, update, and delete contacts programmatically, understanding endpoint usage and request parameters in JavaScript to handle client communications effectively.

In this lesson, we’ll learn to add a secondary contact to our client’s profile. Next, we'll learn to edit and delete it.

A client’s profile represents a company. Therefore, secondary contacts are like members of a company. Secondary contacts are useful in situations where we want to send emails or invoices to multiple contacts within the same organization. We can have multiple secondary contacts in a single client.

These operations are performed using the following endpoints:

  • Add a contact: /accounting/account/{ACCOUNT_ID}/users/clients/{CLIENT_ID}

  • Get all contacts: /accounting/account/{ACCOUNT_ID}/users/contacts

  • Update and delete a contact: /accounting/account/{ACCOUNT_ID}/users/contacts/{CONTACT_ID}

Add a secondary contact

In this section, we create a contact in the client profile that we created in the previous lesson. The /accounting/account/{ACCOUNT_ID}/users/clie ...