Skip to the content.

Teams API

With Teams api V4 you can:

Notes:

List teams

Fetch a paginated list of team.

GET /api/v4/teams?fields=is_owner_of
[
  {
    "id": 123,
    "contact_tracing_enabled": true,
    "form_contact_tracing_enabled": true,
    "feature_tasks_enabled": true,
    "guests_enabled": true,
    "industry": "",
    "is_owner_of": true,
    "location": "",
    "name": "Workers all Safe",
    "risk_register_enabled": true,
    "sso_required": false,
    "sso_team_id": "workers-all-safe",
    "user_timeout": null,
    "wearables_enabled": true
  },
  {
    "id": 321,
    "contact_tracing_enabled": true,
    "form_contact_tracing_enabled": true,
    "feature_tasks_enabled": true,
    "guests_enabled": false,
    "industry": null,
    "is_owner_of": false,
    "location": null,
    "name": "Productive and Sound",
    "risk_register_enabled": false,
    "sso_required": false,
    "sso_team_id": "afsdfsdfgsdf",
    "user_timeout": null,
    "wearables_enabled": false
  },
  ...
]

Fetch a team

Get a team. See the optional available fields.

GET /api/v4/team/123?fields=is_owner_of
{
  "id": 123,
  "contact_tracing_enabled": true,
  "form_contact_tracing_enabled": true,
  "feature_tasks_enabled": true,
  "guests_enabled": true,
  "industry": "",
  "is_owner_of": true,
  "location": "",
  "name": "Workers all Safe",
  "risk_register_enabled": true,
  "sso_required": false,
  "sso_team_id": "workers-all-safe",
  "user_timeout": null,
  "wearables_enabled": true
}

Create a Team

POST /api/v4/team

{
  "team": {
    "name": "Great worker in Action",
    "industry": "Productivity",
    "location": "Americas"
  }
}
{
  contact_tracing_enabled: false
  feature_tasks_enabled: true
  form_contact_tracing_enabled: false
  guests_enabled: false
  id: 456
  industry: "Productivity"
  location: "Americas"
  name: "Great worker in Action"
  risk_register_enabled: true
  sso_required: false
  sso_team_id: "cwx_qqj8sb8"
  user_timeout: null
  wearables_enabled: false
}

Update a Team

Updates the allowed fields of one single team. Allowed fields:

PATCH /api/v4/teams/123
{
  "team": {
    "feature_tasks_enabled": true,
    "industry": "Safety and protection",
    "location": "Global",
    "name": "Every Worker Safe",
  }
}
204 No Content

Add One or Multiple Users to One or Multiple Team Channels

POST /api/v4/teams/1/add_users_to_team_channels

Params required

{
	"users": [
		{"user_id":6,"role":"operator","send_email":false},
		{"user_id":54,"role":"operator","send_email":false}
	],
	"channels": [
		{"name":"Team channel","id":4,"isSelected":true},
		{"name":"Team channel 2","id":5,"isSelected":true}
	]
}

Response

{
    "teams": [
        [
            {
                "object": {
                    "user_id": 6,
                    "role": "operator",
                    "send_email": false
                },
                "http_status": 200,
                "status": "success",
                "errors": {}
            },
            {
                "object": {
                    "user_id": 54,
                    "role": "operator",
                    "send_email": false
                },
                "http_status": 201,
                "status": "success",
                "errors": {}
            }
        ],
        [
            {
                "object": {
                    "user_id": 6,
                    "role": "operator",
                    "send_email": false
                },
                "http_status": 200,
                "status": "success",
                "errors": {}
            },
            {
                "object": {
                    "user_id": 54,
                    "role": "operator",
                    "send_email": false
                },
                "http_status": 201,
                "status": "success",
                "errors": {}
            }
        ]
    ]
}

Available fields

You can use the fields parameter in any of the Teams API methods. The requested method will respond with the required fields accordingly. Some fields are included by default but you can opt-out from them on request.