Skip to content
Connect an agent

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}/security

TL;DR

QuestionAnswer
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

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Request body

The body has the type SetOrgSecurityBody.

FieldTypeRequiredDescription
requireTwoFactorbooleanyes

Responses

StatusMeaningBody
200The organisation's security now.OrgSecurity
400The body is not valid.ErrorResponse
401Not signed in.ErrorResponse
403Only the owner or an admin may (orgs.forbidden), or the origin may not make changes.ErrorResponse
404No such organisation, or the caller is not a member of it.ErrorResponse
409The caller does not have two-step sign-in on (orgs.two_factor_self).ErrorResponse
429Too many requests.ErrorResponse

Response body

A 200 answer has the type OrgSecurity.

FieldTypeRequiredDescription
requireTwoFactorbooleanyesWhether every member must have two-step sign-in on to use the organisation.
sinceinteger | nullyesWhen it was turned on, in milliseconds since the epoch, or null.
canManagebooleanyesWhether the caller may change it: the owner and the admins.
membersobjectyes
members.totalintegeryes
members.withTwoFactorintegeryes
withoutobject[]yesThe members without two-step sign-in, for the owner and the admins; empty for anyone else. At most 200.
without[].userIdstringyes
without[].emailstringyes
without[].namestring | nullyes
without[].rolestringyes
without[].remindedAtinteger | nullyes

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools