URSY.DEVPART OF THE URSY NETWORKSign inBuild with URSY

Every contract sourcedEvery check datedGaps shown, never filledBuild with URSY

Endpoints

propose_file_edit

Preview typed edits bound to the current ETag; does not alter the file.

POST/v1/files/{file_id}/edit-plansv1.8.3

Request

Authentication is required by the published contract.

CURL
curl -X POST 'https://api.ursy.cloud/v1/files/{file_id}/edit-plans' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_SERVICE_TOKEN'
Scopes
Not specified by this operation
Execution
At the owning service
Risk classification
not declared

Parameters

file_id path · string required

See the accepted schema for constraints.

If-Match header · string required

See the accepted schema for constraints.

Idempotency-Key header · string required

See the accepted schema for constraints.

This operation is documented here. Use the owning service with the appropriate credentials and permissions to execute it.

Response schemas and request body
CONTRACT JSON
{
    "requestBody": {
        "required": true,
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                        "operations": {
                            "type": "array",
                            "minItems": 1,
                            "maxItems": 50,
                            "items": {
                                "oneOf": [
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "insert_block"
                                                ]
                                            },
                                            "block": {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "enum": [
                                                            "paragraph",
                                                            "heading1",
                                                            "heading2",
                                                            "bullet",
                                                            "number",
                                                            "quote",
                                                            "divider",
                                                            "table"
                                                        ]
                                                    },
                                                    "segments": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "additionalProperties": false,
                                                            "properties": {
                                                                "text": {
                                                                    "type": "string",
                                                                    "maxLength": 10000,
                                                                    "x-ursy-maxBytes": 10000
                                                                },
                                                                "bold": {
                                                                    "type": "boolean"
                                                                },
                                                                "italic": {
                                                                    "type": "boolean"
                                                                },
                                                                "underline": {
                                                                    "type": "boolean"
                                                                },
                                                                "link": {
                                                                    "type": "string",
                                                                    "maxLength": 2048,
                                                                    "pattern": "^(https?://|mailto:)"
                                                                }
                                                            },
                                                            "required": [
                                                                "text"
                                                            ]
                                                        },
                                                        "minItems": 0,
                                                        "maxItems": 100
                                                    },
                                                    "rows": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "additionalProperties": false,
                                                                    "properties": {
                                                                        "text": {
                                                                            "type": "string",
                                                                            "maxLength": 10000,
                                                                            "x-ursy-maxBytes": 10000
                                                                        },
                                                                        "bold": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "italic": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "underline": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "link": {
                                                                            "type": "string",
                                                                            "maxLength": 2048,
                                                                            "pattern": "^(https?://|mailto:)"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "text"
                                                                    ]
                                                                },
                                                                "minItems": 0,
                                                                "maxItems": 100
                                                            },
                                                            "minItems": 1,
                                                            "maxItems": 26
                                                        },
                                                        "minItems": 1,
                                                        "maxItems": 100
                                                    }
                                                },
                                                "required": [
                                                    "type",
                                                    "segments"
                                                ],
                                                "description": "IDs are stable and unique. A divider has no segments. Table rows require an empty segments array; each cell is a segment list. Combined text is limited to 750000 bytes."
                                            },
                                            "after_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "block"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "replace_block"
                                                ]
                                            },
                                            "block_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            },
                                            "block": {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "enum": [
                                                            "paragraph",
                                                            "heading1",
                                                            "heading2",
                                                            "bullet",
                                                            "number",
                                                            "quote",
                                                            "divider",
                                                            "table"
                                                        ]
                                                    },
                                                    "segments": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "additionalProperties": false,
                                                            "properties": {
                                                                "text": {
                                                                    "type": "string",
                                                                    "maxLength": 10000,
                                                                    "x-ursy-maxBytes": 10000
                                                                },
                                                                "bold": {
                                                                    "type": "boolean"
                                                                },
                                                                "italic": {
                                                                    "type": "boolean"
                                                                },
                                                                "underline": {
                                                                    "type": "boolean"
                                                                },
                                                                "link": {
                                                                    "type": "string",
                                                                    "maxLength": 2048,
                                                                    "pattern": "^(https?://|mailto:)"
                                                                }
                                                            },
                                                            "required": [
                                                                "text"
                                                            ]
                                                        },
                                                        "minItems": 0,
                                                        "maxItems": 100
                                                    },
                                                    "rows": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "additionalProperties": false,
                                                                    "properties": {
                                                                        "text": {
                                                                            "type": "string",
                                                                            "maxLength": 10000,
                                                                            "x-ursy-maxBytes": 10000
                                                                        },
                                                                        "bold": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "italic": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "underline": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "link": {
                                                                            "type": "string",
                                                                            "maxLength": 2048,
                                                                            "pattern": "^(https?://|mailto:)"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "text"
                                                                    ]
                                                                },
                                                                "minItems": 0,
                                                                "maxItems": 100
                                                            },
                                                            "minItems": 1,
                                                            "maxItems": 26
                                                        },
                                                        "minItems": 1,
                                                        "maxItems": 100
                                                    }
                                                },
                                                "required": [
                                                    "type",
                                                    "segments"
                                                ],
                                                "description": "IDs are stable and unique. A divider has no segments. Table rows require an empty segments array; each cell is a segment list. Combined text is limited to 750000 bytes."
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "block_id",
                                            "block"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "delete_block"
                                                ]
                                            },
                                            "block_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "block_id"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "replace_text"
                                                ]
                                            },
                                            "block_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            },
                                            "find": {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 10000
                                            },
                                            "replace": {
                                                "type": "string",
                                                "maxLength": 10000,
                                                "x-ursy-maxBytes": 10000
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "block_id",
                                            "find",
                                            "replace"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "set_note"
                                                ]
                                            },
                                            "content": {
                                                "type": "string",
                                                "maxLength": 500000,
                                                "x-ursy-maxBytes": 500000
                                            },
                                            "tags": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string",
                                                    "maxLength": 40,
                                                    "x-ursy-maxBytes": 40
                                                },
                                                "minItems": 0,
                                                "maxItems": 20
                                            }
                                        },
                                        "required": [
                                            "op"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "set_values"
                                                ]
                                            },
                                            "sheet_index": {
                                                "type": "integer",
                                                "minimum": 0,
                                                "maximum": 9
                                            },
                                            "range": {
                                                "type": "string",
                                                "pattern": "^[A-Z]{1,2}[1-9][0-9]{0,3}(:[A-Z]{1,2}[1-9][0-9]{0,3})?$"
                                            },
                                            "values": {
                                                "type": "array",
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "maxLength": 10000,
                                                        "x-ursy-maxBytes": 10000
                                                    },
                                                    "minItems": 1,
                                                    "maxItems": 64
                                                },
                                                "minItems": 1,
                                                "maxItems": 1000
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "range",
                                            "values"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "add_slide"
                                                ]
                                            },
                                            "slide": {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "maxLength": 200,
                                                        "x-ursy-maxBytes": 200
                                                    },
                                                    "body": {
                                                        "type": "string",
                                                        "maxLength": 10000,
                                                        "x-ursy-maxBytes": 10000
                                                    },
                                                    "notes": {
                                                        "type": "string",
                                                        "maxLength": 5000,
                                                        "x-ursy-maxBytes": 5000
                                                    },
                                                    "layout": {
                                                        "type": "string",
                                                        "enum": [
                                                            "title",
                                                            "title-body",
                                                            "quote",
                                                            "blank"
                                                        ]
                                                    },
                                                    "background": {
                                                        "type": "string",
                                                        "enum": [
                                                            "ink",
                                                            "ocean",
                                                            "plum",
                                                            "forest",
                                                            "sunrise",
                                                            "paper"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "title",
                                                    "body",
                                                    "notes",
                                                    "layout",
                                                    "background"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "slide"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "replace_slide"
                                                ]
                                            },
                                            "slide_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            },
                                            "slide": {
                                                "type": "object",
                                                "additionalProperties": false,
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "maxLength": 200,
                                                        "x-ursy-maxBytes": 200
                                                    },
                                                    "body": {
                                                        "type": "string",
                                                        "maxLength": 10000,
                                                        "x-ursy-maxBytes": 10000
                                                    },
                                                    "notes": {
                                                        "type": "string",
                                                        "maxLength": 5000,
                                                        "x-ursy-maxBytes": 5000
                                                    },
                                                    "layout": {
                                                        "type": "string",
                                                        "enum": [
                                                            "title",
                                                            "title-body",
                                                            "quote",
                                                            "blank"
                                                        ]
                                                    },
                                                    "background": {
                                                        "type": "string",
                                                        "enum": [
                                                            "ink",
                                                            "ocean",
                                                            "plum",
                                                            "forest",
                                                            "sunrise",
                                                            "paper"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "title",
                                                    "body",
                                                    "notes",
                                                    "layout",
                                                    "background"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "slide_id",
                                            "slide"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "delete_slide"
                                                ]
                                            },
                                            "slide_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "slide_id"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "properties": {
                                            "op": {
                                                "type": "string",
                                                "enum": [
                                                    "set_publication_text"
                                                ]
                                            },
                                            "page_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            },
                                            "element_id": {
                                                "type": "string",
                                                "pattern": "^[A-Za-z0-9_-]{1,64}$"
                                            },
                                            "text": {
                                                "type": "string",
                                                "maxLength": 10000,
                                                "x-ursy-maxBytes": 10000
                                            }
                                        },
                                        "required": [
                                            "op",
                                            "page_id",
                                            "element_id",
                                            "text"
                                        ]
                                    }
                                ]
                            }
                        },
                        "summary": {
                            "type": "string",
                            "maxLength": 240,
                            "x-ursy-maxBytes": 240
                        }
                    },
                    "required": [
                        "operations",
                        "summary"
                    ]
                }
            }
        }
    },
    "responses": {
        "200": {
            "description": "Typed operation result; request_id correlates the request.",
            "content": {
                "application/json": {
                    "schema": {
                        "type": "object",
                        "additionalProperties": true,
                        "properties": {
                            "file": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "schema": {
                                        "type": "string",
                                        "enum": [
                                            "ursy.cloud/file/v1"
                                        ]
                                    },
                                    "id": {
                                        "type": "string",
                                        "pattern": "^file_[1-9][0-9]{0,14}$"
                                    },
                                    "workspace_id": {
                                        "type": "string",
                                        "pattern": "^ws_[1-9][0-9]*$"
                                    },
                                    "parent_id": {
                                        "oneOf": [
                                            {
                                                "type": "string",
                                                "pattern": "^file_[1-9][0-9]{0,14}$"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 190,
                                        "x-ursy-maxBytes": 190
                                    },
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "folder",
                                            "document",
                                            "spreadsheet",
                                            "presentation",
                                            "note",
                                            "publication",
                                            "pdf",
                                            "uploaded_file"
                                        ]
                                    },
                                    "current_version_id": {
                                        "oneOf": [
                                            {
                                                "type": "string",
                                                "pattern": "^ver_[1-9][0-9]*$"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "etag": {
                                        "type": "string",
                                        "pattern": "^\"[a-f0-9]{64}\"$"
                                    },
                                    "state": {
                                        "type": "string",
                                        "enum": [
                                            "active",
                                            "trashed"
                                        ]
                                    },
                                    "created_at": {
                                        "type": "string"
                                    },
                                    "updated_at": {
                                        "type": "string"
                                    },
                                    "human_url": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "schema",
                                    "id",
                                    "workspace_id",
                                    "parent_id",
                                    "name",
                                    "type",
                                    "current_version_id",
                                    "etag",
                                    "state",
                                    "created_at",
                                    "updated_at",
                                    "human_url"
                                ]
                            },
                            "plan": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "pattern": "^plan_[a-f0-9]{32}$"
                                    },
                                    "file_id": {
                                        "type": "string",
                                        "pattern": "^file_[1-9][0-9]{0,14}$"
                                    },
                                    "base_etag": {
                                        "type": "string"
                                    },
                                    "summary": {
                                        "type": "string"
                                    },
                                    "operations": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "additionalProperties": true
                                        }
                                    },
                                    "proposed_content": {
                                        "type": "object",
                                        "additionalProperties": true
                                    },
                                    "expires_at": {
                                        "type": "string"
                                    },
                                    "applied_version_id": {
                                        "oneOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    },
                                    "requires_confirmation": {
                                        "type": "boolean"
                                    },
                                    "review_status": {
                                        "type": "string",
                                        "enum": [
                                            "pending",
                                            "approved",
                                            "rejected"
                                        ]
                                    },
                                    "approval_url": {
                                        "type": "string"
                                    },
                                    "actor": {
                                        "type": "object",
                                        "additionalProperties": true
                                    }
                                },
                                "required": [
                                    "id",
                                    "file_id",
                                    "base_etag",
                                    "summary",
                                    "operations",
                                    "proposed_content",
                                    "expires_at"
                                ]
                            },
                            "request_id": {
                                "type": "string"
                            },
                            "replayed": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "file",
                            "plan"
                        ]
                    }
                }
            }
        },
        "default": {
            "description": "Stable error envelope. 401 invalid/expired/revoked grant; 403 missing scope; 404 unavailable resource; 409 plan/idempotency conflict; 412 stale ETag; 413 size/quota; 429 rate limit.",
            "content": {
                "application/json": {
                    "schema": {
                        "$ref": "#/components/schemas/Error"
                    }
                }
            }
        }
    }
}