Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Unable to change primary phone number

    Posted 01-13-2026 09:32

    We have a user with the following contact information:

    {
      "primaryContactInfo": [
        {
          "address": "ctoll3kd@posterous.com",
          "mediaType": "EMAIL",
          "type": "PRIMARY"
        },
        {
          "address": "+4412345678",
          "display": "+4412345678",
          "mediaType": "PHONE",
          "type": "PRIMARY"
        }
      ],
      "addresses": [
        {
          "address": "+447524456789",
          "display": "+44 7524 456789",
          "mediaType": "PHONE",
          "type": "WORK",
          "extension": "",
          "countryCode": "IM"
        },
        {
          "address": "+4412345678",
          "display": "+4412345678",
          "mediaType": "PHONE",
          "type": "WORK3",
          "extension": "",
          "countryCode": "GB"
        },
        {
          "display": "(0011223344)",
          "mediaType": "PHONE",
          "type": "HOME",
          "extension": "",
          "countryCode": "GB"
        }
      ]
    }

    We are trying to change the primary phone number using the following PATCH call:

    PATCH /api/v2/users/45803890-b8d9-4e67-9fc3-3ed03c90bbb3 HTTP/1.1
    Host: api.euw2.pure.cloud
    Content-Type: application/json

    {
      "primaryContactInfo": [
        {
          "address": "ctoll3kd@posterous.com",
          "mediaType": "EMAIL",
          "type": "PRIMARY"
        },
        {
          "address": "+447524455678",
          "display": "+44 7524 455678",
          "mediaType": "PHONE",
          "type": "PRIMARY"
        }
      ],
      "addresses": [
        {
          "address": "+447524455678",
          "display": "+44 7524 455678",
          "mediaType": "PHONE",
          "type": "WORK",
          "extension": "",
          "countryCode": "IM"
        },
        {
          "address": "+44123456789",
          "display": "+44123456789",
          "mediaType": "PHONE",
          "type": "WORK3",
          "extension": "",
          "countryCode": "GB"
        },
        {
          "address": "0011223344",
          "display": "(0011223344)",
          "mediaType": "PHONE",
          "type": "HOME",
          "extension": "",
          "countryCode": "GB"
        }
      ]
    }

    However, this does not update the primary contact, as we would expect. We notice that if we change the address data slightly, the call appears to work - but not when the address data remains unchanged. What are we doing wrong?


    #PlatformSDK

    ------------------------------
    Austen Jackson
    Software Architect
    ------------------------------


  • 2.  RE: Unable to change primary phone number

    Posted 01-13-2026 20:10
    Edited by Luiz Rosa 01-13-2026 20:56

    Hi @Austen Jackson,

    Per the API model, primaryContactInfo is tied to addresses (updates to addresses should be reflected in primaryContactInfo). In practice, keep the PHONE entry consistent across both arrays (same number/format/fields). If there’s any mismatch between what’s in addresses and what you set as PRIMARY, the primary change may not reflect as expected.


    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------