# net.nusno.gyoka.feed.putPosts

> Replace posts and assign them new order ranks in one feed.

- Kind: procedure
- Authority: feed.gyoka.nusno.net
- Lexicon: 1
- Published by [nusno.net](https://lexicon.garden/identity/did:plc:gjkxkrudpqumaiiytxodmpaj), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:gjkxkrudpqumaiiytxodmpaj/net.nusno.gyoka.feed.putPosts)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:gjkxkrudpqumaiiytxodmpaj/net.nusno.gyoka.feed.putPosts/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:gjkxkrudpqumaiiytxodmpaj/net.nusno.gyoka.feed.putPosts/analytics)

## Procedure (`net.nusno.gyoka.feed.putPosts`)

Type: procedure · POST

### Input (application/json)

- `feed` (string · at-uri, required)
- `placement` (ref): Placement for the submitted post URIs. Defaults to append.
  - Reference: `net.nusno.gyoka.feed.defs#placement`
- `posts` (array, required)
  - Constraints: minLength: 1, maxLength: 1000
  - `items` (ref)
    - Reference: `net.nusno.gyoka.feed.defs#postInput`

### Output (application/json)

- `feed` (string · at-uri, required)
- `orderRevision` (integer, required)
  - Constraints: minimum: 0

### Errors

- `AuthenticationRequired`: Returned when service authentication is required and the caller is not authenticated.
- `Forbidden`: Returned when the authenticated caller is not in the admin allowlist.
- `BadRequest`: Returned when request structure, placement, or post input is invalid.
- `UnknownFeed`: Returned when the target feed URI is not registered.
- `InternalServerError`: Returned when posts cannot be stored.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Replace posts and assign them new order ranks in one feed.",
      "errors": [
        {
          "description": "Returned when service authentication is required and the caller is not authenticated.",
          "name": "AuthenticationRequired"
        },
        {
          "description": "Returned when the authenticated caller is not in the admin allowlist.",
          "name": "Forbidden"
        },
        {
          "description": "Returned when request structure, placement, or post input is invalid.",
          "name": "BadRequest"
        },
        {
          "description": "Returned when the target feed URI is not registered.",
          "name": "UnknownFeed"
        },
        {
          "description": "Returned when posts cannot be stored.",
          "name": "InternalServerError"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "feed": {
              "format": "at-uri",
              "type": "string"
            },
            "placement": {
              "description": "Placement for the submitted post URIs. Defaults to append.",
              "ref": "net.nusno.gyoka.feed.defs#placement",
              "type": "ref"
            },
            "posts": {
              "items": {
                "ref": "net.nusno.gyoka.feed.defs#postInput",
                "type": "ref"
              },
              "maxLength": 1000,
              "minLength": 1,
              "type": "array"
            }
          },
          "required": [
            "feed",
            "posts"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "feed": {
              "format": "at-uri",
              "type": "string"
            },
            "orderRevision": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "feed",
            "orderRevision"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "net.nusno.gyoka.feed.putPosts",
  "lexicon": 1
}
```
