IDBURO.Developer documentation / v1OpenAPI JSON
WhatsApp / API reference

WhatsApp API v1

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.

Bash
read -rsp "API-key: " IDBURO_API_KEY; echo
export IDBURO_API_KEY
curl -sS -H @- \
  https://api.idburo.nl/v1/auth/check \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Responseformaat

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.

JSON
{
  "success": false,
  "request_id": "0123456789abcdef0123456789abcdef",
  "error": {
    "code": "PERMISSION_DENIED",
    "message": "Permission denied"
  }
}

Rate limiting

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.

Bestandslimieten

TypeMaximumToegestane MIME-types
image5 MiBimage/jpeg, image/png
document100 MiBapplication/pdf, text/plain, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.presentationml.presentation
audio16 MiBaudio/aac, audio/mp4, audio/mpeg, audio/amr, audio/ogg
video16 MiBvideo/mp4, video/3gpp

Uploadrequest maximaal 110 MiB inclusief multipart; JSON-schrijfbody maximaal 64 KiB, algemene requestlimiet 1 MiB. De daadwerkelijke MIME-inhoud is bepalend. Standaardquota: 5 GiB per account; ongebruikte uploads 7 dagen, gebruikte 30 dagen. Accountinstellingen kunnen afwijken. Logisch verwijderde bestanden tellen mee totdat ze fysiek zijn opgeruimd. Uitgaande uploads zijn geen publieke downloads.

Foutcodes

Controleer HTTP-status én error.code. Niet iedere code geldt voor elk endpoint. Gebruik request_id voor support.

HTTPMogelijke codes
400INVALID_PARAMETER, INVALID_JSON, INVALID_UPLOAD
401INVALID_API_KEY, AUTHENTICATION_REQUIRED
403PERMISSION_DENIED, ACCOUNT_DENIED, IP_NOT_ALLOWED, SEND_DISABLED, TEMPLATE_DENIED
404ENDPOINT_NOT_FOUND, RECORD_NOT_FOUND
405METHOD_NOT_ALLOWED
409IDEMPOTENCY_CONFLICT, RECIPIENT_UNAVAILABLE, SERVICE_WINDOW_CLOSED, QUEUE_NOT_CANCELLABLE, ATTACHMENT_NOT_AVAILABLE, MEDIA_NOT_AVAILABLE, MEDIA_IN_USE, QUOTA_EXCEEDED
411LENGTH_REQUIRED
413REQUEST_TOO_LARGE
415UNSUPPORTED_MEDIA_TYPE
422MEDIA_SCAN_REJECTED
429RATE_LIMIT_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE, SERVICE_BUSY, ATTACHMENT_UNAVAILABLE, MEDIA_SCAN_UNAVAILABLE

Integratievoorbeelden

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.

PHP / cURL
<?php
$key = getenv('IDBURO_API_KEY');
if (!$key) throw new RuntimeException('API-key ontbreekt');
$ch = curl_init('https://api.idburo.nl/v1/whatsapp/messages?account_id=1&limit=20');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 10,
    CURLOPT_TIMEOUT => 60,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer '.$key, 'Accept: application/json']
]);
$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 ($status >= 400 || !($result['success'] ?? false)) {
    throw new RuntimeException($result['error']['code'] ?? 'HTTP '.$status);
}
$items = $result['data']['items'];
Python / requests
import os, requests
r = requests.get('https://api.idburo.nl/v1/whatsapp/messages',
    params={'account_id': '1', 'limit': 20},
    headers={'Authorization': 'Bearer ' + os.environ['IDBURO_API_KEY']},
    timeout=(10, 60))
r.raise_for_status()
items = r.json()['data']['items']
JavaScript / Node.js
// 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

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
platformstring—
api_versionstring—
statusstring—
Start

API-key controleren

GET/v1/auth/check
Permissie: Bearer

