获取设置
Get instance settings
OpenAPI
/api-reference/openapi/WTO-WA-API/settings.yaml get /settings/find/{instanceName}
openapi: 3.0.4
info:
title: WTO - WTO WA API - Settings
description: Main WTO WA API for WhatsApp
version: 2.3.7
servers:
- url: http://localhost:8080
description: Local development server
- url: https://api.wtocrm.com
description: Production server
- url: '{customUrl}'
description: Custom server
variables:
customUrl:
default: https://your-instance.com
description: Enter your server URL
security:
- ApiKeyAuth: []
paths:
/settings/find/{instanceName}:
get:
summary: Get Settings
description: Get instance settings
parameters:
- $ref: '#/components/parameters/InstanceName'
responses:
'200':
description: Settings retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Settings'
example:
rejectCall: true
msgCall: ''
groupsIgnore: true
alwaysOnline: true
readMessages: true
readStatus: true
syncFullHistory: true
wavoipToken: ''
'400':
description: Bad Request - Invalid input data
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
success: false
error:
code: BAD_REQUEST
message: Invalid request data
meta:
timestamp: '2024-01-15T10:30:00Z'
path: /settings/find/{instanceName}
method: GET
'401':
description: Unauthorized - Invalid or missing API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
success: false
error:
code: UNAUTHORIZED
message: Invalid or missing API key
meta:
timestamp: '2024-01-15T10:30:00Z'
path: /settings/find/{instanceName}
method: GET
'403':
description: Forbidden - Insufficient permissions
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
success: false
error:
code: FORBIDDEN
message: Insufficient permissions to access settings
meta:
timestamp: '2024-01-15T10:30:00Z'
path: /settings/find/{instanceName}
method: GET
'404':
description: Not Found - Instance not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
success: false
error:
code: NOT_FOUND
message: Instance not found
meta:
timestamp: '2024-01-15T10:30:00Z'
path: /settings/find/{instanceName}
method: GET
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
success: false
error:
code: INTERNAL_SERVER_ERROR
message: An unexpected error occurred
meta:
timestamp: '2024-01-15T10:30:00Z'
path: /settings/find/{instanceName}
method: GET
components:
parameters:
InstanceName:
name: instanceName
in: path
required: true
description: WhatsApp instance name
schema:
type: string
example: my-instance
schemas:
Settings:
type: object
properties:
rejectCall:
type: boolean
msgCall:
type: string
groupsIgnore:
type: boolean
alwaysOnline:
type: boolean
readMessages:
type: boolean
readStatus:
type: boolean
syncFullHistory:
type: boolean
wavoipToken:
type: string
ErrorResponse:
type: object
required:
- success
- error
properties:
success:
type: boolean
example: false
error:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
meta:
type: object
properties:
timestamp:
type: string
format: date-time
path:
type: string
method:
type: string
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: apikey
description: API Key for authentication (global or instance-specific)