curl -X POST https://api.reveniq.com/v1/customers -H 'Authorization: YOUR_API_TOKEN_HERE' -H 'Content-Type: application/json'-d '{ "email": "", "name": "", "phone": "", "description": "", "country_code": "", "address": { "country_code": "IT" }, "metadata": []}'
require 'uri'require 'net/http' url = URI("https://api.reveniq.com/v1/customers") http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(url)request["Content-Type"] = 'application/json'request["Authorization"] = 'YOUR_API_TOKEN_HERE'request.body = '{ "email": "", "name": "", "phone": "", "description": "", "country_code": "", "address": { "country_code": "IT" }, "metadata": []}' response = http.request(request)puts response.read_body
HttpResponse<String> response = Unirest.post("https://api.reveniq.com/v1/customers") .header("Content-Type", "application/json") .header("Authorization", "YOUR_API_TOKEN_HERE") .body('{ "email": "", "name": "", "phone": "", "description": "", "country_code": "", "address": { "country_code": "IT" }, "metadata": []}') .asString();
import requests url = "https://api.reveniq.com/v1/customers" payload = '{"email":"","name":"","phone":"","description":"","country_code":"","address":{"country_code":"IT"},"metadata":[]}'headers = { 'Content-Type': "application/json", 'Authorization': "YOUR_API_TOKEN_HERE", } response = requests.request("POST", url, data=payload, headers=headers) print(response.text)
var data = '{"email":"","name":"","phone":"","description":"","country_code":"","address":{"country_code":"IT"},"metadata":[]}'; var xhr = new XMLHttpRequest(); xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); }}); xhr.open("POST", "https://api.reveniq.com/v1/customers");xhr.setRequestHeader("Content-Type", "application/json");xhr.setRequestHeader("Authorization", "YOUR_API_TOKEN_HERE"); xhr.send(data);