# Post author and tag assignments

Assign authors and tags when saving a post. The post API stores ordered UUID
lists, while public read responses expose only each relation's `slug` and
`name`.

## Authentication

`POST /post/save` requires a bearer token with `post.save` in the selected
publication. The caller must also have access to every referenced author and
tag through that publication boundary.

## Request fields

| Field | Required | Type | Description |
| --- | --- | --- | --- |
| `post_id` | Yes for an existing post | UUID | Existing post to update. |
| `publication_id` / `publication_slug` | Required when creating | UUID / String | Selects the publication. |
| `author_ids` | No | UUID array | Ordered complete replacement of the post's author assignments. |
| `tag_ids` | No | UUID array | Ordered complete replacement of the post's tag assignments. |

Omit a relation field to keep the existing assignments. Send an empty array to
remove every assignment of that type. Every UUID must identify a record in the
post's publication; unknown or cross-publication IDs are rejected.

```bash
curl -sS https://api.blog.service.m7.org/v1/post/save \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "post_id":"POST_UUID",
    "author_ids":["AUTHOR_UUID_1","AUTHOR_UUID_2"],
    "tag_ids":["TAG_UUID_1","TAG_UUID_2"]
  }'
```

The saved management post exposes `author_ids` and `tag_ids`. Public post
summaries, previews, and reads expose these fields instead:

```json
{
  "authors": [{ "slug": "ada-lovelace", "name": "Ada Lovelace" }],
  "tags": [{ "slug": "release-notes", "name": "Release Notes" }]
}
```

An author or tag cannot be deleted while it remains assigned to a post. Use an
updated post save request first, then retry the deletion.
