Median

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.

FieldTypeRequiredDescription
sessionstringYesThe visitor's session token.
isTypingbooleanYesWhether they are mid sentence.

Responses

StatusDescription
200The signal was recorded.
400invalid_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.
401missing_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.
429The 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

FieldTypeRequiredDescription
okbooleanNo

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}'

Still need help?

    Esc