# Arrange

`POST /boards/{board_id}/arrange` · Writing · server http://localhost:3000/api/v1

Send an API key with every call: `Authorization: Bearer tiko_…`. See https://docs.tiko.run/api-keys/.

The operation from the OpenAPI schema, with its schemas inlined:

```json
{
  "description": "Lays the named cards out as a grid or in columns by status, below what is on the board\nor in a frame that grows to hold them, or takes their size with `fit`. Nothing else\nmoves.",
  "security": [
    {
      "API key": []
    }
  ],
  "parameters": [
    {
      "name": "board_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "title": "Board Id"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "cards": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "maxItems": 200,
              "minItems": 1,
              "title": "Cards"
            },
            "layout": {
              "type": "string",
              "enum": [
                "grid",
                "status"
              ],
              "title": "Layout",
              "default": "grid"
            },
            "frame": {
              "anyOf": [
                {
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Id"
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Title"
                    }
                  },
                  "type": "object",
                  "title": "FrameRef",
                  "description": "An existing frame by `id`, or a new one below the board by `title`."
                },
                {
                  "type": "null"
                }
              ]
            },
            "columns": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 20,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Columns"
            },
            "order": {
              "type": "string",
              "enum": [
                "given",
                "key",
                "status"
              ],
              "title": "Order",
              "default": "given"
            },
            "fit": {
              "type": "boolean",
              "title": "Fit",
              "default": false
            }
          },
          "type": "object",
          "required": [
            "cards"
          ],
          "title": "ArrangeIn"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "elements": {
                "items": {
                  "properties": {
                    "id": {
                      "type": "string",
                      "title": "Id"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "card",
                        "note",
                        "text",
                        "code",
                        "shape",
                        "frame",
                        "arrow",
                        "image",
                        "module",
                        "timer"
                      ],
                      "title": "Kind"
                    },
                    "x": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "X"
                    },
                    "y": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Y"
                    },
                    "w": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "W"
                    },
                    "h": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "H"
                    },
                    "frame": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Frame"
                    },
                    "editable": {
                      "type": "boolean",
                      "title": "Editable",
                      "default": false
                    },
                    "text": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Text"
                    },
                    "title": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Title"
                    },
                    "color": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Color"
                    },
                    "bold": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Bold"
                    },
                    "size": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Size"
                    },
                    "opacity": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Opacity"
                    },
                    "rotation": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Rotation"
                    },
                    "stroke": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Stroke"
                    },
                    "dash": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Dash"
                    },
                    "shape": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Shape"
                    },
                    "language": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Language"
                    },
                    "collapsed": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Collapsed"
                    },
                    "numbered": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Numbered"
                    },
                    "marked": {
                      "anyOf": [
                        {
                          "items": {
                            "type": "integer"
                          },
                          "type": "array"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Marked"
                    },
                    "module": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Module"
                    },
                    "source": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Source"
                    },
                    "key": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Key"
                    },
                    "task": {
                      "anyOf": [
                        {
                          "properties": {
                            "title": {
                              "type": "string",
                              "title": "Title"
                            },
                            "status": {
                              "type": "string",
                              "title": "Status"
                            },
                            "assignee": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "title": "Assignee"
                            },
                            "due": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "title": "Due"
                            },
                            "url": {
                              "type": "string",
                              "title": "Url"
                            },
                            "fetched_at": {
                              "type": "string",
                              "title": "Fetched At"
                            }
                          },
                          "type": "object",
                          "required": [
                            "title",
                            "status",
                            "assignee",
                            "due",
                            "url",
                            "fetched_at"
                          ],
                          "title": "TaskOut"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "from": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "From"
                    },
                    "to": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "To"
                    },
                    "label": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Label"
                    },
                    "note": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Note"
                    },
                    "due_at": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Due At"
                    },
                    "repeat": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Repeat"
                    },
                    "watch": {
                      "anyOf": [
                        {
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Watch"
                    },
                    "done": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Done"
                    },
                    "attached_to": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Attached To"
                    },
                    "status": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "title": "Status"
                    }
                  },
                  "type": "object",
                  "required": [
                    "id",
                    "kind"
                  ],
                  "title": "Element",
                  "description": "One element; fields that do not belong to its kind are left out of the answer."
                },
                "type": "array",
                "title": "Elements"
              },
              "created": {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "title": "Created"
              }
            },
            "type": "object",
            "required": [
              "elements",
              "created"
            ],
            "title": "Written"
          }
        }
      }
    },
    "401": {
      "description": "No key, or a key that stopped working",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "403": {
      "description": "The key may not do this, or keys are switched off",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "404": {
      "description": "Not found, or not among what the key reaches",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "422": {
      "description": "The request does not match the schema",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    },
    "429": {
      "description": "Over a budget; see Retry-After",
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  }
                },
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "title": "ErrorDetail"
              }
            },
            "type": "object",
            "required": [
              "error"
            ],
            "title": "Error",
            "description": "Every error of v1; clients must ignore codes they do not know."
          }
        }
      }
    }
  }
}
```
