v1.0.0OpenAPI 3.1.1

Hyperlocal API

Download OpenAPI Document

Localized WhatsApp and Facebook campaigns (contacts, templates, broadcasts and their results), and personalised agent videos.

Run localized WhatsApp and Facebook campaigns for a network of local contacts, such as dealers or stores. You keep a catalog of products and templates, and a list of contacts with their state and channels. A broadcast then renders one personalized creative per contact, in the language of the contact's state, and sends it. New here? Read Hyperlocal for the whole flow, then make your first call with the Quickstart.

Every request

Send your organization API key in the x-api-key header; it starts with uvk_. Create one in the Universe app under Settings → API keys. The key and organization limits count requests over a rolling minute. See Authentication and Rate limits.

The typical flow: upload a creative, create a template and its localizations, import your contacts, get a WhatsApp template approved, then create a broadcast, send it once every creative is ready, and read its analytics.

Languages in this API are BCP-47 codes such as hi-IN, ta-IN or mr-IN, and states are Indian state and union territory names such as Maharashtra or Tamil Nadu. Get preferences lists the states and the language each one uses.

Rendering creatives, sending messages, rendering an overlay and localizing contacts charge credits. Those endpoints say so on their page, with the current price; without enough credits they return 402 and nothing is created or sent. See Credits.

Server
{{API_BASE_URL}}
Your API environment
Authentication RequiredApiKeyAuth
Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys.
x-api-key:
Client Libraries
Shell

Contact groups

Named, reusable segments of your contacts, such as "Premium dealers". A contact can be in several groups. Use group IDs to target a broadcast. Deleting a group never deletes its contacts.

List contact groups

Get a contact group

Create a contact group

Update a contact group

Add contacts to a group

Contact localization

Translate or transliterate a contact's names, area and address into the language of its state, so creatives show them in the local script. Preview and edit one contact, or localize many at once (charged per translated field).

Get the localization summary

Localize contacts

Preview contact localization

Save contact localization

Preferences

Your organization's Hyperlocal settings: which language each state uses, and whether each contact field is translated or transliterated. Defaults apply until you override them.

Get preferences

Templates

A template is the base creative, an image or a video, for one product, in its source language. Localizations add versions in other languages, overlays draw each contact's details on it, and the message-template mapping chooses the WhatsApp or Facebook copy for each language.

List templates

Get a template

Create a template

Update a template

Map message templates

Uploads

Upload the media your templates, contacts and products use: template creatives (image or video), contact logos and product images. Get a presigned URL, PUT the file to it, then register it. Or use a file already in your organization's assets.

Get an upload URL

Register an upload

Use a file from your assets

Facebook pages

A contact can connect its own Facebook Page, so broadcasts can post to it. Create a connect link and send it to the contact; they approve access on Facebook. Then check the connection or disconnect it.

Get Facebook connection status

Facebook templates

The caption of a Facebook post, per language, with placeholders filled from each contact's details. Broadcasts post the creative to each connected contact's Page with this caption.

Get Facebook template options

List Facebook templates

Get a Facebook template

Create a Facebook template

Update a Facebook template

Broadcasts

A broadcast sends one template to an audience of contacts. Creating it renders a personalized creative for each contact (charged per creative). When every creative is ready, the broadcast is in review and you can send it.

Estimate a broadcast

Auth Required

