Docs

Update a team

Preview· P9
PATCH
/teams/{team_id}

Changes a team's name, site, lead, whether visitors may choose it, or its members (member_ids replaces them). archived: true archives the team: it takes no new visits, and a visit waiting with it stays where it is until someone passes it on.

Scope: people:write · Plan: Pro and Enterprise in live mode; every plan in test mode.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token> on every request. The token is one of:

PrefixWhat it isWhere it may be used
agoo_sk_live_Secret key, live modeYour servers only
agoo_sk_test_Secret key, test modeYour servers only
agoo_pk_live_Publishable key, live modeBrowsers and apps: create pre-registrations and bookings, read public booking types (with their intake questions) and their free slots, read the visit types open for pre-registration with their public forms. Never lists people.
agoo_pk_test_Publishable key, test modeAs above, in test mode

Admins create keys in Console → Developers → API keys and choose each key's scopes. A key is shown once. Never put a secret key in a URL, a browser or a mobile app.

Scope: people:write

Path Parameters

team_id*string

The team's ID.

Match^team_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"team_01m4r6y616e1b973vj50h0643y"

Request Body

application/json
  1. body

The fields to change.

Properties1 <= properties
name?string
Length1 <= length <= 80
site_id?|

null: every site.

Match^site_[0-7][0-9a-hjkmnp-tv-z]{25}$
lead_id?|
Match^person_[0-7][0-9a-hjkmnp-tv-z]{25}$
visitors_can_choose?boolean
archived?boolean

true archives the team; false brings it back.

member_ids?array<>

Replaces the members.

Itemsitems <= 500

Response Body

The team, as it is now.

application/json
  1. response

A team: who a visitor comes to see when it isn't one person, and who a waiting visitor is passed to.

id*TeamId

A team ID (TypeID with the team prefix).

Match^team_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"team_01m4r6y616e1b973vj50h0643y"
name*string
Lengthlength <= 80
Example"Finance"
site_id*|

The site the team is at. null: every site.

Match^site_[0-7][0-9a-hjkmnp-tv-z]{25}$
lead_id*|

The person who leads the team, if you name one.

Match^person_[0-7][0-9a-hjkmnp-tv-z]{25}$
visitors_can_choose*boolean

Visitors may choose this team at the kiosk and on your visitor pages.

archived*boolean

An archived team takes no new visits; its past visits keep its name.

members*array<>
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X PATCH 'https://api.agoo.ardent.africa/v1/teams/team_01m4r6y616e1b973vj50h0643y' \  -H 'Content-Type: application/json' \  -d '{  "visitors_can_choose": false}'
{  "id": "team_01m4r6y616e1b973vj50h0643y",  "name": "Finance",  "site_id": "string",  "lead_id": "string",  "visitors_can_choose": true,  "archived": true,  "members": [    {      "id": "person_01kjsesxm0e4zbyvkr7bcfxbfg",      "name": "string",      "job_title": "string",      "active": true    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}