Update WhatsApp notification preferences
PATCH
/dashboard/v1/merchants/{merchantId}/{mode}/whatsapp/links/{id}
const url = 'http://localhost:4000/dashboard/v1/merchants/example/test/whatsapp/links/example';const options = { method: 'PATCH', headers: { cookie: 'better-auth.session_token=<better-auth.session_token>', 'Content-Type': 'application/json' }, body: '{"notifications":{"payment_succeeded":true}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:4000/dashboard/v1/merchants/example/test/whatsapp/links/example \ --header 'Content-Type: application/json' \ --cookie better-auth.session_token=<better-auth.session_token> \ --data '{ "notifications": { "payment_succeeded": true } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”merchantId
required
string
mode
required
string
id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
notifications
required
object
payment_succeeded
required
boolean
Examplegenerated
{ "notifications": { "payment_succeeded": true }}Responses
Section titled “ Responses ”Updated link
Media typeapplication/json
object
object
required
string
id
required
string
status
required
string
wa_id
required
string
merchant_id
required
string
business_name
required
string
role
required
string
livemode
required
boolean
activated_at
required
string | null
notifications
required
object
payment_succeeded
required
boolean
Example
{ "object": "whatsapp_link", "status": "pending_approval", "role": "owner"}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Sign-in required
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Forbidden
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Idempotency conflict or invalid state
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}