Controleer de identiteit van de gekoppelde API-key en het project. Geen aparte resourcepermissie.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/auth/check' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
authenticatedboolean—
project_idinteger | string—
project_keystring—
project_namestring—
api_key_idinteger | string—
api_key_namestring—
Lezen

Accounts ophalen

GET/v1/whatsapp/accounts
Permissie: whatsapp.accounts.read

Geeft uitsluitend actieve, aan de API-key toegewezen WhatsApp-accounts terug. Geen account_id vereist.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/accounts' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
accountsarray—
countinteger—

accounts — velden

VeldTypeToelichting
whatsapp_account_idinteger—
namestring—
phone_numberstring—
activeinteger—
send_enabledinteger—
receive_enabledinteger—
Lezen

Contactpersonen ophalen

GET/v1/whatsapp/contacts
Permissie: whatsapp.contacts.read

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

ParameterLocatie / typeVerplichtRegels
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limitquery / integerNeemin: 1; max: 250; standaard: 100
offsetquery / integerNeemin: 0; max: 10000; standaard: 0
after_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
fromquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
toquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
blockedquery / stringNee0 / 1
activequery / stringNee0 / 1

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/contacts?account_id=1&limit=20' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
itemsarray—
countinteger—
paginationobject—

items — velden

VeldTypeToelichting
whatsapp_contact_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
wa_idstring | nullPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
phone_numberstring | null—
profile_namestring | null—
first_namestring | null—
last_namestring | null—
emailaddressstring | null—
blockedinteger—
activeinteger—
first_message_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
last_message_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
last_inbound_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
last_outbound_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
created_atstringUTC, YYYY-MM-DD HH:mm:ss
updated_atstringUTC, YYYY-MM-DD HH:mm:ss

pagination — velden

VeldTypeToelichting
limitinteger—
offsetinteger—
has_moreboolean—
next_offsetinteger | null—
next_after_idstring | 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

ParameterLocatie / typeVerplichtRegels
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limitquery / integerNeemin: 1; max: 250; standaard: 100
offsetquery / integerNeemin: 0; max: 10000; standaard: 0
after_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
fromquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
toquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
contact_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusquery / stringNeeopen / pending / closed / archived
priorityquery / stringNeelow / normal / high / urgent

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/conversations?account_id=1&limit=20' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
itemsarray—
countinteger—
paginationobject—

items — velden

VeldTypeToelichting
whatsapp_conversation_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_contact_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusstringopen / pending / closed / archived
prioritystringlow / normal / high / urgent
subjectstring | null—
last_message_idstring | nullPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
last_message_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
last_inbound_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
last_outbound_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
service_window_untilstring | nullUTC, YYYY-MM-DD HH:mm:ss
created_atstringUTC, YYYY-MM-DD HH:mm:ss
updated_atstringUTC, YYYY-MM-DD HH:mm:ss
closed_atstring | nullUTC, YYYY-MM-DD HH:mm:ss

pagination — velden

VeldTypeToelichting
limitinteger—
offsetinteger—
has_moreboolean—
next_offsetinteger | null—
next_after_idstring | 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

ParameterLocatie / typeVerplichtRegels
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limitquery / integerNeemin: 1; max: 250; standaard: 100
offsetquery / integerNeemin: 0; max: 10000; standaard: 0
after_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
fromquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
toquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
contact_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
conversation_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
directionquery / stringNeeinbound / outbound
statusquery / stringNeereceived / queued / sending / accepted / sent / delivered / read / failed / unknown
message_typequery / stringNeemax. tekens: 50; Patroon: ^[a-zA-Z0-9_-]+$

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/messages?account_id=1&limit=20&direction=inbound' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
itemsarray—
countinteger—
paginationobject—

items — velden

