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

Overlays

An overlay places text and images, such as the dealer's name, phone or logo, on top of a template's creative, per language. Resolve shows the values for one contact; render produces the finished image or video (charged).

List overlays

Save an overlay

Copy an overlay

Copy the default overlay

Resolve overlay values

Render an overlay

Auth Required

Render one language version of a template with its overlay, as a broadcast would, and get the file back: a PNG for an image template, an MP4 for a video. Fill the bound elements from a contact (contactId) or from your own resolved values. Uses the saved overlay unless you send elements. Set width and height to the creative's size; for a video, durationInFrames and fps set the length. The response is the file itself (Content-Disposition: attachment), not JSON. Videos can take minutes.

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

Credits: Charged before the render starts: an image at the flat rate, a video per second of output (the longer of the creative's stored length and durationInFrames / fps). Refunded in full if the render fails.

Rate What it covers Price
Template overlay render Rendering a personalized creative from a template outside a broadcast — images flat, videos per second. Image: 5 credits per creative; Video (per second): 1 credits per creative

Bodyrequiredapplication/json

templateIdstring · uuidrequired

ID of the template.

Example: b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f
languagestringrequired

Language version to render: the template's base language or one of its localizations' languages (BCP-47). Its creative is the background.

Example: hi-IN
widthnumberrequired

Output width in pixels, 16 to 8192. Use the creative's own width.

Example: 1080Min: 16Max: 8192
heightnumberrequired

Output height in pixels, 16 to 8192. Use the creative's own height.

Example: 1080Min: 16Max: 8192
contactIdstring · uuid

Contact whose details fill the bound elements. Left out: the values in resolved are used.

Example: a2c4e6f8-0b1d-4e3f-9a5c-7d8e9f0a1b2c
elementsobject[]

Elements to draw instead of the saved overlay. Same shape as in Save an overlay. Left out: the saved overlay of language (and its canvas, unless you send canvas).

Example: [{"id":"dealer-name","kind":"text","name":"Dealer name","x":6,"y":82,"w":60,"h":8,"rotation":0,"opacity":1,"zIndex":2,"locked":false,"visible":true,"binding":{"field":"firmName","mode":"localized"},"value":null,"text":{"fontFamily":"Noto Sans","fontWeight":700,"fontSize":48,"color":"#FFFFFF","align":"left","lineHeight":1.2,"letterSpacing":0,"padding":8,"borderRadius":4,"background":{"color":"#000000","opacity":0.4},"border":null,"maxLines":1}}]
canvasobject

Canvas settings (opacity, showSafeZone). Left out: the saved canvas when elements is also left out, otherwise { opacity: 1, showSafeZone: false }.

Example: {"opacity":1,"showSafeZone":false}
resolvedobject

Element id → the value to show, used as sent when there is no contactId (for example, sample values).

Example: {"dealer-name":"Shree Ganesh Tractors"}
durationInFramesnumber

Video length in frames (videos only), 1 to 72000. Omitted: the complete source duration at the requested or source FPS, including audio tails. A render longer than 10 minutes is refused.

Example: 720Min: 1Max: 72000
fpsnumber

Video frames per second (videos only), 1 to 120. Omitted: the source video frame rate.

Example: 30Min: 1Max: 120

Responses

201The rendered file (status 201): `image/png` for an image template, `video/mp4` for a video, named `overlay-render.png` or `overlay-render.mp4`.
image/png
bodyany
400Language not available The template has no version in this language (`Language "<language>" is not available for this template`): use its base language or one of its localizations' languages. Or the video would be longer than 10 minutes (`A render can be at most 10 minutes long.`).
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
402Not enough credits for the render, or your organization owes credits. Nothing was rendered.
image/png
statusCodenumberrequired

HTTP status code.

Example: 402
errorstringrequired

Always InsufficientCredits.

Example: InsufficientCredits
messagestringrequired

What happened, in plain words.

Example: You don't have enough credits to start this. It needs 120; you have 45.
requirednumberrequired

Credits this request needs.

Example: 120
availablenumberrequired

Credits your organization can spend now.

Example: 45
owednumberrequired

Credits your organization owes from earlier jobs (0 when nothing is owed). While anything is owed, every paid request is refused until it is repaid.

Example: 0
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
404Template or contact not found `contactId` is not a contact in your organization (`Contact <contactId> not found`), or `templateId` is not a template in it (`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
500Render failed The render failed (`The render failed. Your credits were refunded — try again in a moment.`). Its credits are refunded; retry later.
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
503Rendering is not set up on this server (`Rendering a preview isn’t available right now. …`). Nothing is charged.
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/template-overlay/render
curl '{{API_BASE_URL}}/v1/galaxy/hyperlocal/template-overlay/render' \
  --request POST \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "templateId": "b7d2e9f1-4a3c-4e8b-9f6d-2c1a0e9b8d7f",
  "language": "hi-IN",
  "contactId": "a2c4e6f8-0b1d-4e3f-9a5c-7d8e9f0a1b2c",
  "elements": [
    {
      "id": "dealer-name",
      "kind": "text",
      "name": "Dealer name",
      "x": 6,
      "y": 82,
      "w": 60,
      "h": 8,
      "rotation": 0,
      "opacity": 1,
      "zIndex": 2,
      "locked": false,
      "visible": true,
      "binding": {
        "field": "firmName",
        "mode": "localized"
      },
      "value": null,
      "text": {
        "fontFamily": "Noto Sans",
        "fontWeight": 700,
        "fontSize": 48,
        "color": "#FFFFFF",
        "align": "left",
        "lineHeight": 1.2,
        "letterSpacing": 0,
        "padding": 8,
        "borderRadius": 4,
        "background": {
          "color": "#000000",
          "opacity": 0.4
        },
        "border": null,
        "maxLines": 1
      }
    }
  ],
  "canvas": {
    "opacity": 1,
    "showSafeZone": false
  },
  "resolved": {
    "dealer-name": "Shree Ganesh Tractors"
  },
  "width": 1080,
  "height": 1080,
  "durationInFrames": 720,
  "fps": 30
}'
No body

Read video metadata

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

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