{
  "openapi": "3.0.4",
  "info": {
    "title": "Workiom REST API",
    "version": "v1"
  },
  "paths": {
    "/api/v1/activity-log": {
      "get": {
        "tags": [
          "ActivityLog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicActivityLogDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicActivityLogDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicActivityLogDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{listId}/records/{recordId}/comments": {
      "get": {
        "tags": [
          "Comments"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDtoPublicPageDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDtoPublicPageDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDtoPublicPageDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Comments"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{listId}/records/{recordId}/comments/{commentId}/replies": {
      "post": {
        "tags": [
          "Comments"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCommentDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/uploadUrl": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FileDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/files/confirm": {
      "post": {
        "tags": [
          "Files"
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FileDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{listId}/records/{recordId}/activity": {
      "get": {
        "tags": [
          "RecordActivity"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicActivityEntryDtoPublicPageDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicActivityEntryDtoPublicPageDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicActivityEntryDtoPublicPageDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{listId}/records": {
      "get": {
        "tags": [
          "Records"
        ],
        "description": "Records keyed by field name.\n\n**Filter** with `f_<Field>[<operator>]=<value>`, for example `f_Amount[greater_than]=100`. Leaving out `[<operator>]` means `equals`. Operators: `equals`, `not_equals`, `contains`, `greater_than`, `greater_than_or_equals`, `less_than`, `less_than_or_equals`. Repeat a filter to add another.\n\n**Sort** with `sort[asc]=<Field>` or `sort[desc]=<Field>`; repeat for more fields.\n\nField names are matched case-insensitively. A name that does not exist returns `FIELD_NOT_FOUND` with the closest name in `context.suggestion`.",
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Records per page, 1 to 1000. Default 100.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Records to skip. Default 0.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/JObjectPublicPageDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JObjectPublicPageDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/JObjectPublicPageDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBulkDeleteResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBulkDeleteResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBulkDeleteResultDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lists/{listId}/records/{recordId}": {
      "get": {
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": { }
              },
              "application/json": {
                "schema": { }
              },
              "text/json": {
                "schema": { }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/api/v1/lists/{listId}/records/bulk": {
      "post": {
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": { }
            },
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBulkCreateResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBulkCreateResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBulkCreateResultDto"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FileDto": {
        "required": [
          "fileName",
          "fileToken"
        ],
        "type": "object",
        "properties": {
          "fileName": {
            "minLength": 1,
            "type": "string"
          },
          "fileType": {
            "type": "string",
            "nullable": true
          },
          "fileToken": {
            "minLength": 1,
            "type": "string"
          },
          "hasThumbnail": {
            "type": "boolean"
          },
          "fileUrl": {
            "type": "string",
            "nullable": true
          },
          "thumbnailUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "JObjectPublicPageDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PublicActivityActorDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicActivityChangeDto": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "nullable": true
          },
          "from": {
            "nullable": true
          },
          "to": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicActivityEntryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "actor": {
            "$ref": "#/components/schemas/PublicActivityActorDto"
          },
          "action": {
            "type": "string",
            "nullable": true
          },
          "area": {
            "type": "string",
            "nullable": true
          },
          "app": {
            "$ref": "#/components/schemas/PublicActivityRefDto"
          },
          "list": {
            "$ref": "#/components/schemas/PublicActivityRefDto"
          },
          "record": {
            "$ref": "#/components/schemas/PublicActivityRefDto"
          },
          "item": {
            "$ref": "#/components/schemas/PublicActivityRefDto"
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicActivityChangeDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicActivityEntryDtoPublicPageDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicActivityEntryDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PublicActivityLogDto": {
        "type": "object",
        "properties": {
          "scope": {
            "$ref": "#/components/schemas/PublicActivityScopeDto"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicActivityEntryDto"
            },
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicActivityRefDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicActivityScopeDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "app": {
            "$ref": "#/components/schemas/PublicActivityRefDto"
          }
        },
        "additionalProperties": false
      },
      "PublicAttachmentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "isImage": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "thumbnailUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicBulkCreateFailureDto": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicBulkCreateResultDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": { },
            "nullable": true
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicBulkCreateFailureDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicBulkDeleteFailureDto": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicBulkDeleteResultDto": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicBulkDeleteFailureDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicCommentAuthorDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicCommentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "parentId": {
            "type": "string",
            "nullable": true
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "author": {
            "$ref": "#/components/schemas/PublicCommentAuthorDto"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "edited": {
            "type": "boolean"
          },
          "mentions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicMentionDto"
            },
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicAttachmentDto"
            },
            "nullable": true
          },
          "replies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicCommentDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicCommentDtoPublicPageDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicCommentDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PublicMentionDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "Your Workiom API key. Requests act with the permissions of the user who owns it.",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ]
}