MEDIGO/go-zendesk

Add support for making an Identity primary

Wundark opened this issue · 4 comments

Could the following endpoint be added?

https://developer.zendesk.com/rest_api/docs/support/user_identities#make-identity-primary

PUT /api/v2/users/{user_id}/identities/{id}/make_primary

Hi @Wundark,

We currently do not support primary identity. Not sure how soon this will be done. But you could try this

	// update user identity
	identity := UserIdentity{
		Primary: true,
	}

	_, err = client.UpdateIdentity(*user.ID, identityID, &identity)

Not sure if the UpdateIdentity will work for this. But it's worth a try

@eggman64 Thanks for the reply. Unfortunately, the Zendesk docs say this can't be done.

Note: You can't change an identity's primary attribute with this endpoint. Use the Make Identity Primary endpoint instead.