Tally Platform API
member-email
Update Member Email
1 min
code examples curl location globoff request put 'https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/emails/{memberemailid}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data raw '{ "email" "email\@email com" }'require "uri" require "json" require "net/http" url = uri("https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/emails/{memberemailid}") https = net http new(url host, url port) https use ssl = true request = net http put new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "email" "email\@email com" }) response = https request(request) puts response read body import requests import json url = "https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/emails/{memberemailid}" payload = json dumps({ "email" "email\@email com" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("put", url, headers=headers, data=payload) print(response text) okhttpclient client = new okhttpclient() newbuilder() build(); mediatype mediatype = mediatype parse("application/json"); requestbody body = requestbody create(mediatype, "{\n \\"email\\" \\"email\@email com\\"\n}"); request request = new request builder() url("https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/emails/{memberemailid}") method("put", body) addheader("accept", "application/json") addheader("content type", "application/json") build(); response response = client newcall(request) execute(); responses // success // bad request { "errors" \[ { "code" "", "fieldname" "", "message" "", "messageparameters" \[ {} ] } ] }// unauthorized // forbidden // internal error