Organisations
Require two-step sign-in for every member, or stop
On, a member whose account does not have two-step sign-in on cannot use the organisation until they turn it on; nobody is removed.
PUT
/orgs/{org}/securityTL;DR
| Question | Answer |
|---|---|
| What does it do? | Require two-step sign-in for every member, or stop. |
| What does it take? | A JSON body of type SetOrgSecurityBody. |
| What does it return? | Status 200 with a body of type OrgSecurity. |
| What can go wrong? | 400 the body is not valid; 401 not signed in; 403 only the owner or an admin may (orgs.forbidden), or the origin may not make changes; 404 no such organisation, or the caller is not a member of it; 409 the caller does not have two-step sign-in on (orgs.two_factor_self); 429 too many requests. Every failure uses the one error envelope. |
What it does
On, a member whose account does not have two-step sign-in on cannot use the organisation until they turn it on; nobody is removed. Owner and admins only. Refused for a person without it themselves.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Request body
The body has the type SetOrgSecurityBody.
| Field | Type | Required | Description |
|---|---|---|---|
requireTwoFactor | boolean | yes |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The organisation's security now. | OrgSecurity |
| 400 | The body is not valid. | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | Only the owner or an admin may (orgs.forbidden), or the origin may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 409 | The caller does not have two-step sign-in on (orgs.two_factor_self). | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
Response body
A 200 answer has the type OrgSecurity.
| Field | Type | Required | Description |
|---|---|---|---|
requireTwoFactor | boolean | yes | Whether every member must have two-step sign-in on to use the organisation. |
since | integer | null | yes | When it was turned on, in milliseconds since the epoch, or null. |
canManage | boolean | yes | Whether the caller may change it: the owner and the admins. |
members | object | yes | |
members.total | integer | yes | |
members.withTwoFactor | integer | yes | |
without | object[] | yes | The members without two-step sign-in, for the owner and the admins; empty for anyone else. At most 200. |
without[].userId | string | yes | |
without[].email | string | yes | |
without[].name | string | null | yes | |
without[].role | string | yes | |
without[].remindedAt | integer | null | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |