# Create task Creates a new task. Endpoint: POST /task Version: 1.0.0 Security: accesstoken ## Query parameters: - `gymId` (number, required) The id of the gym Example: 234 ## Request fields (application/json): - `taskId` (integer) unique ID assigned by EGYM Example: 123 - `taskName` (string) The message displayed to the end user of the EGYM Trainer App. (The EGYM Trainer App will shorten the title to 140 characters.) Example: "task1" - `taskType` (string) The task type - GENERAL - Used for all general tasks. - ANAMNESIS - Used when an anamnesis should be carried out for a user. - COORDINATION_FITNESS_TEST - A coordination fitness test task. - HEALTH_FITNESS_TEST - A health fitness test task. - PWC_FITNESS_TEST - Physical Working Capacity (PWC) test task. - MAX_FORCE_FITNESS_TEST - A max force fitness test task. - MOBILITY_SCREEN_FITNESS_TEST - A mobility screen fitness test task. - BLOOD_PRESSURE_FITNESS_TEST - A blood pressure test task. - POLAR_FITNESS_TEST - A Polar (Vo2Max) fitness test task. Enum: "GENERAL", "ANAMNESIS", "COORDINATION_FITNESS_TEST", "HEALTH_FITNESS_TEST", "PWC_FITNESS_TEST", "MAX_FORCE_FITNESS_TEST", "MOBILITY_SCREEN_FITNESS_TEST", "BLOOD_PRESSURE_FITNESS_TEST", "POLAR_FITNESS_TEST" - `dueDate` (string) The date when the task has to be completed. Example: "2016-02-20" - `completed` (boolean) Indicates whether or not the task was completed Example: "false," - `author` (object) User (typically gym staff) who created the task Example: {"userId":"-7414498790635180469"} - `author.userId` (integer) The unobfuscated EGYM legacy id of the user that created the task. Example: "-7414498790635180469" - `author.membershipId` (string) Membership id of the gym software Example: "membership_id" - `target` (object) User (typically gym member) the task relates to Example: {"userId":"70043473040802893"} - `target.userId` (integer) The unobfuscated EGYM legacy id of the target user. Example: "70043473040802893" - `completer` (object) User who solved the task Example: {"userId":"39820804037434007"} - `completer.userId` (integer) The unobfuscated EGYM legacy id of the trainer that completed the task. Example: "39820804037434007" - `timestamp` (integer) Indicates the server time in milliseconds since epoch Example: 1479310474987 ## Response 200 fields (application/json): - `taskId` (integer) The id of the task Example: 123 ## Response 4XX fields (application/json): - `error` (integer) The error code. Example: 401 - `errorText` (string) The error message. Example: "The provided user name or password is incorrect."