# Choose your default organisation for publishing

> Page: https://docs.plotwork.dev/api/put-user-publishing. Index of every page: https://docs.plotwork.dev/llms.txt

The organisation that takes a publish naming none when several claim it, or none with null.

`PUT /user/publishing`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Choose your default organisation for publishing. |
| What does it take? | A JSON body of type [`SetUserPublishingBody`](https://docs.plotwork.dev/api/schemas.md#setuserpublishingbody). |
| What does it return? | Status 200 with a body of type [`UserPublishing`](https://docs.plotwork.dev/api/schemas.md#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`](https://docs.plotwork.dev/api/schemas.md#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`](https://docs.plotwork.dev/api/schemas.md#userpublishing) |
| 400 | The body is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | The account is a reader there (orgs.forbidden), or the request came from an origin that may not make changes. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, or the account is not a member of it. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`UserPublishing`](https://docs.plotwork.dev/api/schemas.md#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](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
