Utilities
Small helper endpoints under /v1/utils - validate a phone number, fetch a link preview, and get the server's current date and time.
Helper endpoints under /v1/utils. All three require the contacts:read
scope and are rate-limited to 120 requests per minute.
Validate a phone number
POST /v1/utils/validate_phone asks your connected WhatsApp engine whether a
phone number (or chat ID) resolves to a valid WhatsApp chat, and returns the
canonical chat ID. Use it before sending to a number you don't already have a
chat for. It needs a connected engine, like any call that reads from WhatsApp.
The body takes one field, phoneOrChatId. Unknown fields are rejected.
curl -X POST "https://api.blueticks.co/v1/utils/validate_phone" \
-H "Authorization: Bearer $BLUETICKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phoneOrChatId": "15551234567"}'{ "valid": true, "chatId": "15551234567@c.us" }A number that doesn't resolve returns { "valid": false, "chatId": null }.
Link preview
GET /v1/utils/link_preview?url=<url> fetches the preview for a link through
your connected engine. url must be a valid URL, up to 2048 characters.
curl "https://api.blueticks.co/v1/utils/link_preview?url=https%3A%2F%2Fexample.com" \
-H "Authorization: Bearer $BLUETICKS_API_KEY"{
"title": "Example Domain",
"description": null,
"thumbnail": null,
"canonicalUrl": "https://example.com/"
}Any field can be null. thumbnail, when present, is a data:image/jpeg;base64,... URL.
Current date and time
GET /v1/utils/current_date_time returns the current time in UTC and in the
timezone reported by your connected engine. Use it before building a sendAt,
since or until value, so "today" and weekdays are worked out in the right
timezone.
curl "https://api.blueticks.co/v1/utils/current_date_time" \
-H "Authorization: Bearer $BLUETICKS_API_KEY"| Field | Meaning |
|---|---|
nowUtc, isoUtc | Current time in UTC. |
nowLocal, isoLocal | Current time in timezone. |
epochMs | Epoch milliseconds. |
timezone, offsetMinutes | The timezone name and its current UTC offset in minutes. |
isDstNow | Whether daylight saving time is in effect. |
source | extension, gateway or server-fallback: which engine supplied the timezone. |
warning | Present when the timezone may not be yours (see below). |
Check source before trusting timezone:
extension: the browser extension's timezone, which is the user's own.gateway: the timezone of the gateway server, usually UTC and not the user's. Awarningis returned. Pass an explicit timezone wherever you build times.server-fallback: no engine answered, so the server's clock was used. Awarningis returned.
These routes are not part of the generated API reference, so this page is the reference for them.
Reading messages
How GET /v1/messages reads history, and how to load older messages from the phone with POST /v1/messages/load_older/{chatId}.
Receiving webhooks
Get Blueticks events — message delivery, incoming WhatsApp messages, group activity, sessions, campaigns — POSTed to your server in real time.