POST /typing
Updated Oct 1, 20261 minute read
Send typing
Shows the visitor's typing indicator in your team's inbox, and a no-op before the session's first message. The signal expires on its own after a few seconds, so send it while the visitor types and let it lapse.
Part of Presence.
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
session | string | Yes | The visitor's session token. |
isTyping | boolean | Yes | Whether they are mid sentence. |
Responses
| Status | Description |
|---|---|
200 | The signal was recorded. |
400 | invalid_json: the body is not a JSON object. invalid_request: session is not a string or isTyping is not a boolean. invalid_session: the session is not 8 to 128 characters. |
401 | missing_api_key: no bearer token. invalid_api_key: the key matches no organization or was revoked. publishable_key: a median_pk_ key was sent. An OAuth access token is refused here with invalid_api_key. |
429 | The organization's API allowance for this class of request is used up. Wait the Retry-After header's seconds. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | No |
Example response
{
"ok": true
}Example request
curl -X POST https://api.median.sh/v1/typing \
-H "Authorization: Bearer $MEDIAN_KEY" \
-H "content-type: application/json" \
-d '{"session":"user_42","isTyping":true}'