Update Target List Member
Change a member's access on a target list.
Requires the target_lists:share scope. With an API client's token, only a list created by an API client can have its members changed; a list created in the Handshaik app returns 404, even one shared with the organisation at write. With a user's token, the user needs owner access, as in Handshaik. Making a member owner needs the user to be the list's owner, or an organisation admin or Handshaik admin, who need not see the list. Setting owner hands ownership to this member and makes the previous owner an editor; a viewer can be made owner in one call. The member is notified in Handshaik, as when a user changes their access. Sending the access they already hold changes nothing and notifies no one.
Errors: 403 missing target_lists:share, or a user without the access the change needs ยท 404 the list does not exist, belongs to another organisation, is hidden from the caller (not checked when an admin makes a member owner) or, for an API client, was not created by one, or it has no member member_id ยท 409 the member is the owner and access is not owner: a list must keep one owner, so make another member the owner instead ยท 422 an invalid body. Nothing is written on any of them.
curl -X PATCH "https://api.handshaik.com/v1/target-lists/3fa85f64-5717-4562-b3fc-2c963f66afa6/members/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer $HANDSHAIK_PUBLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"access": "editor"
}'Authorization
AuthorizationstringheaderrequiredOAuth2 client_credentials (M2M). Request a token with the
audienceset tohttps://api.handshaik.com.Handshaik's own first-party apps, such as the Chrome extension, instead sign a Handshaik user in with the authorization code flow and PKCE, with the same
audience. Such a token acts as that user, within their organisation. Partner integrations use client_credentials.
Parameters
target_list_idstring<uuid>pathrequiredThe target list's
id, as returned byGET /v1/target-listsmember_idstring<uuid>pathrequiredThe member's
member_id, as returned byGET /v1/target-lists/{target_list_id}/members
Body
accessenum<string>requiredowneradministers the list,editorcan change its companies, andviewercan only read it. A list has exactly one owner: settingownerhands ownership to this person, and the previous owner becomes an editorOne of:ownereditorviewer
Response
Successful Response
member_idstring<uuid>requiredIdentifies this person's access to this list
emailstringrequiredThe member's email address
namestringrequiredThe member's full name
accessenum<string>requiredowneradministers the list,editorcan change its companies or people, andviewercan only read itOne of:ownereditorviewer
{
"member_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "string",
"name": "string",
"access": "owner"
}