Berichten, conversaties, bijlagen en uitgaande media beheren via één beveiligde REST API.
https://api.idburo.nl
18 WhatsApp-operaties · 2 platformoperaties · JSON en binaire downloads
Templateverzending is beschikbaar achter een allowlist; een succesvolle productieaflevering met een eigen template is nog niet gevalideerd. Vraag IDBURO welke templates beschikbaar zijn.
Authenticatie en autorisatie
Gebruik HTTPS met Authorization: Bearer API_KEY. Een sleutel hoort bij een project en toegewezen accounts, met afzonderlijke permissies en eventueel IP-whitelisting. Gebruik de sleutel uitsluitend server-side. Geen tokens in URL’s, browsercode of logs.
Stel lokaal de omgevingsvariabele IDBURO_API_KEY veilig in. Gebruik de voorbeeld-ID’s en telefoonnummers niet voor productie; vervang ze door je eigen toegewezen gegevens.
Normale responses zijn JSON met success, request_id en data of error. Een succesvolle download is binair. X-Request-ID helpt bij ondersteuning; reverse proxies kunnen afwijkende foutresponses geven.
Afzonderlijke limieten per API-key per UTC-minuut en UTC-uur; standaard 120 en 3600, configureerbaar. HTTP 429: respecteer Retry-After. Headers bij toegestane requests: X-RateLimit-Minute-Limit, X-RateLimit-Minute-Remaining, X-RateLimit-Hour-Limit, X-RateLimit-Hour-Remaining.
ID’s, data en paginering
Gebruik decimale strings voor grote ID’s. Alle gepagineerde resource-ID’s worden als strings teruggegeven; sommige andere endpoints kunnen integers teruggeven. Timestamps zijn UTC zonder offset in responses. Historische records kunnen oudere tijdzoneconventies volgen.
Datumfilters accepteren YYYY-MM-DD (00:00:00 UTC), YYYY-MM-DD HH:mm:ss, YYYY-MM-DDTHH:mm:ssZ en ISO met numerieke offset. Offset + in een URL moet als %2B worden gecodeerd. Beide grenzen zijn inclusief. Voor een hele dag eindigt to op 23:59:59 UTC. Gebruik after_id met offset 0; volg has_more en next_after_id. De uploadlijst heeft een aparte, platte paginering.
Verzending en retries
Een 202 betekent alleen dat een opdracht is ingepland. Poll queue en daarna messages/statuses voor afleverstatus. Een processed queue betekent dat Meta de opdracht accepteerde, niet dat de ontvanger het bericht heeft ontvangen. Bij unknown: niet blind opnieuw versturen, vraag om reconciliatie.
Bewaar de volledige oorspronkelijke payload en idempotency key bij netwerkfouten. Queue-keys zijn uniek per account; hergebruik door een ander project wordt geweigerd. Upload-keys zijn uniek per account en project. Een nieuwe intentie vereist een nieuwe sleutel. Gebruik bij 429/503 begrensde backoff en dezelfde payload; controleer altijd de uitkomst.
Alle nieuwe verzendingen vereisen een actief, niet-geblokkeerd contact en een open 24-uurs service window. Media vereisen bovendien een vervaltijd binnen dat venster. Een PATCH is geen optimistic-locking operatie; voorkom concurrerende wijzigingen vanuit je applicatie.
Server-side voorbeelden voor het ophalen van berichten. Voor schrijven: gebruik de JSON-body uit de endpointreferentie; voor uploads gebruik multipart en laat de client de boundary genereren.
// Node.js 18+ op de server, niet in de browser
const key = process.env.IDBURO_API_KEY;
if (!key) throw new Error('API-key ontbreekt');
const r = await fetch('https://api.idburo.nl/v1/whatsapp/messages?account_id=1&limit=20', {
headers: { Authorization: `Bearer ${key}` },
signal: AbortSignal.timeout(60000)
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
const { data } = await r.json();
PHP — tekstbericht inplannen
PHP / cURL
<?php
$key = getenv('IDBURO_API_KEY');
if (!$key) throw new RuntimeException('API-key ontbreekt');
// Bewaar deze exacte payload en sleutel bij elke retry.
$payload = [
'account_id' => '1',
'recipient' => '31612345678', // Vervang door je eigen ontvanger.
'body' => 'Hallo, dit is een voorbeeldbericht.',
'idempotency_key' => 'example-order-001',
'expires_at' => gmdate('Y-m-d\TH:i:s\Z', time() + 300)
];
$ch = curl_init('https://api.idburo.nl/v1/whatsapp/messages/text');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 60,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$key,
'Content-Type: application/json', 'Accept: application/json'
],
CURLOPT_POSTFIELDS => json_encode($payload, JSON_THROW_ON_ERROR)
]);
$raw = curl_exec($ch);
if ($raw === false) throw new RuntimeException(curl_error($ch));
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR | JSON_BIGINT_AS_STRING);
if (!in_array($status, [200, 202], true) || !($result['success'] ?? false)) {
throw new RuntimeException($result['error']['code'] ?? 'HTTP '.$status);
}
$queueId = $result['data']['whatsapp_queue_id'];
PHP — document uploaden
PHP / cURL
<?php
$key = getenv('IDBURO_API_KEY');
if (!$key) throw new RuntimeException('API-key ontbreekt');
$path = '/path/to/voorbeeld.pdf';
$ch = curl_init('https://api.idburo.nl/v1/whatsapp/media/upload');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => ['Authorization: Bearer '.$key, 'Accept: application/json'],
// cURL maakt de multipart boundary zelf; zet Content-Type niet handmatig.
CURLOPT_POSTFIELDS => [
'account_id' => '1',
'media_type' => 'document',
'idempotency_key' => 'example-upload-001',
'file' => new CURLFile($path, 'application/pdf', 'voorbeeld.pdf')
]
]);
$raw = curl_exec($ch);
if ($raw === false) throw new RuntimeException(curl_error($ch));
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR | JSON_BIGINT_AS_STRING);
if (!in_array($status, [200, 201], true) || !($result['success'] ?? false)) {
throw new RuntimeException($result['error']['code'] ?? 'HTTP '.$status);
}
$upload = $result['data'];
if ($upload['scan_status'] !== 'clean' || $upload['deleted_at'] !== null ||
$upload['purged_at'] !== null || strtotime($upload['expires_at'].' UTC') <= time()) {
throw new RuntimeException('Upload niet beschikbaar');
}
if (!hash_equals($upload['sha256'], hash_file('sha256', $path))) {
throw new RuntimeException('Hash mismatch');
}
$mediaUploadId = $upload['whatsapp_media_upload_id'];
PHP — bijlage veilig downloaden
PHP / cURL
<?php
$key = getenv('IDBURO_API_KEY');
if (!$key) throw new RuntimeException('API-key ontbreekt');
// Gebruik een eigen private directory, nooit een publiek webpad.
$target = '/private/downloads/bijlage.bin';
$temp = tempnam(dirname($target), '.download-');
if ($temp === false) throw new RuntimeException('Tijdelijk bestand mislukt');
try {
chmod($temp, 0600);
$fp = fopen($temp, 'wb');
if (!$fp) throw new RuntimeException('Openen mislukt');
try {
$ch = curl_init('https://api.idburo.nl/v1/whatsapp/attachments/123/download?account_id=1');
curl_setopt_array($ch, [
CURLOPT_FILE => $fp,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => ['Authorization: Bearer '.$key]
]);
$ok = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
if (!$ok || $status !== 200 || $type !== 'application/octet-stream') {
throw new RuntimeException('Download mislukt: HTTP '.$status);
}
if (!fflush($fp)) throw new RuntimeException('Schrijven mislukt');
} finally {
fclose($fp);
}
if (!rename($temp, $target)) throw new RuntimeException('Opslaan mislukt');
} finally {
if (is_file($temp)) unlink($temp);
}
Start
Platformstatus
GET/
Permissie: Publiek
Publieke status van IDBURO Services. Geen API-key nodig.
Voorbeeldrequest
cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/' \
-H 'Accept: application/json'
Succesresponse
HTTP
Betekenis
200
Succes
Responsevelden (data)
Veld
Type
Toelichting
platform
string
—
api_version
string
—
status
string
—
Start
API-key controleren
GET/v1/auth/check
Permissie: Bearer
Controleer de identiteit van de gekoppelde API-key en het project. Geen aparte resourcepermissie.
Records oplopend op whatsapp_contact_id. Datumfilters from en to zijn inclusief op created_at. Alle filters worden gecombineerd (AND). Onbekende parameters worden geweigerd. count is de grootte van de pagina, niet het totaal.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limit
query / integer
Nee
min: 1; max: 250; standaard: 100
offset
query / integer
Nee
min: 0; max: 10000; standaard: 0
after_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
from
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
to
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
wa_id
string | null
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
phone_number
string | null
—
profile_name
string | null
—
first_name
string | null
—
last_name
string | null
—
emailaddress
string | null
—
blocked
integer
—
active
integer
—
first_message_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
last_message_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
last_inbound_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
last_outbound_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
created_at
string
UTC, YYYY-MM-DD HH:mm:ss
updated_at
string
UTC, YYYY-MM-DD HH:mm:ss
pagination — velden
Veld
Type
Toelichting
limit
integer
—
offset
integer
—
has_more
boolean
—
next_offset
integer | null
—
next_after_id
string | null
—
Lezen
Conversaties ophalen
GET/v1/whatsapp/conversations
Permissie: whatsapp.conversations.read
Records oplopend op whatsapp_conversation_id. Datumfilters from en to zijn inclusief op created_at. Alle filters worden gecombineerd (AND). Onbekende parameters worden geweigerd. count is de grootte van de pagina, niet het totaal.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limit
query / integer
Nee
min: 1; max: 250; standaard: 100
offset
query / integer
Nee
min: 0; max: 10000; standaard: 0
after_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
from
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
to
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
contact_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_contact_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
status
string
open / pending / closed / archived
priority
string
low / normal / high / urgent
subject
string | null
—
last_message_id
string | null
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
last_message_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
last_inbound_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
last_outbound_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
service_window_until
string | null
UTC, YYYY-MM-DD HH:mm:ss
created_at
string
UTC, YYYY-MM-DD HH:mm:ss
updated_at
string
UTC, YYYY-MM-DD HH:mm:ss
closed_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
pagination — velden
Veld
Type
Toelichting
limit
integer
—
offset
integer
—
has_more
boolean
—
next_offset
integer | null
—
next_after_id
string | null
—
Lezen
Berichten ophalen
GET/v1/whatsapp/messages
Permissie: whatsapp.messages.read
Records oplopend op whatsapp_message_id. Datumfilters from en to zijn inclusief op message_at. Alle filters worden gecombineerd (AND). Onbekende parameters worden geweigerd. count is de grootte van de pagina, niet het totaal.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limit
query / integer
Nee
min: 1; max: 250; standaard: 100
offset
query / integer
Nee
min: 0; max: 10000; standaard: 0
after_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
from
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
to
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
contact_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
conversation_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
direction
query / string
Nee
inbound / outbound
status
query / string
Nee
received / queued / sending / accepted / sent / delivered / read / failed / unknown
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_contact_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_conversation_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
wamid
string | null
—
direction
string
inbound / outbound
message_type
string
—
body
string | null
—
template_name
string | null
—
template_language
string | null
—
reply_to_wamid
string | null
—
status
string
received / queued / sending / accepted / sent / delivered / read / failed / unknown
error_code
string | null
—
message_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
sent_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
delivered_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
read_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
failed_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
created_at
string
UTC, YYYY-MM-DD HH:mm:ss
updated_at
string
UTC, YYYY-MM-DD HH:mm:ss
pagination — velden
Veld
Type
Toelichting
limit
integer
—
offset
integer
—
has_more
boolean
—
next_offset
integer | null
—
next_after_id
string | null
—
Lezen
Statusgeschiedenis ophalen
GET/v1/whatsapp/statuses
Permissie: whatsapp.status.read
Records oplopend op whatsapp_message_status_id. Datumfilters from en to zijn inclusief op status_at. Alle filters worden gecombineerd (AND). Onbekende parameters worden geweigerd. count is de grootte van de pagina, niet het totaal.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limit
query / integer
Nee
min: 1; max: 250; standaard: 100
offset
query / integer
Nee
min: 0; max: 10000; standaard: 0
after_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
from
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
to
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
message_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_message_id
string | null
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
wamid
string
—
status
string
—
error_code
string | null
—
status_at
string
UTC, YYYY-MM-DD HH:mm:ss
created_at
string
UTC, YYYY-MM-DD HH:mm:ss
pagination — velden
Veld
Type
Toelichting
limit
integer
—
offset
integer
—
has_more
boolean
—
next_offset
integer | null
—
next_after_id
string | null
—
Lezen
Bijlagen ophalen
GET/v1/whatsapp/attachments
Permissie: whatsapp.attachments.read
Records oplopend op whatsapp_attachment_id. Datumfilters from en to zijn inclusief op created_at. Alle filters worden gecombineerd (AND). Onbekende parameters worden geweigerd. count is de grootte van de pagina, niet het totaal.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limit
query / integer
Nee
min: 1; max: 250; standaard: 100
offset
query / integer
Nee
min: 0; max: 10000; standaard: 0
after_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
from
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
to
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
message_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_message_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_type
string
—
mime_type
string | null
—
filename
string | null
—
filesize
integer | null
—
caption
string | null
—
download_status
string
pending / downloading / downloaded / failed
scan_status
string
pending / scanning / clean / infected / error
scanned_at
string | null
UTC, YYYY-MM-DD HH:mm:ss
created_at
string
UTC, YYYY-MM-DD HH:mm:ss
pagination — velden
Veld
Type
Toelichting
limit
integer
—
offset
integer
—
has_more
boolean
—
next_offset
integer | null
—
next_after_id
string | null
—
Lezen
Verzendwachtrij ophalen
GET/v1/whatsapp/queue
Permissie: whatsapp.queue.read
Records oplopend op whatsapp_queue_id. Datumfilters from en to zijn inclusief op created_at. Alle filters worden gecombineerd (AND). Onbekende parameters worden geweigerd. count is de grootte van de pagina, niet het totaal.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limit
query / integer
Nee
min: 1; max: 250; standaard: 100
offset
query / integer
Nee
min: 0; max: 10000; standaard: 0
after_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
from
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
to
query / string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
message_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Plant een tekstbericht in. scheduled_at en expires_at zijn optioneel; gebruik bij voorkeur een korte vervaltijd. Het geplande moment moet binnen het open service window liggen; de worker controleert opnieuw vóór verzending.
Request body — application/json
Veld
Type
Verplicht
Regels
account_id
string | integer
Ja
Gebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
recipient
string
Ja
max. tekens: 15; Internationaal telefoonnummer zonder +, spaties of voorloopnul; 7–15 cijfers.
idempotency_key
string
Ja
max. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
priority
integer
Nee
min: 1; max: 10; standaard: 5; 1 is hoogste prioriteit.
scheduled_at
string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
expires_at
string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
body
string
Ja
max. tekens: 4096; Niet-lege UTF-8-tekst.
Voorbeeldrequest
cURL / Bash
curl --silent --show-error -X POST 'https://api.idburo.nl/v1/whatsapp/messages/text' \
-H @- \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-binary '{
"account_id": "1",
"recipient": "31612345678",
"idempotency_key": "example-order-001",
"body": "Hallo, dit is een voorbeeldbericht."
}' \
<<< "Authorization: Bearer $IDBURO_API_KEY"
Succesresponse
HTTP
Betekenis
202
Nieuwe opdracht geaccepteerd (niet hetzelfde als aflevering)
200
Identieke bestaande opdracht
Responsevelden (data)
Veld
Type
Toelichting
whatsapp_queue_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Alleen door Meta goedgekeurde en door IDBURO geconfigureerde naam/taalcombinaties, met het exacte aantal positionele tekstparameters in de body. Statische header/footer zijn mogelijk; dynamische header, buttons en named parameters worden niet ondersteund. Ook templates zijn gebonden aan de 24-uursregel. Voorbeeld is illustratief en vereist activatie; succesvolle productieaflevering is nog niet gevalideerd.
Request body — application/json
Veld
Type
Verplicht
Regels
account_id
string | integer
Ja
Gebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
recipient
string
Ja
max. tekens: 15; Internationaal telefoonnummer zonder +, spaties of voorloopnul; 7–15 cijfers.
idempotency_key
string
Ja
max. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
priority
integer
Nee
min: 1; max: 10; standaard: 5; 1 is hoogste prioriteit.
scheduled_at
string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
expires_at
string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
Alleen pending of retry kan worden geannuleerd. Herhaald annuleren retourneert opnieuw 200. Processing of definitieve statussen geven 409. Een geannuleerd bericht wordt niet verzonden.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
id
path / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Request body — application/json
Veld
Type
Verplicht
Regels
account_id
string | integer
Ja
Gebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
Minimaal één wijzigbaar veld naast account_id. Ongewijzigde waarden leveren een lege changed_fields-lijst op. Andere velden zijn niet wijzigbaar. blocked accepteert boolean of integer 0/1.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
id
path / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Request body — application/json
Veld
Type
Verplicht
Regels
account_id
string | integer
Ja
Gebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
first_name
string | null
Nee
max. tekens: 100; Niet-lege tekst of null om te wissen.
last_name
string | null
Nee
max. tekens: 150; Niet-lege tekst of null om te wissen.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
changed_fields
array
—
Specifieke foutcodes
RECORD_NOT_FOUND
Schrijven
Conversaties wijzigen
PATCH/v1/whatsapp/conversations/{id}
Permissie: whatsapp.conversations.write
Minimaal één wijzigbaar veld naast account_id. Ongewijzigde waarden leveren een lege changed_fields-lijst op. Andere velden zijn niet wijzigbaar. closed_at wordt automatisch bijgewerkt; service_window_until is niet wijzigbaar.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
id
path / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Request body — application/json
Veld
Type
Verplicht
Regels
account_id
string | integer
Ja
Gebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
status
string
Nee
open / pending / closed / archived
priority
string
Nee
low / normal / high / urgent
subject
string | null
Nee
max. tekens: 255; Niet-lege tekst of null om te wissen.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
changed_fields
array
—
Specifieke foutcodes
RECORD_NOT_FOUND
Media
Inkomende bijlage downloaden
GET/v1/whatsapp/attachments/{id}/download
Permissie: whatsapp.attachments.download
Retourneert binaire bytes (geen JSON bij succes), maximaal 100 MiB. Alleen downloaded + clean met overeenkomende SHA-256-scans; integriteit opnieuw gecontroleerd. Content-Type application/octet-stream, Content-Disposition attachment, Content-Length, Cache-Control no-store en Accept-Ranges none. Downloadrechten staan los van metadata-leesrechten.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
id
path / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Controleer eerst HTTP 200 voordat je het opgeslagen bestand gebruikt. Bij een fout bevat de response doorgaans JSON in plaats van bestandsbytes. Er is geen Range-ondersteuning.
Exact één bestand in multipart/form-data met Content-Length. Geen queryparameters. Nieuwe uploads worden synchroon op MIME-type, SHA-256 en antivirus gecontroleerd. Identieke replay vereist dezelfde bestandsnaam, mediatype en bytes; ook verwijderde of verlopen uploads kunnen als bestaande metadata terugkomen, dus controleer de status. Gebruik bij een nieuwe upload een nieuwe sleutel.
Request body — multipart/form-data
Veld
Type
Verplicht
Regels
account_id
string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_type
string
Ja
image / document / audio / video
idempotency_key
string
Ja
max. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
Uploads van het eigen project en account, inclusief logisch verwijderde of opgeschoonde records. Cursorpaginering: limit 1–250, standaard 100; after_id optioneel. Geen offset of datumfilters. has_more en next_after_id staan direct in data.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limit
query / integer
Nee
min: 1; max: 250; standaard: 100
after_id
query / string
Nee
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_type
string
image / document / audio / video
filename
string
—
mime_type
string
—
filesize
integer
—
sha256
string
Patroon: ^[a-f0-9]{64}$
scan_status
string
—
scanned_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
created_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
expires_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
deleted_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
purged_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
Specifieke foutcodes
RECORD_NOT_FOUND
Media
Upload verwijderen
DELETE/v1/whatsapp/media/{id}
Permissie: whatsapp.media.delete
Logische verwijdering; fysieke verwijdering volgt via cleanup. Geen request body. Upload met queue-status pending, retry of processing kan niet worden verwijderd. Herhaling is toegestaan.
Pad- en queryparameters
Parameter
Locatie / type
Verplicht
Regels
id
path / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_id
query / string
Ja
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_id
string
Positieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_type
string
image / document / audio / video
filename
string
—
mime_type
string
—
filesize
integer
—
sha256
string
Patroon: ^[a-f0-9]{64}$
scan_status
string
—
scanned_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
created_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
expires_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
deleted_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
purged_at
string | null
UTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
Specifieke foutcodes
RECORD_NOT_FOUND, MEDIA_IN_USE
Media
Mediabericht inplannen
POST/v1/whatsapp/messages/media
Permissie: whatsapp.messages.media.send
Gebruik een schoon, niet-verwijderd intern upload-ID van het eigen project/account. expires_at is verplicht en mag niet na het service window liggen. Caption maximaal 1024 tekens; audio accepteert geen caption. Geen externe URL of Meta-media-ID als input. De worker scant het bestand opnieuw vóór verzending.
Request body — application/json
Veld
Type
Verplicht
Regels
account_id
string | integer
Ja
Gebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
recipient
string
Ja
max. tekens: 15; Internationaal telefoonnummer zonder +, spaties of voorloopnul; 7–15 cijfers.
idempotency_key
string
Ja
max. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
priority
integer
Nee
min: 1; max: 10; standaard: 5; 1 is hoogste prioriteit.
scheduled_at
string
Nee
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
expires_at
string
Ja
UTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
media_upload_id
string | integer
Ja
Gebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.