openapi: 3.0.0 info: title: Craftnote API description: API to manage projects, files and users in Craftnote. contact: name: myCraftnote Digital GmbH url: https://www.craftnote.de email: schnittstelle@craftnote.de license: name: proprietary version: 1.3.0 servers: - url: https://europe-west1-craftnote-live.cloudfunctions.net/api/v1 security: - ApiKeyAuth: [] paths: /company/members: get: tags: - Company Members description: List employees of the company associated with the API key. parameters: - $ref: "#/components/parameters/paginationMode" - $ref: "#/components/parameters/paginationOffset" - $ref: "#/components/parameters/paginationLimit" - $ref: "#/components/parameters/paginationStartAfter" responses: 200: description: List returned successfully content: application/json: schema: $ref: "#/components/schemas/MembersList" 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' /company/settings: get: tags: - Company Settings description: Returns the company settings. responses: 200: description: Company settings returned succesfully content: application/json: schema: $ref: "#/components/schemas/CompanySetting" 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' /company/settings/projectstatus: get: tags: - Project Status description: Lists all defined project statuses. responses: 200: description: List returned successfully content: application/json: schema: $ref: "#/components/schemas/ProjectStatusList" 401: $ref: '#/components/responses/NotAuthenticated' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' /company/settings/projectstatus/{statusId}: get: tags: - Project Status description: Retrieves an individual project status. parameters: - name: statusId in: path description: ID of the project status required: true schema: type: string responses: 200: description: Status returned successfully content: application/json: schema: $ref: "#/components/schemas/ProjectStatus" 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' post: tags: - Project Status description: Creates a new project status. parameters: - name: statusId in: path description: ID of the project status required: true schema: type: string - name: insertAfter in: query description: Per default the newly created project status gets inserted at the beginning of the list. Using this parameter the status can get inserted after any existing status by setting this parameter to the ID of the existing status. required: false schema: type: string responses: 200: description: Status created successfully content: application/json: schema: $ref: "#/components/schemas/CreateProjectStatus" 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' patch: tags: - Project Status description: Updates an existing project status. parameters: - name: statusId in: path description: ID of the project status required: true schema: type: string responses: 200: description: Status updated successfully content: application/json: schema: $ref: "#/components/schemas/UpdateProjectStatus" 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' delete: tags: - Project Status description: Deletes an existing project status. parameters: - name: statusId in: path description: ID of the project status required: true schema: type: string responses: 204: description: Status deleted successfully 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' /company/members/me: get: tags: - Company Members description: Returns the member that is associated with the API key in use responses: 200: description: Member returned successfully content: application/json: schema: $ref: "#/components/schemas/Member" 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' /projects: get: tags: - Projects description: List all projects of the company. parameters: - name: offset in: query description: Number of items to skip schema: type: integer - name: limit in: query description: Numbers of items to return (maximum 100) schema: type: integer responses: 200: description: List returned successfully content: application/json: schema: $ref: '#/components/schemas/ProjectsList' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' post: tags: - Projects description: Create new project/folder requestBody: description: Project data content: application/json: schema: $ref: '#/components/schemas/CreateProject' required: true responses: 200: description: Project successfully created content: application/json: schema: $ref: '#/components/schemas/Project' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 415: $ref: "#/components/responses/InvalidContent" default: $ref: '#/components/responses/DefaultError' x-codegen-request-body-name: body /projects/{projectId}: get: tags: - Projects description: Retrieve individual project parameters: - name: projectId in: path description: ID of the project required: true schema: type: string responses: 200: description: Project returned succesfully content: application/json: schema: $ref: '#/components/schemas/Project' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' put: tags: - Projects description: Update project parameters: - name: projectId in: path description: ID of the project required: true schema: type: string requestBody: description: Project data content: application/json: schema: $ref: '#/components/schemas/CreateProject' required: true responses: 200: description: Project updated successfully content: application/json: schema: $ref: '#/components/schemas/Project' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' /projects/{projectId}/deeplink: get: tags: - Projects description: Retrieve a project deeplink parameters: - name: projectId in: path description: ID of the project required: true schema: type: string responses: 200: description: Project deeplink returned succesfully content: application/json: schema: $ref: '#/components/schemas/Deeplink' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' /projects/{projectId}/files: get: tags: - Project Files description: List all files of a project parameters: - name: projectId in: path description: ID of the project required: true schema: type: string - name: offset in: query description: Number of items to skip schema: type: integer - name: limit in: query description: Numbers of items to return (maximum 100) schema: type: integer responses: 200: description: List returned successfully content: application/json: schema: $ref: '#/components/schemas/FilesList' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' post: tags: - Project Files description: Create file/folder parameters: - name: projectId in: path description: ID of the project required: true schema: type: string requestBody: content: multipart/form-data: schema: required: - type properties: type: type: string description: File type ('FOLDER', 'DOCUMENT', 'IMAGE') folderId: type: string description: Folder ID of the file data: type: string description: Content data (required if type is not FOLDER) format: binary name: type: string description: Name of the file (or folder) to create. If omitted the file name will be used. Required if type 'FOLDER' required: true responses: 200: description: File created successfully content: multipart/form-data: schema: $ref: '#/components/schemas/File' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' 413: $ref: '#/components/responses/FileSize' default: $ref: '#/components/responses/DefaultError' /files/{fileId}: get: tags: - Project Files description: Get a file/folder parameters: - name: fileId in: path description: The ID of the file. required: true schema: type: string - name: download in: query description: Whether to download this file. If selected the response will contain the file content instead of its meta data. schema: type: boolean responses: 200: description: File returned successfully content: application/json: schema: $ref: '#/components/schemas/File' image/json: schema: $ref: '#/components/schemas/File' image/png: schema: $ref: '#/components/schemas/File' application/pdf: schema: $ref: '#/components/schemas/File' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' 413: $ref: '#/components/responses/FileSize' default: $ref: '#/components/responses/DefaultError' put: tags: - Project Files description: Update a file/folder parameters: - name: fileId in: path description: The ID of the file. required: true schema: type: string requestBody: content: multipart/form-data: schema: properties: folderId: type: string description: The folder ID of the file data: type: string description: The content data format: binary name: type: string description: The name of the new file (or folder) permission: type: array description: The permissions to set (EMPLOYEE, SUPERVISOR, EXTERNAL, EXTERNAL_SUPERVISOR, OWNER) example: EMPLOYEE responses: 200: description: File updated successfully content: multipart/form-data: schema: $ref: '#/components/schemas/File' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' 413: $ref: '#/components/responses/FileSize' default: $ref: '#/components/responses/DefaultError' /projects/{projectId}/members: get: tags: - Project Members description: List all members of a project. yet! parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - $ref: "#/components/parameters/paginationMode" - $ref: "#/components/parameters/paginationOffset" - $ref: "#/components/parameters/paginationLimit" - $ref: "#/components/parameters/paginationStartAfter" responses: 200: description: List returned successfully content: application/json: schema: $ref: '#/components/schemas/MembersList' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' post: tags: - Project Members description: Add a user to a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string requestBody: description: The user to add content: application/json: schema: $ref: '#/components/schemas/AddMember' required: true responses: 200: description: Members added successfully content: application/json: schema: $ref: '#/components/schemas/MembersList' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' x-codegen-request-body-name: body /projects/{projectId}/members/{userId}: delete: tags: - Project Members description: Remove a member from a project parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: userId in: path description: The ID of the member. required: true schema: type: string responses: 200: description: Member removed succesfully content: application/json: schema: $ref: '#/components/schemas/Member' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' /projects/{projectId}/times: get: tags: - Project Times description: List all times of a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - $ref: "#/components/parameters/paginationMode" - $ref: "#/components/parameters/paginationOffset" - $ref: "#/components/parameters/paginationLimit" - $ref: "#/components/parameters/timesPaginationStartAfter" - name: since in: query description: Include only times with a start time greater or equal to this field (seconds since UNIX epoch) schema: type: integer - name: until in: query description: Include only times with a start time smaller or equal than this field (seconds since UNIX epoch) schema: type: integer responses: 200: description: List returned successfully content: application/json: schema: $ref: '#/components/schemas/TimesList' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' post: tags: - Project Times description: Add a time to a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string requestBody: description: The time to add content: application/json: schema: $ref: '#/components/schemas/CreateTime' required: true responses: 200: description: Time added successfully content: application/json: schema: $ref: '#/components/schemas/Time' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' x-codegen-request-body-name: body /projects/{projectId}/times/{timeId}: delete: tags: - Project Times description: Deletes a time entry from the project parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: timeId in: path description: The ID of the time entry. required: true schema: type: string responses: 200: description: Time entry has been deleted successfully content: application/json: schema: $ref: '#/components/schemas/Time' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' get: tags: - Project Times description: Get a time entry parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: timeId in: path description: The ID of the time entry. required: true schema: type: string responses: 200: description: Time returned successfully content: application/json: schema: $ref: '#/components/schemas/Time' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' put: tags: - Project Times description: Replace a time entry parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: timeId in: path description: The ID of the time entry. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateTime' responses: 200: description: Time entry replaced successfully content: application/json: schema: $ref: '#/components/schemas/Time' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' patch: tags: - Project Times description: Update a time entry parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: timeId in: path description: The ID of the time entry. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateTime' responses: 200: description: time entry replaced successfully content: application/json: schema: $ref: '#/components/schemas/Time' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' /projects/{projectId}/tasks: get: tags: - Project Tasks description: List all tasks of a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - $ref: "#/components/parameters/paginationMode" - $ref: "#/components/parameters/paginationOffset" - $ref: "#/components/parameters/paginationLimit" - $ref: "#/components/parameters/paginationStartAfter" responses: 200: description: List returned successfully content: application/json: schema: $ref: '#/components/schemas/TasksList' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' post: tags: - Project Tasks description: Add a task to a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string requestBody: description: The task to add content: application/json: schema: $ref: '#/components/schemas/CreateTask' required: true responses: 200: description: Task added successfully content: application/json: schema: $ref: '#/components/schemas/Task' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' x-codegen-request-body-name: body /projects/{projectId}/tasks/{taskId}: delete: tags: - Project Tasks description: Deletes a task from the project parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: taskId in: path description: The ID of the task. required: true schema: type: string responses: 200: description: Task has been deleted successfully content: application/json: schema: $ref: '#/components/schemas/Task' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' get: tags: - Project Tasks description: Get a task parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: taskId in: path description: The ID of the task. required: true schema: type: string responses: 200: description: Task returned successfully content: application/json: schema: $ref: '#/components/schemas/Task' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' put: tags: - Project Tasks description: Replace a task parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: taskId in: path description: The ID of the task. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateTask' responses: 200: description: Task replaced successfully content: application/json: schema: $ref: '#/components/schemas/Task' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' patch: tags: - Project Tasks description: Update a task parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: taskId in: path description: The ID of the task. required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateTask' responses: 200: description: Task updated successfully content: application/json: schema: $ref: '#/components/schemas/Task' 400: $ref: '#/components/responses/BadRequest' 401: $ref: '#/components/responses/NotAuthenticated' 403: $ref: '#/components/responses/Forbidden' 404: $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' /projects/{projectId}/messages: get: tags: - Chat Messages description: List all messages in a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string responses: 200: description: List returned successfully content: application/json: schema: $ref: "#/components/schemas/MessagesList" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 403: $ref: "#/components/responses/Forbidden" 404: $ref: "#/components/responses/NotFound" default: $ref: "#/components/responses/DefaultError" post: tags: - Chat Messages description: Create a new message in a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string requestBody: description: The message to create content: application/json: schema: $ref: "#/components/schemas/CreateMessage" required: true responses: 200: description: Message created successfully content: application/json: schema: $ref: "#/components/schemas/Message" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 403: $ref: "#/components/responses/Forbidden" 404: $ref: "#/components/responses/NotFound" default: $ref: "#/components/responses/DefaultError" /projects/{projectId}/messages/{messageId}: get: tags: - Chat Messages description: Get a specific message from a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: messageId in: path description: The ID of the message. required: true schema: type: string responses: 200: description: Message returned successfully content: application/json: schema: $ref: "#/components/schemas/Message" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 403: $ref: "#/components/responses/Forbidden" 404: $ref: "#/components/responses/NotFound" default: $ref: "#/components/responses/DefaultError" delete: tags: - Chat Messages description: Delete a message from a project. parameters: - name: projectId in: path description: The ID of the project. required: true schema: type: string - name: messageId in: path description: The ID of the message. required: true schema: type: string responses: 200: description: Message deleted successfully content: application/json: schema: $ref: "#/components/schemas/Message" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 403: $ref: "#/components/responses/Forbidden" 404: $ref: "#/components/responses/NotFound" default: $ref: "#/components/responses/DefaultError" /webhooks: get: tags: - Webhooks description: List all webhooks for the company. parameters: - $ref: "#/components/parameters/paginationMode" - $ref: "#/components/parameters/paginationOffset" - $ref: "#/components/parameters/paginationLimit" - $ref: "#/components/parameters/paginationStartAfter" responses: 200: description: List returned successfully content: application/json: schema: $ref: "#/components/schemas/WebhooksList" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 415: $ref: "#/components/responses/InvalidContent" default: $ref: "#/components/responses/DefaultError" post: tags: - Webhooks description: Create a new webhook subscription. requestBody: description: Webhook configuration content: application/json: schema: $ref: "#/components/schemas/CreateWebhook" required: true responses: 200: description: Webhook created successfully content: application/json: schema: $ref: "#/components/schemas/Webhook" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 415: $ref: "#/components/responses/InvalidContent" default: $ref: "#/components/responses/DefaultError" /webhooks/{webhookId}: get: tags: - Webhooks description: Retrieve a specific webhook configuration. parameters: - name: webhookId in: path description: The ID of the webhook. required: true schema: type: string responses: 200: description: Webhook returned successfully content: application/json: schema: $ref: "#/components/schemas/Webhook" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 404: $ref: "#/components/responses/NotFound" default: $ref: "#/components/responses/DefaultError" put: tags: - Webhooks description: Update an existing webhook configuration. parameters: - name: webhookId in: path description: The ID of the webhook. required: true schema: type: string requestBody: description: Updated webhook configuration content: application/json: schema: $ref: "#/components/schemas/UpdateWebhook" required: true responses: 200: description: Webhook updated successfully content: application/json: schema: $ref: "#/components/schemas/Webhook" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 404: $ref: "#/components/responses/NotFound" default: $ref: "#/components/responses/DefaultError" delete: tags: - Webhooks description: Delete a webhook subscription. parameters: - name: webhookId in: path description: The ID of the webhook. required: true schema: type: string responses: 200: description: Webhook deleted successfully content: application/json: schema: $ref: "#/components/schemas/Webhook" 400: $ref: "#/components/responses/BadRequest" 401: $ref: "#/components/responses/NotAuthenticated" 404: $ref: "#/components/responses/NotFound" default: $ref: "#/components/responses/DefaultError" components: responses: BadRequest: description: Bad request content: application/json: schema: $ref: '#/components/schemas/ValidationError' NotAuthorized: description: Not Authorized content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' NotAuthenticated: description: Not Authenticated content: application/json: schema: $ref: '#/components/schemas/AuthenticationError' InvalidContent: description: Invalid Content Type content: application/json: schema: $ref: '#/components/schemas/InvalidContentError' Forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/AuthorizationError' NotFound: description: Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundError' FileSize: description: File size exceeds server limits content: application/json: schema: $ref: '#/components/schemas/FileSizeError' DefaultError: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' parameters: paginationMode: name: paginationMode in: query description: Whether to use offset- or token based pagination schema: type: string default: offset enum: ["offset", "token"] paginationOffset: name: offset in: query description: Number of items to skip schema: type: integer minimum: 0 default: 0 paginationStartAfter: name: startAfter in: query description: ID of the last object to skip (only used if paginationMode is set to token) schema: type: string timesPaginationStartAfter: name: startAfter in: query description: startTime and ID of the last object to skip seperated by a semicolon (only used if paginationMode is set to token) schema: type: string example: 1629905182;9df9021b-0aa1-4b12-b948-f44b7243f6b8 paginationLimit: name: limit in: query description: Maximum numbers of items to return schema: type: integer maximum: 100 default: 100 schemas: Error: required: - message type: object properties: code: type: string description: Code string identifying the error example: Error description: type: string description: Detailled error description example: Unexpected error ValidationError: type: object properties: code: type: string description: Code string identifying the error example: validation_failed description: type: string description: Detailled error description example: $.field is undefined FileSizeError: type: object properties: code: type: string description: Code string identifying the error example: Error description: type: string description: Detailled error description example: File size exceeds server limit NotFoundError: type: object properties: code: type: string description: Code string identifying the error example: not_found description: type: string description: Detailled error description example: Unable to find resource 953c84c6-51ba-4536-b042-85dd20027d0c AuthenticationError: type: object properties: code: type: string description: Code string identifying the error example: Error description: type: string description: Detailled error description example: '[token_not_found] The token could not be found' AuthorizationError: type: object properties: code: type: string description: Code string identifying the error example: Error description: type: string description: Detailled error description example: '[unauthorized] Not allowed to access this resource' InvalidContentError: type: object properties: code: type: string description: Code string identifying the error example: Error description: type: string description: Detailled error description example: 'Invalid content type' Contact: required: - name type: object properties: name: type: string description: The name of the contact example: Wilhelm Huber emails: type: array description: Email address of the contact example: - huber@t-online.de - willy291@gmx.de items: type: string phones: type: array description: Phone number of the contact example: - +49 711 21893732 - +49 711 21893733 items: type: string CreateProject: required: - name type: object properties: name: type: string description: Name of this project example: Wasserrohrbruch projectType: type: string description: Project type ('FOLDER' or 'PROJECT') example: FOLDER startDate: type: integer description: Start timestamp (seconds since UNIX epoch) example: 1575158400 endDate: type: integer description: End timestamp (seconds since UNIX epoch) example: 1588291200 orderNumber: type: string description: Order number for this project example: 92a032as4.853-af62 street: type: string description: Street and address number of the project location example: Bergstraße. 40 zipcode: type: string description: ZIP code of the project location example: "12345" city: type: string description: City of the project location example: Amseldorf country: type: string description: Country name of the project location example: Deutschland clientName: type: string description: Name of the client example: Karlheinz Maier clientEmail: type: string description: E-Mail address of the client example: kh-maier@t-online.de clientPhone: type: string description: Phone number of the client example: +49-170-1611937 billingName: type: string description: Name of the billing address example: Dietmar Müller billingStreet: type: string description: Street and address number of the billing address example: Birkenallee 16a billingZipcode: type: string description: ZIP code of the billing address example: "32455" billingCity: type: string description: City of the billing address example: Krehlingen billingCountry: type: string description: Country of the billing address example: Germany billingEmail: type: string description: E-mail address of the billing address example: d.mueller@mail.org contacts: type: array description: List of additional contacts items: $ref: '#/components/schemas/Contact' noteContent: type: string description: User definable note projects: type: array description: Child project IDs (only applies to type FOLDER) items: type: string statusId: type: string description: project status ID (from /company/settings) example: 0000FFB2-9DC1-4A50-A8BB-14C899CC52FC parentProject: type: string description: Parent project ID (only applies to type PROJECT) archived: type: boolean description: Wether this project should be archived for all non-external members example: false ProjectStatus: required: - name type: object properties: id: type: string description: Unique status ID example: 0000FFB2-9DC1-4A50-A8BB-14C899CC52FC name: type: string description: Status name example: Angebote description: type: string description: Status description example: Angebote in Vorbereitung ProjectStatusList: required: - data type: object properties: data: type: array items: $ref: "#/components/schemas/ProjectStatus" CreateProjectStatus: required: - name type: object properties: name: type: string description: Status name example: Angebote description: type: string description: Status description example: Angebote in Vorbereitung UpdateProjectStatus: type: object properties: name: type: string description: Status name example: Angebote description: type: string description: Status description example: Angebote in Vorbereitung CompanySetting: type: object properties: status: type: array description: Different states that a project can have items: $ref: '#/components/schemas/ProjectStatus' workingHours: type: object description: Working hours during which the company is open properties: start: type: string example: 07:00 end: type: string example: 17:00 workingDays: type: array description: Days during which the company is open, index of array is ISO day of week minus one 0 = Monday to 6 = Sunday. items: type: object properties: enabled: type: boolean workTypes: type: array description: Array of worktypes which can be used in time tracking items: type: object properties: id: type: string description: Unique work type id example: a70a4076-3ba6-49e0-97b2-220735e2b2cc name: type: string description: name of work work type example: Arbeitszeit Project: required: - name type: object properties: id: type: string description: Unique project ID example: 0000FFB2-9DC1-4A50-A8BB-14C899CC52FC name: type: string description: Name of this project example: Wasserrohrbruch projectType: type: string description: Project type ('FOLDER' or 'PROJECT') example: FOLDER startDate: type: integer description: Start timestamp (seconds since UNIX epoch) example: 1575158400 endDate: type: integer description: End timestamp (seconds since UNIX epoch) example: 1588291200 orderNumber: type: string description: Order number for this project example: 92a032as4.853-af62 street: type: string description: Street and address number of the project location example: Bergstraße. 40 zipcode: type: string description: ZIP code of the project location example: "12345" city: type: string description: City of the project location example: Amseldorf country: type: string description: Country name of the project location example: Deutschland clientName: type: string description: Name of the client example: Karlheinz Maier clientEmail: type: string description: E-Mail address of the client example: kh-maier@t-online.de clientPhone: type: string description: Phone number of the client example: +49-170-1611937 billingName: type: string description: Name of the billing contact example: Dietmar Müller billingStreet: type: string description: Street and address number of the billing conctact example: Birkenallee 16a billingZipcode: type: string description: ZIP code of the billing contact example: "32455" billingCity: type: string description: City of the billing contact example: Krehlingen billingCountry: type: string description: Country of the billing address example: Germany billingEmail: type: string description: E-mail address of the billing contact example: d.mueller@mail.org contacts: type: array description: List of additional contacts items: $ref: '#/components/schemas/Contact' noteContent: type: string description: User definable note projects: type: array description: child project IDs (only applies to type FOLDER) items: type: string statusId: type: string description: project status ID (from /company/settings) example: 0000FFB2-9DC1-4A50-A8BB-14C899CC52FC parentProject: type: string description: parent project ID (only applies to type PROJECT) archived: type: boolean description: Wether this project is archived for all non-external members example: false ProjectsList: required: - projects type: object properties: projects: type: array items: $ref: '#/components/schemas/Project' Deeplink: required: - appDeepLink - webLink type: object properties: webLink: type: string description: Link that can be opened in a browser example: https://app.mycraftnote.de/#/project?id=0DDAAAA9-2508-4AAF-A576-E91E76EA8CDB appDeepLink: type: string description: Link that can be opened in a mobile client example: mycrafty://project?id=0DDAAAA9-2508-4AAF-A576-E91E76EA8CDB File: required: - id - name - type type: object properties: id: type: string description: Unique file ID example: 00061E3C-9C02-3CE5-EDFD-9186E6F28114 projectId: type: string description: ID of the project this file is associated with example: db5b9a4d-7589-4af4-8c79-a96a3b796dc9 name: type: string description: User-defined file name example: Projektbericht.pdf folderId: type: string description: Parent folder ID of this file example: 00061E3C-9C02-3CE5-EDFD-9186E6F28114 type: type: string description: File type (FOLDER, DOCUMENT, IMAGE, AUDIO, VIDEO) example: DOCUMENT creationTimestamp: type: integer description: Creation timestamp (seconds since UNIX epoch) example: 1567685998 lastModifiedTimestamp: type: integer description: Last modified timestamp (seconds since UNIX epoch) example: 1587291223 lastModifiedBy: type: string description: User ID of the last modification example: Ka3gh32ashtQJuuas9 size: type: number description: File size in bytes example: 2450 FilesList: required: - files type: object properties: files: type: array items: $ref: '#/components/schemas/File' AddMember: required: - userId type: object properties: userId: type: string description: Unique ID of the member example: Ka3gh32ashtQJuuas9 Member: type: object description: A user represented as member inside a company or project properties: id: type: string description: Unique user ID example: Ka3gh32ashtQJuuas9 email: type: string description: The user's e-mail address example: cf@gauss.de mobile: type: string description: The user's mobile phone number example: "+49-171-174282137" name: type: string description: Given name of the user example: Carl-Friedrich lastname: type: string description: Surname of the user example: Gauss MembersList: required: - members type: object properties: members: type: array items: $ref: "#/components/schemas/Member" Time: type: object description: A time entry for a project properties: id: type: string description: Unique time ID example: 9df9021b-0aa1-4b12-b948-f44b7243f6b8 projectId: type: string description: Unique project ID example: cf9058b2-e4f5-4fc1-bdfd-963236381273 creatorId: type: string description: Unique user ID of user that created the time entry example: Dzcgx16hfbgt4saH8So7NJ5jbUf2 creationTime: type: number description: timestamp of creation time example: 1629905182 userId: type: string description: Unique user ID of user that is assigned to the time entry example: Dzcgx16hfbgt4saH8So7NJ5jbUf2 userName: type: string description: First and lastname of assigned user example: "John Doe" workTypeId: type: string description: Unique work type ID example: 733d19ac-8d73-4b9d-952f-c0dc2e4f1512 lastEditedBy: type: string description: Unique user ID of last user that edited time entry example: Dzcgx16hfbgt4saH8So7NJ5jbUf2 state: type: string description: Current state of the time entry enum: [running, paused, stopped, deleted] example: running startTime: type: number description: Timestamp of time entry start example: 1629905182 endTime: type: number description: Timestamp of time entry end example: 1629905182 pauseStartTime: type: number description: Timestamp of start of the pause example: 1629905182 pauseDuration: type: number description: Duration of pause in seconds example: 3600 comment: type: string description: Comment that is shown for the time entry example: I was stuck in traffic taskId: type: string description: Task id of the task that the time entry is attached to example: 733d19ac-8d73-4b9d-952f-c0dc2e4f1512 TimesList: required: - times type: object properties: times: type: array items: $ref: "#/components/schemas/Time" CreateTime: required: - userId - state - workTypeId - startTime - pauseDuration type: object properties: userId: type: string description: Unique user ID of user that is assigned to the time entry example: Dzcgx16hfbgt4saH8So7NJ5jbUf2 workTypeId: type: string description: Unique work type ID example: 733d19ac-8d73-4b9d-952f-c0dc2e4f1512 state: type: string description: Current state of the time entry enum: [ running, paused, stopped, deleted ] example: running startTime: type: number description: Timestamp of time entry start (seconds since UNIX epoch) example: 1629905182 endTime: type: number description: Timestamp of time entry end (seconds since UNIX epoch) example: 1629905182 pauseStartTime: type: number description: Timestamp of start of the pause example: 1629905182 pauseDuration: type: number description: Duration of pause in seconds example: 3600 comment: type: string description: Comment that is shown for the time entry example: I was stuck in traffic taskId: type: string description: Task id of the task that the time entry is attached to example: 733d19ac-8d73-4b9d-952f-c0dc2e4f1512 UpdateTime: type: object properties: userId: type: string description: Unique user ID of user that is assigned to the time entry example: Dzcgx16hfbgt4saH8So7NJ5jbUf2 workTypeId: type: string description: Unique work type ID example: 733d19ac-8d73-4b9d-952f-c0dc2e4f1512 state: type: string description: Current state of the time entry enum: [ running, paused, stopped, deleted ] example: running startTime: type: number description: Timestamp of time entry start example: 1629905182 endTime: type: number description: Timestamp of time entry end example: 1629905182 pauseStartTime: type: number description: Timestamp of start of the pause example: 1629905182 pauseDuration: type: number description: Duration of pause in seconds example: 3600 comment: type: string description: Comment that is shown for the time entry example: I was stuck in traffic Task: type: object description: A task in a project properties: id: type: string description: Unique task ID example: e2d33bcc-6f8a-46c9-9d55-2d0ed7af82f0 projectId: type: string description: Unique project ID example: 044337df-e9fd-48bc-8f2e-dadd6bc09629 companyId: type: string description: ID of the company the task belongs to example: 19b8ba22-97d0-4e73-9667-ebeb1b487525 title: type: string description: Title of the task example: adfsdf description: type: string description: Detailed description of the task nullable: true assigneeId: type: string description: Unique user ID of user that is assigned to the task nullable: true assignee: type: string description: Name of the assigned user nullable: true creatorId: type: string description: Unique user ID of user that created the task example: HVU9tHEyejVh8fiBfbyj99zfpjq1 lastChangeByUser: type: string description: Unique user ID of last user that edited task example: HVU9tHEyejVh8fiBfbyj99zfpjq1 createdTimestamp: type: number description: Timestamp of creation time (seconds since UNIX epoch) example: 1736452742 lastEditedTimestamp: type: number description: Timestamp of last edit (seconds since UNIX epoch) example: 1736452750 deadlineTimestamp: type: number description: Timestamp when the task is due (seconds since UNIX epoch) nullable: true repeatType: type: string description: How the task should repeat enum: [NEVER, DAILY, WEEKLY, MONTHLY, YEARLY] example: NEVER done: type: boolean description: Whether the task is marked as done example: true isDeleted: type: boolean description: Whether the task has been deleted example: true TasksList: required: - tasks type: object properties: tasks: type: array items: $ref: "#/components/schemas/Task" CreateTask: required: - title type: object properties: title: type: string description: Title of the task example: Fix the leaking pipe description: type: string description: Detailed description of the task nullable: true assigneeId: type: string description: Unique user ID of user that should be assigned to the task nullable: true UpdateTask: type: object properties: title: type: string description: Title of the task example: Fix the leaking pipe description: type: string description: Detailed description of the task nullable: true assigneeId: type: string description: Unique user ID of user that should be assigned to the task nullable: true deadlineTimestamp: type: number description: Timestamp when the task is due (seconds since UNIX epoch) nullable: true repeatType: type: string description: How the task should repeat enum: [NEVER, DAILY, WEEKLY, MONTHLY, YEARLY] done: type: boolean description: Whether the task is marked as done Message: type: object description: A chat message in a project properties: id: type: string description: Unique message ID example: "-OILSwO3kfee8Gr2rPK7" projectId: type: string description: ID of the project this message belongs to example: "e9182558-fe82-4b57-8bda-50ae1ae72364" author: type: string description: Name of the message author example: "Crafty the Robot" authorId: type: string description: Unique user ID of the message author example: "HVU9tHEyejVh8kiBfbyj99zfpjq1" content: type: string description: Content of the message example: "New Message" messageType: type: string description: Type of the message enum: ["TEXT"] example: "TEXT" status: type: string description: Status of the message enum: ["read", "sent"] example: "read" timestamp: type: number description: Creation timestamp (seconds since UNIX epoch) example: 1738764961 deleted: type: boolean description: Whether the message has been deleted example: true deletedTimestamp: type: number description: Timestamp when the message was deleted (seconds since UNIX epoch) example: 1738765339 nullable: true MessagesList: required: - messages type: object properties: messages: type: array items: $ref: "#/components/schemas/Message" CreateMessage: required: - content - messageType type: object properties: content: type: string description: Content of the message example: "New Message" messageType: type: string description: Type of the message enum: ["TEXT"] example: "TEXT" Webhook: type: object description: A webhook subscription configuration properties: id: type: string description: Unique webhook ID example: "webhook-123456" event: type: string description: The event type this webhook is subscribed to enum: - "project.created" - "project.updated" - "schedule.created" - "schedule.deleted" - "task.created" - "task.updated" - "trackedTime.created" - "trackedTime.updated" - "message.created" - "file.created" - "file.updated" - "file.deleted" example: "project.created" url: type: string description: The URL that will receive the webhook payload example: "https://example.com/webhook" headers: type: object description: Custom headers to be sent with the webhook request additionalProperties: type: string example: {"X-Custom-Header": "custom-value"} WebhooksList: required: - webhooks type: object properties: webhooks: type: array items: $ref: "#/components/schemas/Webhook" CreateWebhook: required: - event - url type: object properties: event: type: string description: The event type to subscribe to enum: - "project.created" - "project.updated" - "schedule.created" - "schedule.deleted" - "task.created" - "task.updated" - "trackedTime.created" - "trackedTime.updated" - "message.created" - "file.created" - "file.updated" - "file.deleted" example: "project.created" url: type: string description: The URL that will receive the webhook payload example: "https://example.com/webhook" headers: type: object description: Custom headers to be sent with the webhook request additionalProperties: type: string example: {"X-Custom-Header": "custom-value"} UpdateWebhook: type: object properties: event: type: string description: The event type to subscribe to enum: - "project.created" - "project.updated" - "schedule.created" - "schedule.deleted" - "task.created" - "task.updated" - "trackedTime.created" - "trackedTime.updated" - "message.created" - "file.created" - "file.updated" - "file.deleted" example: "project.created" url: type: string description: The URL that will receive the webhook payload example: "https://example.com/webhook" headers: type: object description: Custom headers to be sent with the webhook request additionalProperties: type: string example: {"X-Custom-Header": "custom-value"} securitySchemes: ApiKeyAuth: type: apiKey name: X-CN-API-Key in: header