Update availability
Updates a team member's availability status to On Leave or Working. Affects lead distribution rules that key off availability.
Request
| Field | Value |
|---|---|
| Method | POST |
| URL | https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/teammember/state_change |
| Auth | Bearer token (Sync-typed). See Authentication. |
| Headers | Content-Type: application/json |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
enterpriseId | string | yes | The enterprise (workspace) ID. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
status | string | yes | New status: one of On Leave, Working. |
email | string | yes | Email of the team member whose status is being changed. |
Example request
bash
curl -X POST "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/teammember/state_change" \
-H "Authorization: Bearer YOUR_SYNC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "Working",
"email": "jane.doe@example.com"
}'Responses
200 OK
json
{
"email": "jane.doe@example.com",
"status": "Working"
}400 Bad Request
Missing or invalid status or email.
403 Forbidden
The bearer token is missing, invalid, or not authorized for the enterprise.
404 Not Found
No team member with the supplied email exists in the enterprise.
Notes
- Use this for availability toggles and leave tracking. To change permissions or roles, use the dashboard.
- The endpoint path uses
teammember(one word) — different from theteam-members(hyphenated) collection endpoints. WorkingandOn Leaveare the only values the API accepts here.INVITEDandDELETEDalso appear as a member'sstatuson read, but are lifecycle states set elsewhere and cannot be assigned through this endpoint.