{
  "openapi": "3.1.0",
  "info": {
    "title": "Share & Monique integrations",
    "version": "2026-10-04",
    "description": "Scoped app API. All mutations require POST JSON. New bundles are private. Existing unversioned browser endpoints remain compatible."
  },
  "servers": [
    {
      "url": "https://share.inklura.fr"
    }
  ],
  "security": [
    {
      "AppToken": []
    }
  ],
  "paths": {
    "/api/v1/artifacts": {
      "post": {
        "operationId": "artifactsAction",
        "summary": "Publish and read immutable deliverable bundles",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "list"
                      },
                      "query": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "project": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "cursor": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      },
                      "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      }
                    },
                    "required": [
                      "action"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "get"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      }
                    },
                    "required": [
                      "action",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "read"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      },
                      "version": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "path": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 240
                      },
                      "index": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "action",
                      "id",
                      "version",
                      "path",
                      "index"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "begin"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "idempotency_key": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      },
                      "project": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "trace_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      "entry": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 240
                      },
                      "note": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "files": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 400,
                        "items": {
                          "type": "object",
                          "properties": {
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 240
                            },
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "bytes": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 134217728
                            }
                          },
                          "required": [
                            "path",
                            "bytes"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "action",
                      "idempotency_key",
                      "files"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "chunk"
                      },
                      "draft_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      },
                      "path": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 240
                      },
                      "index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "content_base64": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2097152
                      }
                    },
                    "required": [
                      "action",
                      "draft_id",
                      "path",
                      "index",
                      "content_base64"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "commit"
                      },
                      "draft_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      }
                    },
                    "required": [
                      "action",
                      "draft_id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "update"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "visibility": {
                        "enum": [
                          "private",
                          "public"
                        ]
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      }
                    },
                    "required": [
                      "action",
                      "id",
                      "revision"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "delete"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      },
                      "revision": {
                        "type": "integer",
                        "minimum": 1
                      }
                    },
                    "required": [
                      "action",
                      "id",
                      "revision"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; see developer guide for envelopes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or project denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found within the grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, idempotency or lifecycle conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/jobs": {
      "post": {
        "operationId": "jobsAction",
        "summary": "Create and track durable Monique revision jobs",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "submit"
                      },
                      "idempotency_key": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "prompt": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8000
                      },
                      "project": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      "artifact_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 24,
                        "pattern": "^[A-Za-z0-9_-]{24}$"
                      },
                      "version": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "path": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 240
                      },
                      "trace_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      }
                    },
                    "required": [
                      "action",
                      "idempotency_key",
                      "prompt",
                      "project"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "get"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32,
                        "pattern": "^[a-f0-9]{32}$"
                      }
                    },
                    "required": [
                      "action",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "cancel"
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32,
                        "pattern": "^[a-f0-9]{32}$"
                      }
                    },
                    "required": [
                      "action",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "list"
                      }
                    },
                    "required": [
                      "action"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; see developer guide for envelopes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or project denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found within the grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, idempotency or lifecycle conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/events": {
      "post": {
        "operationId": "eventsAction",
        "summary": "Read the ordered integration event feed",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "action": {
                        "const": "list"
                      },
                      "cursor": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      }
                    },
                    "required": [
                      "action"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation; see developer guide for envelopes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Scope or project denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found within the grant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Revision, idempotency or lifecycle conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Create an app key in Monique Settings \u2192 Applications & API. Keys expire and are project- and permission-scoped."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "request_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "required": [
              "code",
              "request_id",
              "retryable"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  },
  "externalDocs": {
    "url": "https://share.inklura.fr/developers"
  }
}
