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

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

Auth Required

Before a broadcast, see what a WhatsApp test of each language version of a creative template would send: the mapped WhatsApp template, the message with sample values, and why a version cannot be tested (problem). Also returns the cost of one test and how many tests you have left this hour. Sends nothing and charges nothing.

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

Query Parameters

templateIdstring · uuidrequired

ID of the creative template to test.

Example: 8d4f2a6c-1b3e-4c5d-9a7f-0e2b4c6d8f1a

Responses

200One entry per language version, with the cost and allowance.
application/json
templateIdstring · uuidrequired

ID of the creative template.

Example: 8d4f2a6c-1b3e-4c5d-9a7f-0e2b4c6d8f1a
creditsnumberrequired

Credits one test costs: one broadcast message at your organization's rate.

Example: 10
allowanceTestSendAllowanceDtorequired

How many tests are left this hour.

Show child attributes
limitnumberrequired

Tests one member can send in a rolling hour.

Example: 5
usednumberrequired

Tests this member sent in the last hour.

Example: 2
resetsAtstring · date-time | nullrequired

When the next test can be sent, once the limit is reached. null while tests are left.

Example: null
versionsTestSendPreviewVersionDto[]required

Each language version: the base language first.

Show child attributes
languagestringrequired

BCP-47 language code of the version. Send it as language.

Example: ta-IN
isSourcebooleanrequired

Whether this is the template's base language.

Example: false
titlestringrequired

Title of this version.

Example: Diwali scooter offer
creativestring | nullrequired

Link to the creative a test sends, as uploaded. null when the version has none.

Example: https://cdn.example.com/hyper-local/uploads/creative/diwali-ta.png
thumbnailUrlstring | nullrequired

Link to a still of the video creative, for a card. null for an image creative, or while the video has no thumbnail; show the video itself then.

Example: {{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.thumb.webp
creativeTypestringrequired

Whether the creative is an image or a video.

Enum values:imagevideo
Example: image
whatsappTemplateTestSendWhatsappTemplateDtorequired

The WhatsApp template mapped to this language with Map message templates, or null when none is mapped.

Show child attributes
idstring · uuidrequired

ID of the WhatsApp template.

Example: 3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40
namestringrequired

Template name.

Example: diwali_offer_ta
statusstringrequired

Review status. Only APPROVED templates can be tested.

Enum values:DRAFTPENDINGAPPROVEDREJECTEDPAUSEDDISABLED
Example: APPROVED
languagestringrequired

WhatsApp (Meta) language code of the template.

Example: ta
messageTestSendMessageDtorequired

What a test sends, or null when this version cannot be tested.

Show child attributes
headerstringrequired

The header the creative is sent in.

Enum values:IMAGEVIDEO
Example: IMAGE
bodystringrequired

The body text, with sample values in place of {{n}}.

Example: Namaste Ravi Kumar! Visit Kumar Traders this Diwali.
footerstring | nullrequired

The footer text, or null for none.

Example: Reply STOP to unsubscribe
buttonsstring[]required

Button labels.

Example: ["View offers"]
samplesstring[]required

The sample values, in placeholder order: each variable's sample, or a built-in one. A test never uses a contact's details.

Example: ["Ravi Kumar","Kumar Traders"]
hasOverlaybooleanrequired

Whether a broadcast draws contact details on this creative. A test sends the creative without them.

Example: true
problemstring | nullrequired

Why this version cannot be tested, for example no approved WhatsApp template is mapped. null when it can.

Example: null
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
404No creative template with this `templateId` in your organization (`Template <templateId> 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
GET/v1/galaxy/hyperlocal/broadcast/test-send/preview
curl '{{API_BASE_URL}}/v1/galaxy/hyperlocal/broadcast/test-send/preview?templateId=8d4f2a6c-1b3e-4c5d-9a7f-0e2b4c6d8f1a' \
  --header 'x-api-key: YOUR_API_KEY'
{
  "templateId": "8d4f2a6c-1b3e-4c5d-9a7f-0e2b4c6d8f1a",
  "credits": 10,
  "allowance": {
    "limit": 5,
    "used": 2,
    "resetsAt": null
  },
  "versions": [
    {
      "language": "ta-IN",
      "isSource": false,
      "title": "Diwali scooter offer",
      "creative": "https://cdn.example.com/hyper-local/uploads/creative/diwali-ta.png",
      "thumbnailUrl": "{{CDN_BASE_URL}}/6a1f3c2e/hyper-local/uploads/creative/harvest.thumb.webp",
      "creativeType": "image",
      "whatsappTemplate": {
        "id": "3f8a2c1e-7b4d-4e9a-9c2f-5d1e8b7a6c40",
        "name": "diwali_offer_ta",
        "status": "APPROVED",
        "language": "ta"
      },
      "message": {
        "header": "IMAGE",
        "body": "Namaste Ravi Kumar! Visit Kumar Traders this Diwali.",
        "footer": "Reply STOP to unsubscribe",
        "buttons": [
          "View offers"
        ],
        "samples": [
          "Ravi Kumar",
          "Kumar Traders"
        ]
      },
      "hasOverlay": true,
      "problem": null
    }
  ]
}

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