Price a broadcast before you create it, with the same audience, template and channels you would send to Create a broadcast. Returns the contacts selected, generation (rendering every contact's creative, charged at create), send (one message per contact per channel it can receive, charged when sent) and total, plus how many contacts get each language version and which message templates are mapped for it. Nothing is created or charged.

Permission: hyperlocal.broadcast:read. An API key acts with the role of the member who created it.

Credits: Free. The estimate uses the rates below, the same ones Create a broadcast and Send a broadcast charge.

Rate What it covers Price
Creative generation Rendering a personalized broadcast creative — images are a flat rate, videos are charged per second. Image: 5 credits per creative; Video (per second): 1 credits per creative
Broadcast send Dispatching one broadcast message — a WhatsApp template message or a Facebook post. 10 credits

Bodyrequiredapplication/json

fk_templateIdstring · uuidrequired

The creative template to send (id from Create a template). Each contact gets a creative rendered from the version of it in their language.

Example: 1f6d2b9a-4c3e-4f8a-b7d1-2e9c5a0f3b64
channelsstring[]required

Where to send: whatsapp (a WhatsApp template message to each contact's number), facebook (a post on each contact's connected Facebook page), or both.

Enum values:whatsappfacebook
Example: ["whatsapp"]
filterBroadcastAudienceFilterDto

Which contacts to send to when selectAll is true. The filters are combined (AND). Stored on the broadcast as audience.

Show child attributes
statestringdeprecated

Legacy single-state filter. Prefer states; both are combined. Matched without regard to case.

Example: Tamil Nadu
statesstring[]

Contacts in any of these Indian states (state on the contact). Matched without regard to case.

Example: ["Tamil Nadu","Maharashtra"]
zonesstring[]

Contacts in any of these sales zones (zone on the contact). Matched without regard to case.

Example: ["South"]
areasstring[]

Contacts in any of these areas (area on the contact). Matched exactly, including case.

Example: ["Anna Nagar","T. Nagar"]
groupIdsstring[]

Only contacts in at least one of these contact groups. ANDed with the other filters, so a group plus a state targets that group within that state.

Example: ["5b0c3f2e-8d14-4a7b-9e21-6f3a2c1d0e94"]
excludeAreasstring[]

Areas to leave out of the audience (applied after areas). Matched exactly, including case.

Example: ["Tambaram"]
searchstring

Contacts whose person name, firm name or code contains this text (case-insensitive).

Example: Sri Lakshmi
contactIdsstring[]

The contacts to send to (id from List contacts). Used when selectAll is not true; ids not in your organization are ignored.

Example: ["0c4f8e2a-6b1d-4a9e-8f3c-7d2b5e1a9c60","e7a1b3c5-9d2f-4e6a-b8c0-1f3d5a7b9e24"]
selectAllboolean

Send to every contact that matches filter (or every contact, without one) instead of contactIds.

Default: falseExample: false

Responses

201The estimate, in credits.
application/json
contactsnumberrequired

Contacts the audience selects.

Example: 120
generationnumberrequired

Credits to render every contact's creative, charged when you create the broadcast.

Example: 600
sendnumberrequired

Credits to send every message (each contact on each channel it can receive), charged when the broadcast is sent.

Example: 1180
totalnumberrequired

generation plus send.

Example: 1780
unknownLengthnumberrequired

Contacts whose video creative has no known length, so they are not in generation. Creating the broadcast is refused until the video can be measured.

Example: 0
languagesBroadcastEstimateLanguageDto[]required

Contacts per creative language, most first, with the message templates mapped for each.

Show child attributes
languagestringrequired

Language code of the creative version these contacts get.

Example: ta-IN
contactsnumberrequired

Contacts who get this version.

Example: 64
whatsappTemplateIdstring · uuid | nullrequired

WhatsApp template mapped to this language on the creative template. Null when none is: the broadcast then needs its own fk_whatsappTemplateId.

Example: 8a3e1c7b-2f4d-4b6a-9c0e-5d7f1a2b3c48
facebookTemplateIdstring · uuid | nullrequired

Facebook template mapped to this language. Null when none is: the broadcast then needs its own fk_facebookTemplateId.

Example: null
unreachableobjectrequired

Per chosen channel, how many of the contacts it cannot reach — no WhatsApp number, or no connected Facebook Page. Their messages would be skipped (and are not in send). Empty when there is no audience.

Example: {"whatsapp":0,"facebook":3}
400Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
403Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
404`fk_templateId` is not a creative template in your organization (`Creative template not found`).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
500Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
POST/v1/galaxy/hyperlocal/broadcast/estimate
curl '{{API_BASE_URL}}/v1/galaxy/hyperlocal/broadcast/estimate' \
  --request POST \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "fk_templateId": "1f6d2b9a-4c3e-4f8a-b7d1-2e9c5a0f3b64",
  "channels": [
    "whatsapp"
  ],
  "filter": {
    "state": "Tamil Nadu",
    "states": [
      "Tamil Nadu",
      "Maharashtra"
    ],
    "zones": [
      "South"
    ],
    "areas": [
      "Anna Nagar",
      "T. Nagar"
    ],
    "groupIds": [
      "5b0c3f2e-8d14-4a7b-9e21-6f3a2c1d0e94"
    ],
    "excludeAreas": [
      "Tambaram"
    ],
    "search": "Sri Lakshmi"
  },
  "contactIds": [
    "0c4f8e2a-6b1d-4a9e-8f3c-7d2b5e1a9c60",
    "e7a1b3c5-9d2f-4e6a-b8c0-1f3d5a7b9e24"
  ],
  "selectAll": false
}'
{
  "contacts": 120,
  "generation": 600,
  "send": 1180,
  "total": 1780,
  "unknownLength": 0,
  "languages": [
    {
      "language": "ta-IN",
      "contacts": 64,
      "whatsappTemplateId": "8a3e1c7b-2f4d-4b6a-9c0e-5d7f1a2b3c48",
      "facebookTemplateId": null
    }
  ],
  "unreachable": {
    "whatsapp": 0,
    "facebook": 3
  }
}

Create a broadcast

List broadcasts

Get a broadcast

List broadcast contacts

Regenerate a creative

Test messages

Before a broadcast, send one WhatsApp message with one language version of a creative to your own number. Tests are charged as one message and limited per member per hour.

Preview a test message