VeldTypeToelichting
whatsapp_message_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_contact_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_conversation_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
wamidstring | null—
directionstringinbound / outbound
message_typestring—
bodystring | null—
template_namestring | null—
template_languagestring | null—
reply_to_wamidstring | null—
statusstringreceived / queued / sending / accepted / sent / delivered / read / failed / unknown
error_codestring | null—
message_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
sent_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
delivered_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
read_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
failed_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
created_atstringUTC, YYYY-MM-DD HH:mm:ss
updated_atstringUTC, YYYY-MM-DD HH:mm:ss

pagination — velden

VeldTypeToelichting
limitinteger—
offsetinteger—
has_moreboolean—
next_offsetinteger | null—
next_after_idstring | 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

ParameterLocatie / typeVerplichtRegels
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limitquery / integerNeemin: 1; max: 250; standaard: 100
offsetquery / integerNeemin: 0; max: 10000; standaard: 0
after_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
fromquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
toquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
message_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusquery / stringNeemax. tekens: 50; Patroon: ^[a-zA-Z0-9_-]+$

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/statuses?account_id=1&limit=20&message_id=123' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
itemsarray—
countinteger—
paginationobject—

items — velden

VeldTypeToelichting
whatsapp_message_status_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_message_idstring | nullPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
wamidstring—
statusstring—
error_codestring | null—
status_atstringUTC, YYYY-MM-DD HH:mm:ss
created_atstringUTC, YYYY-MM-DD HH:mm:ss

pagination — velden

VeldTypeToelichting
limitinteger—
offsetinteger—
has_moreboolean—
next_offsetinteger | null—
next_after_idstring | 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

ParameterLocatie / typeVerplichtRegels
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limitquery / integerNeemin: 1; max: 250; standaard: 100
offsetquery / integerNeemin: 0; max: 10000; standaard: 0
after_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
fromquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
toquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
message_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
download_statusquery / stringNeepending / downloading / downloaded / failed
scan_statusquery / stringNeepending / scanning / clean / infected / error
media_typequery / stringNeemax. tekens: 50; Patroon: ^[a-zA-Z0-9_-]+$

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/attachments?account_id=1&limit=20&scan_status=clean' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
itemsarray—
countinteger—
paginationobject—

items — velden

VeldTypeToelichting
whatsapp_attachment_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_message_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_typestring—
mime_typestring | null—
filenamestring | null—
filesizeinteger | null—
captionstring | null—
download_statusstringpending / downloading / downloaded / failed
scan_statusstringpending / scanning / clean / infected / error
scanned_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
created_atstringUTC, YYYY-MM-DD HH:mm:ss

pagination — velden

VeldTypeToelichting
limitinteger—
offsetinteger—
has_moreboolean—
next_offsetinteger | null—
next_after_idstring | 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

ParameterLocatie / typeVerplichtRegels
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limitquery / integerNeemin: 1; max: 250; standaard: 100
offsetquery / integerNeemin: 0; max: 10000; standaard: 0
after_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
fromquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
toquery / stringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
message_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusquery / stringNeepending / processing / processed / retry / failed / unknown / expired / cancelled
message_typequery / stringNeemax. tekens: 50; Patroon: ^[a-zA-Z0-9_-]+$

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/queue?account_id=1&limit=20' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
itemsarray—
countinteger—
paginationobject—

items — velden

VeldTypeToelichting
whatsapp_queue_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_message_idstring | nullPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
recipientstring—
message_typestring—
bodystring | null—
statusstringpending / processing / processed / retry / failed / unknown / expired / cancelled
attemptsinteger—
max_attemptsinteger—
scheduled_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
expires_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
next_attempt_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
processed_atstring | nullUTC, YYYY-MM-DD HH:mm:ss
http_codeinteger | null—
error_codestring | null—
created_atstringUTC, YYYY-MM-DD HH:mm:ss
updated_atstringUTC, YYYY-MM-DD HH:mm:ss

pagination — velden

VeldTypeToelichting
limitinteger—
offsetinteger—
has_moreboolean—
next_offsetinteger | null—
next_after_idstring | null—
Schrijven

Tekstbericht inplannen

