Organisations
Choose your default organisation for publishing
The organisation that takes a publish naming none when several claim it, or none with null.
PUT
/user/publishingTL;DR
| Question | Answer |
|---|---|
| What does it do? | Choose your default organisation for publishing. |
| What does it take? | A JSON body of type SetUserPublishingBody. |
| What does it return? | Status 200 with a body of type UserPublishing. |
| What can go wrong? | 400 the body is not valid; 401 not signed in; 403 the account is a reader there (orgs.forbidden), or the request came from an origin that may not make changes; 404 no such organisation, or the account is not a member of it; 429 too many requests. Every failure uses the one error envelope. |
What it does
The organisation that takes a publish naming none when several claim it, or none with null. The account must be a member who may publish there.
Request body
The body has the type SetUserPublishingBody.
| Field | Type | Required | Description |
|---|---|---|---|
defaultOrganization | string | null | yes | An organisation's slug or id, or null for none. The person must be a member who may publish there. at least 1 character; at most 64 characters. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Where publishes go now. | UserPublishing |
| 400 | The body is not valid. | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | The account is a reader there (orgs.forbidden), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the account is not a member of it. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
Response body
A 200 answer has the type UserPublishing.
| Field | Type | Required | Description |
|---|---|---|---|
defaultOrganization | any | yes | |
defaultOrganization.id | string | yes | |
defaultOrganization.slug | string | yes | |
defaultOrganization.name | string | yes | |
organizations | PublishingClaim[] | yes | The organisations whose Publishing setting claims the person's publishes, by name. |
organizations[].id | string | yes | |
organizations[].slug | string | yes | |
organizations[].name | string | yes | |
organizations[].policy | "organisation-default" | "organisation-required" | yes | What it enforces: its library by default, or its library always. |
organizations[].via | "member" | "domain" | yes | member when the person belongs to it; domain when it verified the domain of their address and they have not joined. |
organizations[].canPublish | boolean | yes | Whether the person may publish to its library: a member who is not a reader. |
target | PublishTarget | yes | personal, the organisation it goes to and why, choose (several claim it and none is the default), or refused. |
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 |