let headers = new HttpHeaders(); headers = headers.set('Content-Type', 'application/json'); headers = headers.set('Accept', 'application/json'); const payload: ResponseCreationDate = { apiKey: 'ce4bba5b-d8d4-4bbf-ba4b-cb0d6e48baad', apiSecret: '17c97e74-fb47-45ac-98e6-e8393d3d3fa4', surveyID: '3', email: 'mh@die-vm.com, forename: 'Max'. surname: 'Mustermann', referenceNumber: 'APIEXAMPLE' }; const body = JSON.stringify(payload); this.httpClient.post(this.baseUrl + 'api/public/v1.0/response/createresponse', body, { headers: headers, observe: 'response' }) .subscribe((result) => { console.log(result); });