POST/v1/whatsapp/messages/text
Permissie: whatsapp.messages.send

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

VeldTypeVerplichtRegels
account_idstring | integerJaGebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
recipientstringJamax. tekens: 15; Internationaal telefoonnummer zonder +, spaties of voorloopnul; 7–15 cijfers.
idempotency_keystringJamax. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
priorityintegerNeemin: 1; max: 10; standaard: 5; 1 is hoogste prioriteit.
scheduled_atstringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
expires_atstringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
bodystringJamax. 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

HTTPBetekenis
202Nieuwe opdracht geaccepteerd (niet hetzelfde als aflevering)
200Identieke bestaande opdracht
Responsevelden (data)
VeldTypeToelichting
whatsapp_queue_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusstring—
replayedboolean—
JSON · illustratief
{
  "success": true,
  "request_id": "0123456789abcdef0123456789abcdef",
  "data": {
    "whatsapp_queue_id": "123",
    "account_id": "1",
    "status": "pending",
    "replayed": false
  }
}

Specifieke foutcodes

SEND_DISABLED, RECIPIENT_UNAVAILABLE, SERVICE_WINDOW_CLOSED, IDEMPOTENCY_CONFLICT

Schrijven

Templatebericht inplannen

POST/v1/whatsapp/messages/template
Permissie: whatsapp.templates.send

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

VeldTypeVerplichtRegels
account_idstring | integerJaGebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
recipientstringJamax. tekens: 15; Internationaal telefoonnummer zonder +, spaties of voorloopnul; 7–15 cijfers.
idempotency_keystringJamax. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
priorityintegerNeemin: 1; max: 10; standaard: 5; 1 is hoogste prioriteit.
scheduled_atstringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
expires_atstringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
template_namestringJamax. tekens: 255; Patroon: ^[a-z0-9_]+$
template_languagestringJaPatroon: ^[a-z]{2,3}(_[A-Z]{2})?$
template_parametersarrayNeemax. items: 20; standaard: []

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X POST 'https://api.idburo.nl/v1/whatsapp/messages/template' \
  -H @- \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary '{
  "account_id": "1",
  "recipient": "31612345678",
  "idempotency_key": "example-template-001",
  "template_name": "aanvraag_bevestiging",
  "template_language": "nl",
  "template_parameters": [
    "REF-001"
  ]
}' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
202Nieuwe opdracht geaccepteerd (niet hetzelfde als aflevering)
200Identieke bestaande opdracht
Responsevelden (data)
VeldTypeToelichting
whatsapp_queue_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusstring—
replayedboolean—
JSON · illustratief
{
  "success": true,
  "request_id": "0123456789abcdef0123456789abcdef",
  "data": {
    "whatsapp_queue_id": "123",
    "account_id": "1",
    "status": "pending",
    "replayed": false
  }
}

Specifieke foutcodes

SEND_DISABLED, RECIPIENT_UNAVAILABLE, SERVICE_WINDOW_CLOSED, IDEMPOTENCY_CONFLICT, TEMPLATE_DENIED

Schrijven

Verzendopdracht annuleren

POST/v1/whatsapp/queue/{id}/cancel
Permissie: whatsapp.queue.cancel

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

ParameterLocatie / typeVerplichtRegels
idpath / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.

Request body — application/json

VeldTypeVerplichtRegels
account_idstring | integerJaGebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X POST 'https://api.idburo.nl/v1/whatsapp/queue/123/cancel' \
  -H @- \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary '{
  "account_id": "1"
}' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
whatsapp_queue_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusstringcancelled
JSON · illustratief
{
  "success": true,
  "request_id": "0123456789abcdef0123456789abcdef",
  "data": {
    "whatsapp_queue_id": "123",
    "account_id": "1",
    "status": "cancelled"
  }
}

Specifieke foutcodes

RECORD_NOT_FOUND, QUEUE_NOT_CANCELLABLE

Schrijven

Contactpersonen wijzigen

