patch
Update visitor context
Updates context data for a visitor (geolocation data is automatically removed).
Visitors
Endpoint | /visitors/{token}/context |
Method | patch |
Plan Required | FREE |
Authorization | Bearer Token required |
Permissions | WRITE |
Content-Type | application/json |
/visitors/{token}/context
WRITE
application/json
API Tester(Loading...)
Loading API token configuration...
Payload
URL Parameters
token
stringrequiredVisitor token
Body Parameters
Content-Type:
application/json
requiredSchema:
Field | Type | Description / Example |
---|---|---|
name | string | John Doe |
context | object | [object Object] |
name
John Doe
context
[object Object]
Response
200Updated visitor with new context
Field | Type | Description / Example |
---|---|---|
id | number | No example |
name | string | No example |
token | string | No example |
ip | string | No example |
context | string | No example |
websiteId | number | No example |
country | string | No example |
city | string | No example |
online | boolean | No example |
createdAt | string | No example |
updatedAt | string | No example |
id
No example
name
No example
token
No example
ip
No example
context
No example
websiteId
No example
country
No example
city
No example
online
No example
createdAt
No example
updatedAt
No example
400Bad request - Invalid context data
No response details available
401Unauthorized - Invalid or missing API token
No response details available
404Visitor not found
No response details available
Expected Response
JSON
{
"id": "abc123def456",
"name": "John Doe",
"token": "sk-abc123def456ghi789",
"ip": "sample_ip",
"context": "Sample text content",
"websiteId": "abc123def456",
"country": 10,
"city": "New York",
"online": true,
"createdAt": "2024-03-15T14:30:00Z",
"updatedAt": "2024-03-15"
}
API Access Token
Base URL
https://api.5chat.io