Find contacts by custom field
GET /contacts/find_by_custom_field
curl -X GET "https://app.bualpro.com/api/contacts/find_by_custom_field?field_id=example_string&value=example_string" \
-H "Content-Type: application/json" \
-H "X-ACCESS-TOKEN: YOUR_API_KEY"
import requests
import json
url = "https://app.bualpro.com/api/contacts/find_by_custom_field?field_id=example_string&value=example_string"
headers = {
"Content-Type": "application/json",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://app.bualpro.com/api/contacts/find_by_custom_field?field_id=example_string&value=example_string", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://app.bualpro.com/api/contacts/find_by_custom_field?field_id=example_string&value=example_string", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-ACCESS-TOKEN", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.bualpro.com/api/contacts/find_by_custom_field?field_id=example_string&value=example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['X-ACCESS-TOKEN'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"data": [
{
"id": 123,
"page_id": 123,
"first_name": "Johan",
"last_name": "Ahmad",
"channel": 42,
"profile_pic": "example_string",
"locale": "example_string",
"gender": 42,
"timezone": 42,
"last_sent": 42,
"last_delivered": 42,
"last_seen": 42,
"last_interaction": 42,
"subscribed_date": "example_string",
"subscribed": 42,
"tags": [
{
"id": 123,
"name": "Johan Ahmad"
}
],
"custom_fields": [
{
"id": 123,
"name": "Johan Ahmad",
"type": 42,
"value": "example_string"
}
]
}
]
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
/contacts/find_by_custom_field
Target server for requests. Edit to use your own host.
API key (sent in header)
Custom field ID. Use 'phone' or 'email' as custom field id if you want to find the contact by phone or email
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Query Parameters
Custom field ID. Use 'phone' or 'email' as custom field id if you want to find the contact by phone or email
Responses
The source lists a maximum value of 100 for this array; its enforcement is unverified.
Find contacts by custom field value. It will return maximum 100 contacts. The results are sorted by the last custom field value update for a contact.