PATCH/v1/whatsapp/contacts/{id}
Permissie: whatsapp.contacts.write

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

ParameterLocatie / typeVerplichtRegels
idpath / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.

Request body — application/json

VeldTypeVerplichtRegels
account_idstring | integerJaGebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
first_namestring | nullNeemax. tekens: 100; Niet-lege tekst of null om te wissen.
last_namestring | nullNeemax. tekens: 150; Niet-lege tekst of null om te wissen.
emailaddressstring | nullNeemax. tekens: 255
blockedboolean | integerNee—

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X PATCH 'https://api.idburo.nl/v1/whatsapp/contacts/123' \
  -H @- \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary '{
  "account_id": "1",
  "first_name": "Jan",
  "last_name": "Voorbeeld"
}' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
whatsapp_contact_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
changed_fieldsarray—

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

ParameterLocatie / typeVerplichtRegels
idpath / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.

Request body — application/json

VeldTypeVerplichtRegels
account_idstring | integerJaGebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
statusstringNeeopen / pending / closed / archived
prioritystringNeelow / normal / high / urgent
subjectstring | nullNeemax. tekens: 255; Niet-lege tekst of null om te wissen.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X PATCH 'https://api.idburo.nl/v1/whatsapp/conversations/123' \
  -H @- \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary '{
  "account_id": "1",
  "status": "closed",
  "subject": "Afgehandeld"
}' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
whatsapp_conversation_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
changed_fieldsarray—

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

ParameterLocatie / typeVerplichtRegels
idpath / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/attachments/123/download?account_id=1' \
  -H @- \
  -D response-headers.txt \
  -o bijlage.bin \
  -w 'HTTP %{http_code}\n' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes

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.

Specifieke foutcodes

RECORD_NOT_FOUND, ATTACHMENT_NOT_AVAILABLE, ATTACHMENT_UNAVAILABLE

Media

Mediabestand uploaden

POST/v1/whatsapp/media/upload
Permissie: whatsapp.media.upload

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

VeldTypeVerplichtRegels
account_idstringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_typestringJaimage / document / audio / video
idempotency_keystringJamax. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
filebestandJaBestand met veilige UTF-8-naam (1–255 bytes).

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X POST 'https://api.idburo.nl/v1/whatsapp/media/upload' \
  -H @- \
  -H 'Accept: application/json' \
  -F 'account_id=1' \
  -F 'media_type=document' \
  -F 'idempotency_key=example-upload-001' \
  -F 'file=@./voorbeeld.pdf' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
201Nieuwe schone upload
200Identieke bestaande upload
Responsevelden (data)
VeldTypeToelichting
whatsapp_media_upload_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_typestringimage / document / audio / video
filenamestring—
mime_typestring—
filesizeinteger—
sha256stringPatroon: ^[a-f0-9]{64}$
scan_statusstring—
scanned_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
created_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
expires_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
deleted_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
purged_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
replayedboolean—

Specifieke foutcodes

QUOTA_EXCEEDED, IDEMPOTENCY_CONFLICT, MEDIA_SCAN_REJECTED, MEDIA_SCAN_UNAVAILABLE, INVALID_UPLOAD, LENGTH_REQUIRED

Media

Uploads ophalen

GET/v1/whatsapp/media
Permissie: whatsapp.media.read

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

ParameterLocatie / typeVerplichtRegels
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
limitquery / integerNeemin: 1; max: 250; standaard: 100
after_idquery / stringNeePositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/media?account_id=1&limit=20' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
itemsarray—
countinteger—
has_moreboolean—
next_after_idstring | null—

items — velden

VeldTypeToelichting
whatsapp_media_upload_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_typestringimage / document / audio / video
filenamestring—
mime_typestring—
filesizeinteger—
sha256stringPatroon: ^[a-f0-9]{64}$
scan_statusstring—
scanned_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
created_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
expires_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
deleted_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
purged_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
Media

