Skip to content
Connect an agent

Organisations

Set an organisation's approval settings

"Publishing needs approval" (off, chosen folders, or all) holds a publish by anyone who is not an approver until an approver decides; "Public sharing needs approval" holds a public link.

PUT/orgs/{org}/approval

TL;DR

QuestionAnswer
What does it do?Set an organisation's approval settings.
What does it take?A JSON body of type SetOrganisationApprovalBody.
What does it return?Status 200 with a body of type OrganisationApproval.
What can go wrong?400 the body is not valid; 401 not signed in; 403 only the owner or an admin may change them (orgs.forbidden), or the request came from an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 422 a folder cannot be used, no folder was chosen for folders, or someone chosen is not a member with the member role (validation.failed); 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

"Publishing needs approval" (off, chosen folders, or all) holds a publish by anyone who is not an approver until an approver decides; "Public sharing needs approval" holds a public link. The owner and admins approve, and the members chosen here. The owner or an admin.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Request body

The body has the type SetOrganisationApprovalBody.

FieldTypeRequiredDescription
publish"off" | "folders" | "all"yes
foldersstring[]yes
sharebooleanyes
holdKeysbooleannoOnly the owner may change it; left out, it stays as it is.
approversstring[]yesAccount ids of members with the member role, at most 50.

Responses

StatusMeaningBody
200The settings now.OrganisationApproval
400The body is not valid.ErrorResponse
401Not signed in.ErrorResponse
403Only the owner or an admin may change them (orgs.forbidden), or the request came from an origin that may not make changes.ErrorResponse
404No such organisation, or the caller is not a member of it.ErrorResponse
422A folder cannot be used, no folder was chosen for folders, or someone chosen is not a member with the member role (validation.failed).ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type OrganisationApproval.

FieldTypeRequiredDescription
publish"off" | "folders" | "all"yes
foldersstring[]yesThe folders "Publishing needs approval" covers when it is folders.
sharebooleanyes
holdKeysbooleanyes"Hold organisation keys for approval too": while false, a publish or a new version made with an organisation key from the Keys tab goes in directly. An agent connection is held as its person is. The owner's setting.
approversarray | nullyesThe members chosen to approve besides the owner and the admins. Null for a caller who may not manage them.

See also

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