POST /calls/reject

Reject an incoming WhatsApp call. Use the call information from the webhook event to reject a call.

application/json

Body Required

  • call_from string Required

    JID of the caller

  • call_id string Required

    Call ID from the call event

Responses

  • 200 application/json

    Call rejected successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
  • 400 application/json

    Bad request

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
POST /calls/reject
curl \
 --request POST 'http://localhost:7001/calls/reject' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"call_from":"6281234567890@s.whatsapp.net","call_id":"3EB0A0F1B2C3D4E5F6"}'
Request examples
{
  "call_from": "6281234567890@s.whatsapp.net",
  "call_id": "3EB0A0F1B2C3D4E5F6"
}
Response examples (200)
{
  "code": 200,
  "status": true,
  "message": "Call rejected successfully"
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Call rejected successfully"
}
Response examples (400)
{
  "code": 400,
  "error": "call_from and call_id are required",
  "status": false,
  "message": "Bad request"
}
Response examples (400)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (401)
{
  "code": 401,
  "error": "Invalid or expired JWT token",
  "status": false,
  "message": "Unauthorized"
}
Response examples (401)
{
  "status": false,
  "code": 401,
  "message": "Unauthorized",
  "error": "Invalid or missing authentication"
}
Response examples (500)
{
  "code": 500,
  "error": "Failed to reject call",
  "status": false,
  "message": "Internal server error"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}