Show typing or mark seen
curl --request POST \
--url https://api.social-api.ai/v1/inbox/conversations/{conversation_id}/sender-action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"action": "typing_on"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: 'acc_01HZ9X3Q4R5M6N7P8V2K0W1J', action: 'typing_on'})
};
fetch('https://api.social-api.ai/v1/inbox/conversations/{conversation_id}/sender-action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/inbox/conversations/{conversation_id}/sender-action"
payload = {
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"action": "typing_on"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Inbox
Show typing or mark seen
Shows the other participant a typing indicator, or marks their messages as seen, without sending a message. Free: no interaction credit is used.
Supported on Instagram, Facebook Messenger and WhatsApp. On Instagram and Messenger the typing indicator clears after 20 seconds or when you send a message. On WhatsApp, typing_on also marks the contact’s latest message as read, clears after 25 seconds or when you reply, and needs at least one message from the contact. WhatsApp has no typing_off and returns 400. Marking a message seen on WhatsApp also marks every earlier message in the chat as read.
POST
/
inbox
/
conversations
/
{conversation_id}
/
sender-action
Show typing or mark seen
curl --request POST \
--url https://api.social-api.ai/v1/inbox/conversations/{conversation_id}/sender-action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"action": "typing_on"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: 'acc_01HZ9X3Q4R5M6N7P8V2K0W1J', action: 'typing_on'})
};
fetch('https://api.social-api.ai/v1/inbox/conversations/{conversation_id}/sender-action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/inbox/conversations/{conversation_id}/sender-action"
payload = {
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"action": "typing_on"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Authorizations
Body
application/json
Account and action