Uploadinformatie ophalen

GET/v1/whatsapp/media/{id}
Permissie: whatsapp.media.read

Retourneert metadata van een eigen upload, inclusief verwijder-/opruimstatus. Geen download van uitgaande uploads via dit endpoint.

Pad- en queryparameters

ParameterLocatie / typeVerplichtRegels
idpath / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X GET 'https://api.idburo.nl/v1/whatsapp/media/123?account_id=1' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
whatsapp_media_upload_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_typestringimage / document / audio / video
filenamestring—
mime_typestring—
filesizeinteger—
sha256stringPatroon: ^[a-f0-9]{64}$
scan_statusstring—
scanned_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
created_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
expires_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
deleted_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
purged_atstring | nullUTC-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

ParameterLocatie / typeVerplichtRegels
idpath / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idquery / stringJaPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.

Voorbeeldrequest

cURL / Bash
curl --silent --show-error -X DELETE 'https://api.idburo.nl/v1/whatsapp/media/123?account_id=1' \
  -H @- \
  -H 'Accept: application/json' \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
200Succes
Responsevelden (data)
VeldTypeToelichting
whatsapp_media_upload_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
whatsapp_account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
media_typestringimage / document / audio / video
filenamestring—
mime_typestring—
filesizeinteger—
sha256stringPatroon: ^[a-f0-9]{64}$
scan_statusstring—
scanned_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
created_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
expires_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
deleted_atstring | nullUTC-datum/tijd als YYYY-MM-DD HH:mm:ss of null.
purged_atstring | nullUTC-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

VeldTypeVerplichtRegels
account_idstring | integerJaGebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
recipientstringJamax. tekens: 15; Internationaal telefoonnummer zonder +, spaties of voorloopnul; 7–15 cijfers.
idempotency_keystringJamax. tekens: 191; Verplicht: 1–191 afdrukbare ASCII-tekens zonder spaties. Bewaar dezelfde sleutel en dezelfde payload bij retries.
priorityintegerNeemin: 1; max: 10; standaard: 5; 1 is hoogste prioriteit.
scheduled_atstringNeeUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
expires_atstringJaUTC: YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, ISO 8601 met Z of numerieke offset; zonder fracties.
media_upload_idstring | integerJaGebruik bij voorkeur een decimale string; numerieke JSON-ID’s worden ook geaccepteerd.
captionstringNeemax. tekens: 1024

Voorbeeldrequest

cURL / Bash
BODY=$(php -r '$d=json_decode($argv[1],true); $d["expires_at"]=gmdate("Y-m-d\TH:i:s\Z",time()+300); echo json_encode($d);' '{"account_id": "1", "recipient": "31612345678", "idempotency_key": "example-media-send-001", "media_upload_id": "123", "caption": "Hierbij het document."}')
curl --silent --show-error -X POST 'https://api.idburo.nl/v1/whatsapp/messages/media' \
  -H @- \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary "$BODY" \
  <<< "Authorization: Bearer $IDBURO_API_KEY"

Succesresponse

HTTPBetekenis
202Nieuwe opdracht geaccepteerd (niet hetzelfde als aflevering)
200Identieke bestaande opdracht
Responsevelden (data)
VeldTypeToelichting
whatsapp_queue_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
account_idstringPositieve decimale ID, maximaal 18446744073709551615. Gebruik strings voor BIGINT.
statusstring—
replayedboolean—
JSON · illustratief
{
  "success": true,
  "request_id": "0123456789abcdef0123456789abcdef",
  "data": {
    "whatsapp_queue_id": "123",
    "account_id": "1",
    "status": "pending",
    "replayed": false
  }
}

Specifieke foutcodes

SEND_DISABLED, RECIPIENT_UNAVAILABLE, SERVICE_WINDOW_CLOSED, IDEMPOTENCY_CONFLICT, MEDIA_NOT_AVAILABLE, RECORD_NOT_FOUND