sikio Developers
Documentation menu

Sikio API · v1

Media assets: defaults and overrides

This guide applies only to media templates. A text template does not need a media ID or an upload.

Use the template’s default asset

Omit header:media_id to use the attachment saved when the template was created in Sikio. For an older or externally created template, Sikio may prepare the original asset when a supported provider download is available. If no usable default exists, supply an explicit sendable media ID.

Override one message

Supply header:media_id in template_variables. This affects that message only; it does not change the template’s saved default. An explicitly blank ID is invalid. The actual resolved asset is retained with the sent conversation message.

Optional media override
{
  "template_variables": {
    "body:1": "Amina",
    "header:media_id": "SENDABLE_WHATSAPP_MEDIA_ID"
  }
}

Upload a new asset when needed

Use whatsapp:send on the same channel. Submit exactly one multipart field named file. Let your HTTP client set the multipart boundary.

Replace CHANNEL_ID with your channel’s id. Use a local PNG file at ./header-image.png, or change the file and MIME type together.

Upload an optional media asset · cURL
curl --fail-with-body \
  --user 'YOUR_API_KEY:YOUR_API_SECRET' \
  --write-out '\nHTTP %{http_code}\n' \
  --request POST \
  --form 'file=@./header-image.png;type=image/png' \
  'https://stage.api.ictlife.com/v1/integrations/whatsapp/channels/CHANNEL_ID/media'

HTTP 201 · upload response
{
  "media_id": "WHATSAPP_MEDIA_ID",
  "channel_id": 42,
  "mime_type": "image/png",
  "size_bytes": 24576
}

Use the returned media_id in a subsequent template send on that channel. Uploading alone sends no message and does not create or modify a template.

AssetAllowed fileMaximum size
ImageJPEG / PNG5 MiB
VideoMP416 MiB
DocumentPDF100 MiB

The file type must match the approved header. Sikio checks bytes and size; WhatsApp performs further compatibility validation. URLs, multiple files and extra multipart fields are rejected. A template approval upload handle is not a sendable media ID.

Uploads and retries

Bound upload concurrency. The current per-instance limits are two concurrent uploads per credential and eight in total. HTTP 429 includes Retry-After: 2. Uploads are not idempotent, so a retry may create another media object. Reuse a successful ID for message retries instead of uploading again.

Media IDs can expire or be removed by WhatsApp; re-upload when needed. Sikio does not automatically refresh unavailable saved assets. A message replay with the original key and payload uses the recorded send request rather than resolving the default again.

For carousel assets use the appropriate card_1:header:media_id key. Return to template parameters.

Next guideContacts API →