Send a test message

Models

AgentVideoDto
AgentVideoListDto
AnalyticsFailureReasonDto
AnalyticsStateCountDto
AnalyticsTimeseriesPointDto
BroadcastAnalyticsResponseDto
BroadcastAudienceDto
BroadcastAudienceFilterDto
BroadcastContactListResponseDto
BroadcastContactRowDto
BroadcastContactSummaryDto
BroadcastCountsDto
BroadcastCreatorDto
BroadcastEstimateLanguageDto
BroadcastEstimateResponseDto
BroadcastListResponseDto
BroadcastPaginationDto
BroadcastResponseDto
BroadcastRowDispatchDto
BroadcastScheduleDto
ChannelReachResponseDto
ContactChannelDataDto
ContactDataDto
ContactDeliveryStatusResponseDto
ContactDispatchStatusDto
ContactGroupListResponseDto
ContactGroupRefDto
ContactGroupResponseDto
ContactListItemDto
ContactListResponseDto
ContactLocalizationDto
ContactLocalizationPreviewDto
ContactLocalizationSummaryDto
ContactLocalizedFieldsDto
ContactResponseDto
ContactWhatsappDto
CopyOverlayFromDefaultDto
CopyTemplateOverlayDto
CreateAgentVideoDto
CreateBroadcastDto
CreateContactDto
CreateContactGroupDto
CreateFacebookTemplateDto
CreateHyperlocalUploadPresignDto
CreateLocalizedTemplateDto
CreateProductDto
CreateProductModelDto
CreateStagedUploadDto
CreateTemplateDto
CreateWhatsappTemplateDto
DispatchAttemptDto
EstimateBroadcastDto
FacebookAnalyticsDto
FacebookInsightsTotalsDto
FacebookInviteResponseDto
FacebookMediaDto
FacebookPageStatusDto
FacebookStatusResponseDto
FacebookTemplateListResponseDto
FacebookTemplateOptionsResponseDto
FacebookTemplateResponseDto
FacebookTemplateVariableDto
GroupAudienceFilterDto
GroupMembersDto
GroupMembersResultDto
HlCatalogCreatorDto
HlCatalogPaginationDto
HlCatalogUsageDto
HlCatalogUsageTemplateDto
HlCreatedProductDto
HlLocalizationDto
HlLocalizationListDto
HlLocalizationPreviewDto
HlMessageTemplateEntryDto
HlOverlayDto
HlProductDto
HlProductListDto
HlProductModelDto
HlProductModelListDto
HlResolvedOverlayDto
HlTemplateDto
HlTemplateListDto
HlTemplateListItemDto
HlTemplateModelRefDto
HlTemplateProductRefDto
HyperlocalImportedAssetResponseDto
HyperlocalPaginationDto
HyperlocalRegisteredUploadResponseDto
HyperlocalUploadUrlResponseDto
ImportContactsResponseDto
ImportGroupDto
ImportHyperlocalAssetFromDriveDto
ImportSkipDto
InsufficientCreditsErrorDto
LanguageLocalizationCountsDto
LocalizationMethodsDto
LocalizeContactsDto
LocalizeContactsResponseDto
MessageTemplateCreatorDto
MessageTemplateLanguageDto
MessageTemplatePaginationDto
OrgPreferenceResponseDto
OverlayMediaMetadataDto
PostInsightsDto
PreviewLocalizationDto
RegenerateCreativeResponseDto
RegisterHyperlocalUploadDto
RenderOverlayDto
ResendMessageResponseDto
ResolveOverlayDto
ResumeBroadcastResponseDto
RetryFailedResponseDto
ScheduleBroadcastDto
SendPreviewBlockedDto
SendPreviewChannelDto
SendPreviewLanguageDto
SendPreviewResponseDto
StagedUploadTicketDto
StatusEventDto
TestSendAllowanceDto
TestSendDto
TestSendMessageDto
TestSendPreviewResponseDto
TestSendPreviewVersionDto
TestSendResultResponseDto
TestSendWhatsappTemplateDto
TriggerBroadcastResponseDto
UpdateContactChannelsDto
UpdateContactDto
UpdateContactGroupDto
UpdateContactLocalizationDto
UpdateFacebookTemplateDto
UpdateLocalizedTemplateDto
UpdateProductDto
UpdateProductModelDto
UpdateTemplateDto
UpdateTemplateMessageTemplatesDto
UpdateWhatsappTemplateDto
UpsertTemplateOverlayDto
WhatsappAnalyticsDto
WhatsappBodyDto
WhatsappButtonDto
WhatsAppChannelDto
WhatsappComponentsDto
WhatsappFooterDto
WhatsappHeaderDto
WhatsappTemplateListResponseDto
WhatsappTemplateOptionsResponseDto
WhatsappTemplateResponseDto
WhatsappTemplateVariableDto