Skip to main content

Availability and Out of Office

Each team member has an availability state: on_shift, off_hours (outside their work hours), absent (out of office) or inactive (no longer an active member). The state decides whether a contact owner or assignee receives new conversations: absent members never get automatic assignments, and an out-of-office period can name a substitute.

Contacts show the state of their owner in owner.availability_state.

The team member list (GET /api/v1/users, scope team:read) carries the same summary per member: availability_state, absent_until, substitute, has_work_hours (true when the member has work hours set, so on_shift with has_work_hours: false means "no work hours") and next_shift_start (UTC start of the next work-hours window; null when on shift, without work hours, or unknown).

Endpoints​

MethodPathScope
GET / PUT/api/v1/users/me/availabilitynone (the token's own user)
GET / POST/api/v1/users/me/absencesnone (the token's own user)
PATCH / DELETE/api/v1/users/me/absences/{absence_id}none (the token's own user)
POST/api/v1/users/me/absences/end-nownone (the token's own user)
same paths/api/v1/users/{user_id}/availability, /absences, ...team:read to read, team:update to change another member (only an Owner can change another Owner)

The /users/me endpoints act as the user the token belongs to. A token that changes the auto-reply fields (auto_reply_*) on PUT /users/me/availability also needs messages:create, because auto-replies are sent to customers in that user's name.

Work hours (PUT /users/me/availability)​

Send only the fields you change.

FieldDescription
timezoneIANA zone such as Europe/Berlin; null uses the workspace time zone
work_schedule_enabledfalse (default): always on shift
work_schedule.time_ranges[{ "days": [0,1,2,3,4], "start": "09:00", "end": "17:00" }], days 0 (Monday) to 6 (Sunday), local time, end before start means overnight
default_substituteSubstitute suggested for new absences
auto_reply_absence_enabled / auto_reply_off_hours_enabledTurn the out-of-office / outside-work-hours auto-reply on or off
auto_reply_absence_text / auto_reply_off_hours_textReply text (max 2000 characters). Variables: {{agent.name}}, {{agent.first_name}}, {{agent.substitute_name}}, {{agent.return_date}}, {{agent.next_shift}} and the standard contact variables ({{contact.first_name}}, {{contact.last_name}}, {{contact.name}}, {{contact.email}}, {{contact.phone}}, {{contact.birthday}}, {{contact.custom.<key>}}). A variable without a value renders empty
auto_reply_absence_translations / auto_reply_off_hours_translations{ "<language>": "<text>" }, sent when the contact's language matches; same variables
auto_reply_excluded_channel_typesChannel types that never get an auto-reply, for example ["email"]

The response adds effective_timezone and status (availability_state, absent_until, next_shift_start, absence, substitute).

Out of office​

curl -X POST "https://api.sendseven.com/api/v1/users/me/absences" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{"ends_at": "2026-11-03T08:00:00Z", "substitute_mode": "user", "substitute_user_id": "usr_7f3a9c", "note": "Vacation"}'
FieldDescription
starts_atISO 8601, default now
ends_atISO 8601, or null for "until switched off"
substitute_modenone, user, round_robin_inbox, round_robin_tag, least_busy_inbox, least_busy_tag
substitute_user_id / substitute_inbox_id / substitute_tag_idThe ID the mode needs; a substitute user must be active
noteInternal reason (max 255 characters), never shown to customers. On /users/{user_id}/... reads it is only returned to callers with team:update; the member sees their own

While absent with a substitute, new conversations of the member's contacts, and their assigned conversations that receive a new customer message, move to the substitute. POST /users/me/absences/end-now ends every running absence and returns {"success": true, "ended": 1}. Overlapping absences are rejected.