restgolanggowhatsapp-multi-devicewhatsapp-apiwhatsappwhatsapp-web-multi-devicewhatsapp-api-gorest-apigolang-whatsapp-apigolang-whatsappbot
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2187 lines
61 KiB
2187 lines
61 KiB
openapi: "3.0.0"
|
|
info:
|
|
title: WhatsApp API MultiDevice
|
|
version: 6.1.0
|
|
description: This API is used for sending whatsapp via API
|
|
servers:
|
|
- url: http://localhost:3000
|
|
tags:
|
|
- name: app
|
|
description: Initial Connection to Whatsapp server
|
|
- name: user
|
|
description: Getting information
|
|
- name: send
|
|
description: Send Message (Text/Image/File/Video).
|
|
- name: message
|
|
description: Message manipulation (revoke/react/update).
|
|
- name: group
|
|
description: Group setting
|
|
- name: newsletter
|
|
description: newsletter setting
|
|
security:
|
|
- basicAuth: []
|
|
|
|
paths:
|
|
/app/login:
|
|
get:
|
|
operationId: appLogin
|
|
tags:
|
|
- app
|
|
summary: Login to whatsapp server
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/LoginResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/app/login-with-code:
|
|
get:
|
|
operationId: appLoginWithCode
|
|
tags:
|
|
- app
|
|
summary: Login with pairing code
|
|
parameters:
|
|
- name: phone
|
|
in: query
|
|
schema:
|
|
type: string
|
|
example: '628912344551'
|
|
description: Your phone number
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/LoginWithCodeResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/app/logout:
|
|
get:
|
|
operationId: appLogout
|
|
tags:
|
|
- app
|
|
summary: Remove database and logout
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/app/reconnect:
|
|
get:
|
|
operationId: appReconnect
|
|
tags:
|
|
- app
|
|
summary: Reconnecting to whatsapp server
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/app/devices:
|
|
get:
|
|
operationId: appDevices
|
|
tags:
|
|
- app
|
|
summary: Get list connected devices
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DeviceResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/info:
|
|
get:
|
|
operationId: userInfo
|
|
tags:
|
|
- user
|
|
summary: User Info
|
|
parameters:
|
|
- name: phone
|
|
in: query
|
|
schema:
|
|
type: string
|
|
example: '6289685028129@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserInfoResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/avatar:
|
|
get:
|
|
operationId: userAvatar
|
|
tags:
|
|
- user
|
|
summary: User Avatar
|
|
parameters:
|
|
- name: phone
|
|
in: query
|
|
schema:
|
|
type: string
|
|
example: '6289685028129@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
- name: is_preview
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
example: true
|
|
description: Whether to fetch a preview of the avatar
|
|
- name: is_community
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
example: false
|
|
description: Whether to fetch a community avatar
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserAvatarResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
post:
|
|
operationId: userChangeAvatar
|
|
tags:
|
|
- user
|
|
summary: User Change Avatar
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
avatar:
|
|
type: string
|
|
format: binary
|
|
description: Avatar to send
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/pushname:
|
|
post:
|
|
operationId: userChangePushName
|
|
tags:
|
|
- user
|
|
summary: User Change Push Name
|
|
description: Update the display name (push name) shown to others in WhatsApp
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
push_name:
|
|
type: string
|
|
example: 'John Doe'
|
|
description: The new display name to set
|
|
required:
|
|
- push_name
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/my/privacy:
|
|
get:
|
|
operationId: userMyPrivacy
|
|
tags:
|
|
- user
|
|
summary: User My Privacy Setting
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserPrivacyResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/my/groups:
|
|
get:
|
|
operationId: userMyGroups
|
|
tags:
|
|
- user
|
|
summary: User My List Groups
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserGroupResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/my/newsletters:
|
|
get:
|
|
operationId: userMyNewsletter
|
|
tags:
|
|
- user
|
|
summary: User My List Groups
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/NewsletterResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/my/contacts:
|
|
get:
|
|
operationId: userMyContacts
|
|
tags:
|
|
- user
|
|
summary: Get list of user contacts
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/MyListContactsResponse'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/user/check:
|
|
get:
|
|
operationId: userCheck
|
|
tags:
|
|
- user
|
|
summary: Check if user is on WhatsApp
|
|
parameters:
|
|
- name: phone
|
|
in: query
|
|
schema:
|
|
type: string
|
|
example: '628912344551'
|
|
description: Phone number with country code
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserCheckResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
|
|
/send/message:
|
|
post:
|
|
operationId: sendMessage
|
|
tags:
|
|
- send
|
|
summary: Send Message
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685028129@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
message:
|
|
type: string
|
|
example: selamat malam
|
|
description: Message to send
|
|
reply_message_id:
|
|
type: string
|
|
example: 3EB089B9D6ADD58153C561
|
|
description: Message ID that you want reply
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/image:
|
|
post:
|
|
operationId: sendImage
|
|
tags:
|
|
- send
|
|
summary: Send Image
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685028129@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
caption:
|
|
type: string
|
|
example: selamat malam
|
|
description: Caption to send
|
|
view_once:
|
|
type: boolean
|
|
example: false
|
|
description: View once
|
|
image:
|
|
type: string
|
|
format: binary
|
|
description: Image to send
|
|
image_url:
|
|
type: string
|
|
example: https://example.com/image.jpg
|
|
description: Image URL to send
|
|
compress:
|
|
type: boolean
|
|
example: false
|
|
description: Compress image
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/audio:
|
|
post:
|
|
operationId: sendAudio
|
|
tags:
|
|
- send
|
|
summary: Send Audio
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685028129@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
audio:
|
|
type: string
|
|
format: binary
|
|
description: Audio to send
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/file:
|
|
post:
|
|
operationId: sendFile
|
|
tags:
|
|
- send
|
|
summary: Send File
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685028129@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
caption:
|
|
type: string
|
|
example: selamat malam
|
|
description: Caption to send
|
|
file:
|
|
type: string
|
|
format: binary
|
|
description: File to send
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/video:
|
|
post:
|
|
operationId: sendVideo
|
|
tags:
|
|
- send
|
|
summary: Send Video
|
|
requestBody:
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685028129@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
caption:
|
|
type: string
|
|
example: ini contoh caption video
|
|
description: Caption to send
|
|
view_once:
|
|
type: boolean
|
|
example: false
|
|
description: View once
|
|
video:
|
|
type: string
|
|
format: binary
|
|
description: Video to send
|
|
compress:
|
|
type: boolean
|
|
example: false
|
|
description: Compress video
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/contact:
|
|
post:
|
|
operationId: sendContact
|
|
tags:
|
|
- send
|
|
summary: Send Contact
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685024051@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
contact_name:
|
|
type: string
|
|
example: Aldino Kemal
|
|
description: Contact name
|
|
contact_phone:
|
|
type: string
|
|
example: '6289685024992'
|
|
description: Contact phone number
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/link:
|
|
post:
|
|
operationId: sendLink
|
|
tags:
|
|
- send
|
|
summary: Send Link
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685024051@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
link:
|
|
type: string
|
|
example: "https://google.com"
|
|
description: Link to send
|
|
caption:
|
|
type: string
|
|
example: 'Halo ini contoh caption'
|
|
description: Caption to send
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/location:
|
|
post:
|
|
operationId: sendLocation
|
|
tags:
|
|
- send
|
|
summary: Send Location
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685024051@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
latitude:
|
|
type: string
|
|
example: "-7.797068"
|
|
description: Latitude coordinate
|
|
longitude:
|
|
type: string
|
|
example: '110.370529'
|
|
description: Longitude coordinate
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/poll:
|
|
post:
|
|
operationId: sendPoll
|
|
tags:
|
|
- send
|
|
summary: Send Poll / Vote
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
description: The WhatsApp phone number to send the poll to, including the '@s.whatsapp.net' suffix.
|
|
example: '6289685024421@s.whatsapp.net'
|
|
question:
|
|
type: string
|
|
description: The question for the poll.
|
|
example: 'Siapa Nama Avatar The Last Air Bender?'
|
|
options:
|
|
type: array
|
|
description: The options for the poll.
|
|
items:
|
|
type: string
|
|
example: [ 'Zuko', 'Aang', 'Katara' ]
|
|
max_answer:
|
|
type: integer
|
|
description: The maximum number of answers allowed for the poll.
|
|
example: 2
|
|
required:
|
|
- phone
|
|
- question
|
|
- options
|
|
- max_answer
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/send/presence:
|
|
post:
|
|
operationId: sendPresence
|
|
tags:
|
|
- send
|
|
summary: Send presence status
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
description: The presence type to send
|
|
enum: [available, unavailable]
|
|
example: 'available'
|
|
is_forwarded:
|
|
type: boolean
|
|
example: false
|
|
description: Whether this is a forwarded message
|
|
required:
|
|
- type
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/message/{message_id}/revoke:
|
|
post:
|
|
operationId: revokeMessage
|
|
tags:
|
|
- message
|
|
summary: Revoke Message
|
|
parameters:
|
|
- in: path
|
|
name: message_id
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: Message ID
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685024051@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/message/{message_id}/delete:
|
|
post:
|
|
operationId: deleteMessage
|
|
tags:
|
|
- message
|
|
summary: Delete Message
|
|
parameters:
|
|
- in: path
|
|
name: message_id
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: Message ID
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685024051@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/message/{message_id}/reaction:
|
|
post:
|
|
operationId: reactMessage
|
|
tags:
|
|
- message
|
|
summary: Send reaction to message
|
|
parameters:
|
|
- in: path
|
|
name: message_id
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: Message ID
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '6289685024051@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
emoji:
|
|
type: string
|
|
example: "🙏"
|
|
description: Emoji to react
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/message/{message_id}/update:
|
|
post:
|
|
operationId: updateMessage
|
|
tags:
|
|
- message
|
|
summary: Edit message by message ID before 15 minutes
|
|
parameters:
|
|
- in: path
|
|
name: message_id
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: Message ID
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '62819273192397132@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
message:
|
|
type: string
|
|
example: 'Hello World'
|
|
description: New message to send
|
|
required:
|
|
- phone
|
|
- message
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/message/{message_id}/read:
|
|
post:
|
|
operationId: readMessage
|
|
tags:
|
|
- message
|
|
summary: Mark as read message
|
|
parameters:
|
|
- in: path
|
|
name: message_id
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: Message ID
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '62819273192397132@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
required:
|
|
- phone
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SendResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/message/{message_id}/star:
|
|
post:
|
|
operationId: starMessage
|
|
tags:
|
|
- message
|
|
summary: Star message
|
|
parameters:
|
|
- in: path
|
|
name: message_id
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: Message ID
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '62819273192397132@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
required:
|
|
- phone
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/message/{message_id}/unstar:
|
|
post:
|
|
operationId: unstarMessage
|
|
tags:
|
|
- message
|
|
summary: Unstar message
|
|
parameters:
|
|
- in: path
|
|
name: message_id
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: Message ID
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: string
|
|
example: '62819273192397132@s.whatsapp.net'
|
|
description: Phone number with country code
|
|
required:
|
|
- phone
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group:
|
|
post:
|
|
operationId: createGroup
|
|
tags:
|
|
- group
|
|
summary: Create group and add participant
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
title:
|
|
type: string
|
|
example: 'Example Group Title'
|
|
participants:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example:
|
|
- '6819241294719274'
|
|
- '6829241294719274'
|
|
- '6839241294719274'
|
|
example:
|
|
- '6819241294719274'
|
|
- '6829241294719274'
|
|
- '6839241294719274'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CreateGroupResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/participants:
|
|
post:
|
|
operationId: addParticipantToGroup
|
|
tags:
|
|
- group
|
|
summary: Adding more participants to group
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantRequest'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/participants/remove:
|
|
post:
|
|
operationId: removeParticipantFromGroup
|
|
tags:
|
|
- group
|
|
summary: Remove participants from group
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantRequest'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/participants/promote:
|
|
post:
|
|
operationId: promoteParticipantToAdmin
|
|
tags:
|
|
- group
|
|
summary: Promote participants to admin
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantRequest'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/participants/demote:
|
|
post:
|
|
operationId: demoteParticipantToMember
|
|
tags:
|
|
- group
|
|
summary: Demote participants to member
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantRequest'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ManageParticipantResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/join-with-link:
|
|
post:
|
|
operationId: joinGroupWithLink
|
|
tags:
|
|
- group
|
|
summary: Join group with link
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
link:
|
|
type: string
|
|
example: 'https://chat.whatsapp.com/whatsappKeyJoinGroup'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/participant-requests:
|
|
get:
|
|
operationId: getGroupParticipantRequests
|
|
tags:
|
|
- group
|
|
summary: Get list of participant requests to join group
|
|
parameters:
|
|
- name: group_id
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: '120363024512399999@g.us'
|
|
description: The group ID to get participant requests for
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GroupParticipantRequestListResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/participant-requests/approve:
|
|
post:
|
|
operationId: approveGroupParticipantRequest
|
|
tags:
|
|
- group
|
|
summary: Approve participant request to join group
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
group_id:
|
|
type: string
|
|
example: '120363024512399999@g.us'
|
|
description: The group ID
|
|
participants:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example: ['6281234567890']
|
|
description: Array of participant WhatsApp IDs to approve
|
|
required:
|
|
- group_id
|
|
- participants
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/participant-requests/reject:
|
|
post:
|
|
operationId: rejectGroupParticipantRequest
|
|
tags:
|
|
- group
|
|
summary: Reject participant request to join group
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
group_id:
|
|
type: string
|
|
example: '120363024512399999@g.us'
|
|
description: The group ID
|
|
participants:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example: ['6281234567890']
|
|
description: Array of participant WhatsApp IDs to reject
|
|
required:
|
|
- group_id
|
|
- participants
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/group/leave:
|
|
post:
|
|
operationId: leaveGroup
|
|
tags:
|
|
- group
|
|
summary: Leave group
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
group_id:
|
|
type: string
|
|
example: '120363024512399999@g.us'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
/newsletter/unfollow:
|
|
post:
|
|
operationId: unfollowNewsletter
|
|
tags:
|
|
- newsletter
|
|
summary: Unfollow newsletter
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
newsletter_id:
|
|
type: string
|
|
example: '120363024512399999@newsletter'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/GenericResponse'
|
|
'400':
|
|
description: Bad Request
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorBadRequest'
|
|
'500':
|
|
description: Internal Server Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ErrorInternalServer'
|
|
|
|
components:
|
|
securitySchemes:
|
|
basicAuth:
|
|
type: http
|
|
scheme: basic
|
|
schemas:
|
|
CreateGroupResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success get list groups
|
|
results:
|
|
type: object
|
|
properties:
|
|
group_id:
|
|
type: string
|
|
example: 1203632782168851111@g.us
|
|
ManageParticipantRequest:
|
|
type: object
|
|
properties:
|
|
group_id:
|
|
type: string
|
|
example: 1203632782168851111@g.us
|
|
participants:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example:
|
|
- '6819241294719274'
|
|
- '6829241294719274'
|
|
- '6839241294719274'
|
|
ManageParticipantResponse:
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success get list groups
|
|
results:
|
|
type: array
|
|
items:
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
participant:
|
|
type: string
|
|
example: '6289987391723@s.whatsapp.net'
|
|
status:
|
|
type: string
|
|
example: success
|
|
message:
|
|
type: string
|
|
example: Participant added
|
|
|
|
UserGroupResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success get list groups
|
|
results:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
JID:
|
|
type: string
|
|
OwnerJID:
|
|
type: string
|
|
Name:
|
|
type: string
|
|
NameSetAt:
|
|
type: string
|
|
NameSetBy:
|
|
type: string
|
|
GroupCreated:
|
|
type: string
|
|
ParticipantVersionID:
|
|
type: string
|
|
Participants:
|
|
type: array
|
|
items:
|
|
properties:
|
|
JID:
|
|
type: string
|
|
IsAdmin:
|
|
type: boolean
|
|
IsSuperAdmin:
|
|
type: boolean
|
|
Error:
|
|
type: number
|
|
UserInfoResponse:
|
|
type: object
|
|
required:
|
|
- code
|
|
- message
|
|
- results
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success
|
|
results:
|
|
type: object
|
|
properties:
|
|
verified_name:
|
|
type: string
|
|
example: Aldino Kemal
|
|
status:
|
|
type: string
|
|
example: Hello World
|
|
picture_id:
|
|
type: string
|
|
example: 1651459152
|
|
devices:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
User:
|
|
type: string
|
|
example: 6289685021291
|
|
Agent:
|
|
type: integer
|
|
example: 0
|
|
Device:
|
|
type: string
|
|
example: UNKNOWN
|
|
Server:
|
|
type: string
|
|
example: s.whatsapp.net
|
|
AD:
|
|
type: boolean
|
|
example: true
|
|
UserAvatarResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success
|
|
results:
|
|
type: object
|
|
properties:
|
|
url:
|
|
type: string
|
|
example: 'https://pps.whatsapp.net/v/t61.24694-24/181358562_385581386633509_6230178822944778044_n.jpg?ccb=11-4&oh=df36c5b990497b8a5758a0f1ad8118a8&oe=620AA726'
|
|
id:
|
|
type: string
|
|
example: '1635239861'
|
|
type:
|
|
type: string
|
|
example: 'image'
|
|
UserPrivacyResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success get privacy
|
|
results:
|
|
type: object
|
|
properties:
|
|
group_add:
|
|
type: string
|
|
example: all
|
|
last_seen:
|
|
type: string
|
|
example: null
|
|
status:
|
|
type: string
|
|
example: all
|
|
profile:
|
|
type: string
|
|
example: all
|
|
read_receipts:
|
|
type: string
|
|
example: all
|
|
SendResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success
|
|
results:
|
|
type: object
|
|
properties:
|
|
message_id:
|
|
type: string
|
|
example: '3EB0B430B6F8F1D0E053AC120E0A9E5C'
|
|
status:
|
|
type: string
|
|
example: '<feature> success ....'
|
|
DeviceResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Fetch device success
|
|
results:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
example: 'Aldino Kemal'
|
|
device:
|
|
type: string
|
|
example: '628960561XXX.0:64@s.whatsapp.net'
|
|
LoginWithCodeResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success
|
|
results:
|
|
type: object
|
|
properties:
|
|
pair_code:
|
|
type: string
|
|
example: ABCD-1234
|
|
LoginResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success
|
|
results:
|
|
type: object
|
|
properties:
|
|
qr_duration:
|
|
type: integer
|
|
example: 30
|
|
qr_link:
|
|
type: string
|
|
example: 'http://localhost:3000/statics/images/qrcode/scan-qr-b0b7bb43-9a22-455a-814f-5a225c743310.png'
|
|
GenericResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success
|
|
results:
|
|
type: string
|
|
example: null
|
|
ErrorInternalServer:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: INTERNAL_SERVER_ERROR
|
|
description: 'SYSTEM_CODE_ERROR'
|
|
message:
|
|
type: string
|
|
example: you are not loggin
|
|
description: 'Detail error message'
|
|
results:
|
|
type: object
|
|
example: null
|
|
description: 'additional data'
|
|
ErrorBadRequest:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: 400
|
|
description: 'HTTP Status Code'
|
|
message:
|
|
type: string
|
|
example: field cannot be blank
|
|
description: 'Detail error message'
|
|
results:
|
|
type: object
|
|
example: null
|
|
description: 'additional data'
|
|
NewsletterResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: "SUCCESS"
|
|
message:
|
|
type: string
|
|
example: "Success get list newsletter"
|
|
results:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Newsletter'
|
|
Newsletter:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
example: "120363144038483540@newsletter"
|
|
state:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
example: "active"
|
|
thread_metadata:
|
|
type: object
|
|
properties:
|
|
creation_time:
|
|
type: string
|
|
example: "1688746895"
|
|
invite:
|
|
type: string
|
|
example: "0029Va4K0PZ5a245NkngBA2M"
|
|
name:
|
|
type: object
|
|
properties:
|
|
text:
|
|
type: string
|
|
example: "WhatsApp"
|
|
id:
|
|
type: string
|
|
example: "1688746895480511"
|
|
update_time:
|
|
type: string
|
|
example: "1688746895480511"
|
|
description:
|
|
type: object
|
|
properties:
|
|
text:
|
|
type: string
|
|
example: "WhatsApp's official channel. Follow for our latest feature launches, updates, exclusive drops and more."
|
|
id:
|
|
type: string
|
|
example: "1689653839450668"
|
|
update_time:
|
|
type: string
|
|
example: "1689653839450668"
|
|
subscribers_count:
|
|
type: string
|
|
example: "0"
|
|
verification:
|
|
type: string
|
|
example: "verified"
|
|
picture:
|
|
type: object
|
|
properties:
|
|
url:
|
|
type: string
|
|
example: ""
|
|
id:
|
|
type: string
|
|
example: "1707950960975554"
|
|
type:
|
|
type: string
|
|
example: "IMAGE"
|
|
direct_path:
|
|
type: string
|
|
example: "/v/t61.24694-24/416962407_970228831134395_8869146381947923973_n.jpg?ccb=11-4&oh=01_Q5AaIIvOIeu3l0HCZWILrmr-dGR_vXFqnhUeytw0-ojPc4hL&oe=670D95B1&_nc_sid=5e03e0&_nc_cat=110"
|
|
preview:
|
|
type: object
|
|
properties:
|
|
url:
|
|
type: string
|
|
example: ""
|
|
id:
|
|
type: string
|
|
example: "1707950960975554"
|
|
type:
|
|
type: string
|
|
example: "PREVIEW"
|
|
direct_path:
|
|
type: string
|
|
example: "/v/t61.24694-24/416962407_970228831134395_8869146381947923973_n.jpg?stp=dst-jpg_s192x192&ccb=11-4&oh=01_Q5AaIHO-DQklqm3q3awF7xwji_WAn9DkgZASQA0B2Ct0qbSa&oe=670D95B1&_nc_sid=5e03e0&_nc_cat=110"
|
|
settings:
|
|
type: object
|
|
properties:
|
|
reaction_codes:
|
|
type: object
|
|
properties:
|
|
value:
|
|
type: string
|
|
example: "ALL"
|
|
viewer_metadata:
|
|
type: object
|
|
properties:
|
|
mute:
|
|
type: string
|
|
example: "off"
|
|
role:
|
|
type: string
|
|
example: "subscriber"
|
|
MyListContactsResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: "SUCCESS"
|
|
message:
|
|
type: string
|
|
example: "Success get list contacts"
|
|
results:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/MyListContacts'
|
|
MyListContacts:
|
|
type: object
|
|
properties:
|
|
jid:
|
|
type: string
|
|
example: "628123123123123@s.whatsapp.net"
|
|
name:
|
|
type: string
|
|
example: "Aldino Kemal"
|
|
GroupResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: "SUCCESS"
|
|
message:
|
|
type: string
|
|
example: "Success get list groups"
|
|
results:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Group'
|
|
Group:
|
|
type: object
|
|
properties:
|
|
JID:
|
|
type: string
|
|
example: "120363347168689807@g.us"
|
|
OwnerJID:
|
|
type: string
|
|
example: "6288228744537@s.whatsapp.net"
|
|
Name:
|
|
type: string
|
|
example: "Example Group"
|
|
NameSetAt:
|
|
type: string
|
|
format: date-time
|
|
example: "2024-10-11T21:27:29+07:00"
|
|
NameSetBy:
|
|
type: string
|
|
example: "6288228744537@s.whatsapp.net"
|
|
Topic:
|
|
type: string
|
|
example: ""
|
|
TopicID:
|
|
type: string
|
|
example: ""
|
|
TopicSetAt:
|
|
type: string
|
|
format: date-time
|
|
example: "0001-01-01T00:00:00Z"
|
|
TopicSetBy:
|
|
type: string
|
|
example: ""
|
|
TopicDeleted:
|
|
type: boolean
|
|
example: false
|
|
IsLocked:
|
|
type: boolean
|
|
example: false
|
|
IsAnnounce:
|
|
type: boolean
|
|
example: false
|
|
AnnounceVersionID:
|
|
type: string
|
|
example: "1728656849439709"
|
|
IsEphemeral:
|
|
type: boolean
|
|
example: false
|
|
DisappearingTimer:
|
|
type: integer
|
|
example: 0
|
|
IsIncognito:
|
|
type: boolean
|
|
example: false
|
|
IsParent:
|
|
type: boolean
|
|
example: false
|
|
DefaultMembershipApprovalMode:
|
|
type: string
|
|
example: ""
|
|
LinkedParentJID:
|
|
type: string
|
|
example: ""
|
|
IsDefaultSubGroup:
|
|
type: boolean
|
|
example: false
|
|
IsJoinApprovalRequired:
|
|
type: boolean
|
|
example: false
|
|
GroupCreated:
|
|
type: string
|
|
format: date-time
|
|
example: "2024-10-11T21:27:29+07:00"
|
|
ParticipantVersionID:
|
|
type: string
|
|
example: "1728656849439790"
|
|
Participants:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Participant'
|
|
MemberAddMode:
|
|
type: string
|
|
example: "admin_add"
|
|
|
|
Participant:
|
|
type: object
|
|
properties:
|
|
JID:
|
|
type: string
|
|
example: "6288228744537@s.whatsapp.net"
|
|
LID:
|
|
type: string
|
|
example: "20036609675500@lid"
|
|
IsAdmin:
|
|
type: boolean
|
|
example: true
|
|
IsSuperAdmin:
|
|
type: boolean
|
|
example: true
|
|
DisplayName:
|
|
type: string
|
|
example: ""
|
|
Error:
|
|
type: integer
|
|
example: 0
|
|
AddRequest:
|
|
type: string
|
|
example: null
|
|
|
|
GroupParticipantRequestListResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: "SUCCESS"
|
|
message:
|
|
type: string
|
|
example: "Success getting list requested participants"
|
|
results:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
jid:
|
|
type: string
|
|
example: "6289685024091@s.whatsapp.net"
|
|
requested_at:
|
|
type: string
|
|
format: date-time
|
|
example: "2024-10-11T21:27:29+07:00"
|
|
UserCheckResponse:
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: string
|
|
example: SUCCESS
|
|
message:
|
|
type: string
|
|
example: Success check user
|
|
results:
|
|
type: object
|
|
properties:
|
|
is_on_whatsapp:
|
|
type: boolean
|
|
example: true
|