What is the {id} that goes into the mailbox API?

I am using this API endpoint /v1/mailbox/mailMessages/{id}
Documented here.

For the {id} I had thought that this would match the ID in the URL of the PipeDrive UI.
i.e. https://....pipedrive.com/mail/inbox/12345 where 12345 is the {id}.

However, when I used the UI’s ID for the {id} in the API it either finds an email I did not expect or no email at all (404 Error).

I looked the the /v1/deals/{id} to see if emails are linked to a Deal, and with their the emails {id}. But I could not find any email attributes in the Deal’s JSON.

I have two questions.

  1. Where do I source the {id} from for the mailbox API /v1/mailbox/mailMessages/{id}
  2. How do I find the association between Deals and Mailbox (email) records?

Thank you!

Hi @LomasNZ
Welcome to the community :wave: and thanks for adding the relevant details :slight_smile:

You can make use of the List mail messages associated with a deal endpoint to find this association.

You can then plug these IDs into the relevant mailbox endpoints to get the email details.

Is there a way to get all messages vs only messages by id? For example I am testing a migration using KingswaySoft’s REST connector so I want to be able to retrieve every message, not one at a time.