Legacy Dev Forum Posts

 View Only

Sign Up

Fin user email was sent to

  • 1.  Fin user email was sent to

    Posted 06-05-2025 18:24

    Vereb_Laszlo | 2022-10-27 14:18:07 UTC | #1

    Hi. The email message returned by /conversations/emails/:conversationId/messages/:messageId contains from and to email address, but I would like to find the user and/or external contact that sent or received the message. How can I do it?


    jacobshaw | 2022-10-27 14:47:00 UTC | #2

    Hi @Vereb_Laszlo

    You can use the GET /api/v2/externalcontacts/contacts resource to search external contacts by email or name.

    Likewise you can search users with POST /api/v2/users/search with a request body similar to:

    {
      "query": [
        {
          "fields": [
            "addresses.email"
          ],
          "type": "EXACT",
          "value": "XXXXXXXX@example.com"
        }
      ]
    }

    Vereb_Laszlo | 2022-10-27 15:00:49 UTC | #3

    Getting a user with /api/v2/users/:userId the response contains userA@domainA.com email address, but the email message contains a userA@domainB.com email address. They are not the same.


    jacobshaw | 2022-10-27 15:34:17 UTC | #4

    In that case you can replace "EXACT" with "STARTS_WITH" in the user search request body above, and replace the value with the prefix of the email (before the @) to find the matching user


    system | 2022-11-27 15:34:47 UTC | #5

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 16930