11419 lines
No EOL
313 KiB
JSON
11419 lines
No EOL
313 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "WWebJS API",
|
|
"description": "API wrapper for WhatsAppWebJS",
|
|
"version": "1.0.0"
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "",
|
|
"description": ""
|
|
},
|
|
{
|
|
"url": "http://localhost:3000",
|
|
"description": "localhost"
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "Session",
|
|
"description": "Handling multiple sessions logic, creation and deletion"
|
|
},
|
|
{
|
|
"name": "Client",
|
|
"description": "All functions related to the client"
|
|
},
|
|
{
|
|
"name": "Message"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/ping": {
|
|
"get": {
|
|
"tags": [
|
|
"Various"
|
|
],
|
|
"summary": "Health check",
|
|
"description": "Responds to request with \"pong\" message",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Response message",
|
|
"content": {
|
|
"application/json": {
|
|
"example": {
|
|
"success": true,
|
|
"message": "pong"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/localCallbackExample": {
|
|
"post": {
|
|
"tags": [
|
|
"Various"
|
|
],
|
|
"summary": "Local callback",
|
|
"description": "Used to generate a QR code and writes a log file. ONLY FOR DEVELOPMENT/TEST PURPOSES.",
|
|
"parameters": [
|
|
{
|
|
"name": "x-api-key",
|
|
"in": "header",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Response message",
|
|
"content": {
|
|
"application/json": {
|
|
"example": {
|
|
"success": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server Failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/getSessions": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Get all sessions",
|
|
"description": "Get all sessions.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Retrieved all sessions.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GetSessionsResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/start/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Start new session",
|
|
"description": "Starts a session for the given session ID.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Status of the initiated session.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartSessionResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/status/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Get session status",
|
|
"description": "Status of the session with the given session ID.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Status of the session.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StatusSessionResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/qr/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Get session QR code",
|
|
"description": "QR code of the session with the given session ID.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/qr/{sessionId}/image": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Get session QR code as image",
|
|
"description": "QR code as image of the session with the given session ID.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "QR image.",
|
|
"content": {
|
|
"image/png": {}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/requestPairingCode/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Request authentication via pairing code",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "Phone number in international, symbol-free format",
|
|
"example": "12025550108"
|
|
},
|
|
"showNotification": {
|
|
"type": "boolean",
|
|
"description": "Show notification to pair on phone number",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "Phone number in international, symbol-free format",
|
|
"example": "12025550108"
|
|
},
|
|
"showNotification": {
|
|
"type": "boolean",
|
|
"description": "Show notification to pair on phone number",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/restart/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Restart session",
|
|
"description": "Restarts the session with the given session ID.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Sessions restarted.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RestartSessionResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/terminate/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Terminate session",
|
|
"description": "Terminates the session with the given session ID.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Sessions terminated.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TerminateSessionResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/terminateInactive": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Terminate inactive sessions",
|
|
"description": "Terminates all inactive sessions.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Sessions terminated.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TerminateSessionsResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/terminateAll": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Terminate all sessions",
|
|
"description": "Terminates all sessions.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Sessions terminated.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TerminateSessionsResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/session/getPageScreenshot/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Session"
|
|
],
|
|
"summary": "Get page screenshot",
|
|
"description": "Screenshot of the client with the given session ID.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Screenshot image.",
|
|
"content": {
|
|
"image/png": {}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/getClassInfo/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get current connection information",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/acceptInvite/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Accept an invitation to join a group",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"inviteCode": {
|
|
"type": "string",
|
|
"description": "Invitation code",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"inviteCode": {
|
|
"type": "string",
|
|
"description": "Invitation code",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/archiveChat/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Archive the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/createGroup/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Create a new group",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Group title",
|
|
"example": "Group name"
|
|
},
|
|
"participants": {
|
|
"type": "array",
|
|
"description": "A single contact ID as a string or an array of contact IDs to add to the group",
|
|
"example": []
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"description": "An object that handles options for group creation",
|
|
"example": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Group title",
|
|
"example": "Group name"
|
|
},
|
|
"participants": {
|
|
"type": "array",
|
|
"description": "A single contact ID as a string or an array of contact IDs to add to the group",
|
|
"example": []
|
|
},
|
|
"options": {
|
|
"type": "array",
|
|
"description": "An object that handles options for group creation",
|
|
"example": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getBlockedContacts/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get all blocked contacts by host account",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/getChatById/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getChatLabels/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get all labels assigned to the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getChats/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get all current chats",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/getChatsByLabelId/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get all chats for a specific label",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"labelId": {
|
|
"type": "string",
|
|
"description": "ID of the label",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"labelId": {
|
|
"type": "string",
|
|
"description": "ID of the label",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getCommonGroups/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the contact's common groups",
|
|
"description": "Get the contact's common groups with you. Returns empty array if you don't have any common group.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "The whatsapp user's ID (_serialized format)",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "The whatsapp user's ID (_serialized format)",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getContactById/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the contact",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "The whatsapp user's ID",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "The whatsapp user's ID",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getContacts/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get all current contacts",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/getInviteInfo/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Return invite information",
|
|
"description": "Return an object with information about the invite code",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"displayName": {
|
|
"type": "string",
|
|
"description": "New display name",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"displayName": {
|
|
"type": "string",
|
|
"description": "New display name",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getLabelById/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the label",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"labelId": {
|
|
"type": "string",
|
|
"description": "ID of the label",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"labelId": {
|
|
"type": "string",
|
|
"description": "ID of the label",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getLabels/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get all current labels",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/addOrRemoveLabels/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Change labels in chats",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"labelIds": {
|
|
"type": "array",
|
|
"description": "Array of label IDs",
|
|
"example": []
|
|
},
|
|
"chatIds": {
|
|
"type": "array",
|
|
"description": "Array of chat IDs",
|
|
"example": []
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"labelIds": {
|
|
"type": "array",
|
|
"description": "Array of label IDs",
|
|
"example": []
|
|
},
|
|
"chatIds": {
|
|
"type": "array",
|
|
"description": "Array of chat IDs",
|
|
"example": []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getNumberId/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the registered WhatsApp ID for a number",
|
|
"description": "Return null if the number is not registered on WhatsApp",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "The number or ID ('@c.us' will be automatically appended if not specified)",
|
|
"example": "6281288888888"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "The number or ID ('@c.us' will be automatically appended if not specified)",
|
|
"example": "6281288888888"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/isRegisteredUser/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Check if a given ID is registered in WhatsApp",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "The number or ID ('@c.us' will be automatically appended if not specified)",
|
|
"example": "6281288888888"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "The number or ID ('@c.us' will be automatically appended if not specified)",
|
|
"example": "6281288888888"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getProfilePicUrl/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Return the contact ID's profile picture URL",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "The contact ID's of profile",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "The contact ID's of profile",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getState/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the current connection state for the client",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/markChatUnread/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Mark the chat as unread",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/muteChat/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Mute the chat",
|
|
"description": "Mute this chat forever, unless a date is specified",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
},
|
|
"unmuteDate": {
|
|
"type": "string",
|
|
"description": "Timestamp when the chat will be muted, leave as is to mute forever",
|
|
"example": "1733489397"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": ""
|
|
},
|
|
"unmuteDate": {
|
|
"type": "string",
|
|
"description": "Timestamp when the chat will be muted, leave as is to mute forever",
|
|
"example": "1733489397"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/pinChat/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Pin the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/searchMessages/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Search for messages",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string",
|
|
"description": "Search string",
|
|
"example": ""
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Search options",
|
|
"example": {
|
|
"limit": 10,
|
|
"page": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string",
|
|
"description": "Search string",
|
|
"example": ""
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Search options",
|
|
"example": {
|
|
"limit": 10,
|
|
"page": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/sendMessage/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Send a message to a specific chatId",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message (Group or Individual)"
|
|
},
|
|
"contentType": {
|
|
"type": "string",
|
|
"description": "The type of message content, must be one of the following: string, MessageMedia, MessageMediaFromURL, Location, Contact or Poll"
|
|
},
|
|
"content": {
|
|
"type": "object",
|
|
"description": "The content of the message, can be a string or an object"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "The message send options"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"string": {
|
|
"value": {
|
|
"chatId": "6281288888888@c.us",
|
|
"contentType": "string",
|
|
"content": "Hello World!"
|
|
}
|
|
},
|
|
"MessageMedia": {
|
|
"value": {
|
|
"chatId": "6281288888888@c.us",
|
|
"contentType": "MessageMedia",
|
|
"content": {
|
|
"mimetype": "image/jpeg",
|
|
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
|
|
"filename": "image.jpg"
|
|
}
|
|
}
|
|
},
|
|
"MessageMediaFromURL": {
|
|
"value": {
|
|
"chatId": "6281288888888@c.us",
|
|
"contentType": "MessageMediaFromURL",
|
|
"content": "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=Example"
|
|
}
|
|
},
|
|
"Location": {
|
|
"value": {
|
|
"chatId": "6281288888888@c.us",
|
|
"contentType": "Location",
|
|
"content": {
|
|
"latitude": -6.2,
|
|
"longitude": 106.8,
|
|
"description": "Jakarta"
|
|
}
|
|
}
|
|
},
|
|
"Contact": {
|
|
"value": {
|
|
"chatId": "6281288888888@c.us",
|
|
"contentType": "Contact",
|
|
"content": {
|
|
"contactId": "6281288888889@c.us"
|
|
}
|
|
}
|
|
},
|
|
"Poll": {
|
|
"value": {
|
|
"chatId": "6281288888888@c.us",
|
|
"contentType": "Poll",
|
|
"content": {
|
|
"pollName": "Cats or Dogs?",
|
|
"pollOptions": [
|
|
"Cats",
|
|
"Dogs"
|
|
],
|
|
"options": {
|
|
"allowMultipleAnswers": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/sendPresenceAvailable/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Mark the client as online",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/sendPresenceUnavailable/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Mark the client as unavailable",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/sendSeen/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Mark the chat as seen",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/setDisplayName/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Set the current user",
|
|
"description": "This is the name shown to WhatsApp users that have not added you as a contact beside your number in groups and in your profile.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pictureMimetype": {
|
|
"type": "string",
|
|
"description": "The mimetype of the picture to set as the profile picture for the user WhatsApp account.",
|
|
"example": "image/png"
|
|
},
|
|
"pictureData": {
|
|
"type": "string",
|
|
"description": "The base64 data of the picture to set as the profile picture for the user WhatsApp account.",
|
|
"example": "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX +/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII="
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pictureMimetype": {
|
|
"type": "string",
|
|
"description": "The mimetype of the picture to set as the profile picture for the user WhatsApp account.",
|
|
"example": "image/png"
|
|
},
|
|
"pictureData": {
|
|
"type": "string",
|
|
"description": "The base64 data of the picture to set as the profile picture for the user WhatsApp account.",
|
|
"example": "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX +/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII="
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/setProfilePicture/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Set the current user",
|
|
"description": "Each WaWeb Connection counts as one device, and the phone (if exists) counts as one device. So for a non-enterprise user with one WaWeb connection it should return \"2\"",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/setStatus/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Set the current user's status message",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"description": "New status message",
|
|
"example": "I'm running WWebJS Api"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"description": "New status message",
|
|
"example": "I'm running WWebJS Api"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/unarchiveChat/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Changes archive state of the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/unmuteChat/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Unmute the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/unpinChat/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Unpin the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getWWebVersion/{sessionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Return the version of WhatsApp Web currently being run",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/deleteProfilePicture/{sessionId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Delete the current user's profile picture",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/client/setAutoDownloadAudio/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Set auto load download audio flag",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/setAutoDownloadDocuments/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Set auto load download documents flag",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/setAutoDownloadPhotos/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Set auto load download photos flag",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/setAutoDownloadVideos/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Set auto load download videos flag",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flag": {
|
|
"type": "boolean",
|
|
"description": "Flag true/false",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/syncHistory/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Sync chat history",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getContactDeviceCount/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get user device count",
|
|
"description": "Each WaWeb Connection counts as one device, and the phone (if exists) counts as one device. So for a non-enterprise user with one WaWeb connection it should return \"2\"",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": {
|
|
"type": "string",
|
|
"description": "ID of the user",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"userId": {
|
|
"type": "string",
|
|
"description": "ID of the user",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getCountryCode/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the country code",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "Number or ID",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "Number or ID",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/getFormattedNumber/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Get the formatted number",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "Number or ID",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "Number or ID",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client/openChatWindow/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Client"
|
|
],
|
|
"summary": "Open the chat window",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "ID of the chat",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/getClassInfo/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Get the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/clearMessages/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Clear all messages from the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/clearState/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Stop typing or recording in chat immediately",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/delete/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Delete the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/fetchMessages/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Load chat messages",
|
|
"description": "Messages sorted from earliest to latest",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the given Chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"searchOptions": {
|
|
"type": "object",
|
|
"description": "Search options for fetching messages",
|
|
"example": {
|
|
"limit": 10,
|
|
"fromMe": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the given Chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"searchOptions": {
|
|
"type": "object",
|
|
"description": "Search options for fetching messages",
|
|
"example": {
|
|
"limit": 10,
|
|
"fromMe": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/getContact/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Get the contact",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/sendStateRecording/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Simulate recording audio",
|
|
"description": "Simulate recording audio in chat. This will last for 25 seconds",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/sendStateTyping/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Simulate typing in chat",
|
|
"description": "Simulate typing in chat. This will last for 25 seconds.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/sendSeen/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Set the message as seen",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/markUnread/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Mark this chat as unread",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/syncHistory/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Sync chat history",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/getLabels/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Return all labels",
|
|
"description": "Return array of all labels assigned to this chat",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the given chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/chat/changeLabels/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Chat"
|
|
],
|
|
"summary": "Add or remove labels",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the given Chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"labelIds": {
|
|
"type": "array",
|
|
"description": "Array of (number or string)",
|
|
"example": [
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the given Chat (either group or personal)",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"labelIds": {
|
|
"type": "array",
|
|
"description": "Array of (number or string)",
|
|
"example": [
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/getClassInfo/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Get the group",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/addParticipants/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Add the participant(s)",
|
|
"description": "Add a list of participants by id to the group",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options for adding participants",
|
|
"example": {
|
|
"sleep": [
|
|
250,
|
|
500
|
|
],
|
|
"comment": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options for adding participants",
|
|
"example": {
|
|
"sleep": [
|
|
250,
|
|
500
|
|
],
|
|
"comment": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/demoteParticipants/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Demote the participant(s)",
|
|
"description": "Demote participants by ids to regular users",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/getInviteCode/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Get the invite code",
|
|
"description": "Get the invite code for a specific group",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/leave/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Leave the group",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/promoteParticipants/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Promote the participant(s)",
|
|
"description": "Promote participants by IDs to admins",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/removeParticipants/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Remove the participant(s)",
|
|
"description": "Remove a list of participants by ID to the group",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"contactIds": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the contact",
|
|
"example": "6281288888887@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/revokeInvite/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Invalidate the invite code",
|
|
"description": "Invalidate the current group invite code and generates a new one",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/setDescription/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Update the group description",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Group description",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Group description",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/setInfoAdminsOnly/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Update the info group settings",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"adminsOnly": {
|
|
"type": "boolean",
|
|
"description": "Enable or disable this option",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"adminsOnly": {
|
|
"type": "boolean",
|
|
"description": "Enable or disable this option",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/setMessagesAdminsOnly/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Update the message group settings",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"adminsOnly": {
|
|
"type": "boolean",
|
|
"description": "Enable or disable this option",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"adminsOnly": {
|
|
"type": "boolean",
|
|
"description": "Enable or disable this option",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/setSubject/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Update the group subject",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "Group subject",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "Group subject",
|
|
"example": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/setPicture/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Set the group picture",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"pictureMimeType": {
|
|
"type": "string",
|
|
"description": "MIME type of the attachment"
|
|
},
|
|
"pictureData": {
|
|
"type": "string",
|
|
"description": "Base64-encoded data of the file"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"pictureMimeType": {
|
|
"type": "string",
|
|
"description": "MIME type of the attachment"
|
|
},
|
|
"pictureData": {
|
|
"type": "string",
|
|
"description": "Base64-encoded data of the file"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/deletePicture/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Delete the group picture",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/getGroupMembershipRequests/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Get the membership requests",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/approveGroupMembershipRequests/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Approve membership request",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options for performing a membership request action",
|
|
"example": {
|
|
"requesterIds": [],
|
|
"sleep": [
|
|
250,
|
|
500
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options for performing a membership request action",
|
|
"example": {
|
|
"requesterIds": [],
|
|
"sleep": [
|
|
250,
|
|
500
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/groupChat/rejectGroupMembershipRequests/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Group Chat"
|
|
],
|
|
"summary": "Reject membership request",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options for performing a membership request action",
|
|
"example": {
|
|
"requesterIds": [],
|
|
"sleep": [
|
|
250,
|
|
500
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp id for the given chat group",
|
|
"example": "XXXXXXXXXX@g.us"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options for performing a membership request action",
|
|
"example": {
|
|
"requesterIds": [],
|
|
"sleep": [
|
|
250,
|
|
500
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getClassInfo/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get message",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/delete/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Delete a message from the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"everyone": {
|
|
"type": "boolean",
|
|
"description": "If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat.",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"everyone": {
|
|
"type": "boolean",
|
|
"description": "If true and the message is sent by the current user or the user is an admin, will delete it for everyone in the chat.",
|
|
"example": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/downloadMedia/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Download attached message media",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/downloadMediaAsData/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Download attached message media as binary data",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Binary data."
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/forward/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Delete a message from the chat",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"destinationChatId": {
|
|
"type": "string",
|
|
"description": "The chat id to forward the message to",
|
|
"example": "6281288888889@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"destinationChatId": {
|
|
"type": "string",
|
|
"description": "The chat id to forward the message to",
|
|
"example": "6281288888889@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getInfo/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get information about message delivery status",
|
|
"description": "May return null if the message does not exist or is not sent by you.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getMentions/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get the contacts mentioned",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getOrder/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get the order details",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getPayment/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get the payment details",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getQuotedMessage/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get the quoted message",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/react/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "React with an emoji",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"reaction": {
|
|
"type": "string",
|
|
"description": "Emoji to react with. Send an empty string to remove the reaction.",
|
|
"example": "👍"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"reaction": {
|
|
"type": "string",
|
|
"description": "Emoji to react with. Send an empty string to remove the reaction.",
|
|
"example": "👍"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/reply/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Send a message as a reply",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"contentType": {
|
|
"type": "string",
|
|
"description": "The type of message content, must be one of the following: string, MessageMedia, MessageMediaFromURL, Location, Contact or Poll"
|
|
},
|
|
"content": {
|
|
"type": "object",
|
|
"description": "The content of the message, can be a string or an object"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "The message send options"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"string": {
|
|
"value": {
|
|
"messageId": "3A80E857F9B44AF60C2C",
|
|
"chatId": "6281288888888@c.us",
|
|
"contentType": "string",
|
|
"content": "Reply text!"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/star/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Star the message",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/unstar/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Unstar the message",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getReactions/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get the reactions associated",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getGroupMentions/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get groups mentioned in this message",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/edit/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Edit the message",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "The content of the message"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options used when editing the message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp identifier for the message",
|
|
"example": "ABCDEF999999999"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "The content of the message"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"description": "Options used when editing the message"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/message/getContact/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get the contact",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"chatId": {
|
|
"type": "string",
|
|
"description": "The chat id which contains the message",
|
|
"example": "6281288888888@c.us"
|
|
},
|
|
"messageId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the message",
|
|
"example": "ABCDEF999999999"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/getClassInfo/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Get the contact",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/block/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Block contact",
|
|
"description": "",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/getAbout/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Get the contact's current info",
|
|
"description": "Get the Contact's current 'about' info. Returns null if you don't have permission to read their status.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/getChat/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Get the chat",
|
|
"description": "Get the chat that corresponds to the contact. Will return null when getting chat for currently logged in user.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/unblock/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Unblock the contact",
|
|
"description": "Unblock the contact from WhatsApp.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/getFormattedNumber/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Get the formatted phone number",
|
|
"description": "Returns the contact's formatted phone number, (12345678901@c.us) => (+1 (234) 5678-901).",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/getCountryCode/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Get the country code",
|
|
"description": "Returns the contact's country code, (1541859685@c.us) => (1).",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/getProfilePicUrl/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Get the profile picture URL",
|
|
"description": "Get the contact's profile picture URL, if privacy settings allow it.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/contact/getCommonGroups/{sessionId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Contact"
|
|
],
|
|
"summary": "Get the contact's common groups",
|
|
"description": "Get the contact's common groups with you. Returns empty array if you don't have any common group.",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Unique identifier for the session (alphanumeric and - allowed)",
|
|
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForbiddenResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotFoundResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Server failure.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"apiKeyAuth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"application/xml": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contactId": {
|
|
"type": "string",
|
|
"description": "Unique WhatsApp ID for the contact",
|
|
"example": "6281288888888@c.us"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"StartSessionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Session initiated successfully"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "StartSessionResponse"
|
|
}
|
|
},
|
|
"StatusSessionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"example": "CONNECTED"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "session_connected"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "StatusSessionResponse"
|
|
}
|
|
},
|
|
"RestartSessionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Restarted successfully"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "RestartSessionResponse"
|
|
}
|
|
},
|
|
"TerminateSessionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Logged out successfully"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "TerminateSessionResponse"
|
|
}
|
|
},
|
|
"TerminateSessionsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Flush completed successfully"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "TerminateSessionsResponse"
|
|
}
|
|
},
|
|
"ErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"error": {
|
|
"type": "string",
|
|
"example": "Some server error"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "ErrorResponse"
|
|
}
|
|
},
|
|
"NotFoundResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"error": {
|
|
"type": "string",
|
|
"example": "Not found error"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "NotFoundResponse"
|
|
}
|
|
},
|
|
"ForbiddenResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"error": {
|
|
"type": "string",
|
|
"example": "Invalid API key"
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "ForbiddenResponse"
|
|
}
|
|
},
|
|
"GetSessionsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"result": {
|
|
"type": "array",
|
|
"example": [],
|
|
"items": {}
|
|
}
|
|
},
|
|
"xml": {
|
|
"name": "GetSessionsResponse"
|
|
}
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"apiKeyAuth": {
|
|
"type": "apiKey",
|
|
"in": "header",
|
|
"name": "x-api-key"
|
|
}
|
|
}
|
|
}
|
|
} |