@extends('layouts.app') @section('title', __('ui.docs')) @section('content')
Base URL: {{ $baseUrl }}
Auth header: Authorization: Bearer YOUR_API_KEY
curl -X POST {{ $baseUrl }}/messages/text \
-H "Authorization: Bearer wap_xxx" \
-H "Content-Type: application/json" \
-d '{"to":"2010xxxxxxx","text":"Hello from WapAPI"}'
curl -X POST {{ $baseUrl }}/messages/media \
-H "Authorization: Bearer wap_xxx" \
-H "Content-Type: application/json" \
-d '{"to":"2010xxxxxxx","media_url":"https://example.com/a.jpg","media_type":"image","caption":"Photo"}'
curl -X POST {{ $baseUrl }}/messages/template \
-H "Authorization: Bearer wap_xxx" \
-H "Content-Type: application/json" \
-d '{"to":"2010xxxxxxx","template_name":"hello_world","language":"en"}'
curl {{ $baseUrl }}/usage -H "Authorization: Bearer wap_xxx"
$ch = curl_init('{{ $baseUrl }}/messages/text');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer wap_xxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'to' => '2010xxxxxxx',
'text' => 'Hello',
]),
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);
{
"success": true,
"data": { ... },
"meta": {},
"errors": []
}
{{ url('/webhooks/meta') }}{{ url('/webhooks/evolution/{session_uuid}') }}