public class SubscriberContactController { public Contact contact { get; set; } public SubscriberContactController() { HttpRequest req = new HttpRequest(); req.setEndpoint('http://yourwebsite.com/api/contact'); // replace with your API endpoint req.setMethod('GET'); Http http = new Http(); HttpResponse res = http.send(req); // Parse thee JSON response if (res.getStatusCode() == 200) { Map data = (Map) JSON.deserializeUntyped(res.getBody()); this.contact = new Contact(); this.contact.LastName = (String) data.get('fullName'); this.contact.Email = (String) data.get('email'); this.contact.Phone = (String) data.get('phone'); this.contact.Website__c = (String) data.get('website'); this.contact.Description = (String) data.get('message'); } } }