Get Contact
curl --request GET \
--url https://public.watermelon.ai/api/v1/contacts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://public.watermelon.ai/api/v1/contacts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.watermelon.ai/api/v1/contacts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public.watermelon.ai/api/v1/contacts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public.watermelon.ai/api/v1/contacts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public.watermelon.ai/api/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.watermelon.ai/api/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 1,
"company_id": 123,
"first_name": "Walter",
"last_name": "Melon",
"email_address": "walter.melon@example.co",
"telephone_number": "+316123456789",
"avatar": "https://unsplash.com/photos/hUkZv0Y47Ic",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "offline",
"from_integration": true,
"integration": "Zapier",
"from_whatsapp": true,
"from_email": true,
"fields": [
{
"id": 1,
"company_id": 123,
"icon": "information",
"name": "Order number",
"type": "text",
"order": 123,
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"is_unique": true
}
]
}{
"code": 123,
"message": "<string>",
"fields": "<string>"
}Contacts
Get Contact
GET
/
contacts
/
{id}
Get Contact
curl --request GET \
--url https://public.watermelon.ai/api/v1/contacts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://public.watermelon.ai/api/v1/contacts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.watermelon.ai/api/v1/contacts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public.watermelon.ai/api/v1/contacts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public.watermelon.ai/api/v1/contacts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public.watermelon.ai/api/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.watermelon.ai/api/v1/contacts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 1,
"company_id": 123,
"first_name": "Walter",
"last_name": "Melon",
"email_address": "walter.melon@example.co",
"telephone_number": "+316123456789",
"avatar": "https://unsplash.com/photos/hUkZv0Y47Ic",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "offline",
"from_integration": true,
"integration": "Zapier",
"from_whatsapp": true,
"from_email": true,
"fields": [
{
"id": 1,
"company_id": 123,
"icon": "information",
"name": "Order number",
"type": "text",
"order": 123,
"value": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"is_unique": true
}
]
}{
"code": 123,
"message": "<string>",
"fields": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Contact id to fetch
Response
Contact
Example:
1
Example:
"Walter"
Example:
"Melon"
Example:
"walter.melon@example.co"
Example:
"+316123456789"
Example:
"https://unsplash.com/photos/hUkZv0Y47Ic"
Available options:
online, offline, minimized, disconnected Example:
"offline"
Example:
"Zapier"
Show child attributes
Show child attributes
Was this page helpful?
⌘I

