---
title: Create or update an event (upsert by guid or systemId)
slug: create-or-update-an-event-upsert-by-guid-or-systemid
docTags: 
createdAt: 2026-10-08T08:29:29.588Z
---

{
  "id": "iFiVbYhjKDl9XxL9fzExh",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://dev1.frontu.com//client/api/v2/events",
    "servers": [
      {
        "url": "https://dev1.frontu.com//client/api/v2/events"
      }
    ],
    "name": "Create or update an event (upsert by guid or systemId)",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "guid",
              "kind": "optional",
              "type": "string<uuid>",
              "description": "",
              "format": "uuid"
            },
            {
              "name": "systemId",
              "kind": "optional",
              "type": "string",
              "description": ""
            },
            {
              "name": "title",
              "kind": "required",
              "type": "string",
              "description": "",
              "maxLength": 50
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": ""
            },
            {
              "name": "startDateTime",
              "kind": "required",
              "type": "string<date-time>",
              "description": "",
              "format": "date-time"
            },
            {
              "name": "endDateTime",
              "kind": "required",
              "type": "string<date-time>",
              "description": "",
              "format": "date-time"
            },
            {
              "name": "type",
              "kind": "required",
              "type": "string<custom_event | work_hour>",
              "description": "",
              "enum": [
                "custom_event",
                "work_hour"
              ]
            },
            {
              "name": "busy",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "user",
              "kind": "required",
              "type": "string",
              "description": "<p>User identifier — guid or systemId.</p>"
            },
            {
              "name": "task",
              "kind": "optional",
              "type": "string",
              "description": "<p>Task identifier — guid or systemId.</p>"
            },
            {
              "name": "resource",
              "kind": "optional",
              "type": "string",
              "description": "<p>Resource identifier — guid or systemId.</p>"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Value: Bearer {access_token}</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Updated",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Event",
            "schema": [
              {
                "name": "guid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "systemId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": ""
              },
              {
                "name": "version",
                "kind": "optional",
                "type": "integer",
                "description": ""
              },
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": ""
              },
              {
                "name": "startDateTime",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "endDateTime",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string<custom_event | work_hour>",
                "description": "",
                "enum": [
                  "custom_event",
                  "work_hour"
                ]
              },
              {
                "name": "busy",
                "kind": "optional",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "deleted",
                "kind": "optional",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "user",
                "kind": "optional",
                "type": "object",
                "nullable": true,
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "systemId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  }
                ]
              },
              {
                "name": "task",
                "kind": "optional",
                "type": "object",
                "nullable": true,
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "systemId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  }
                ]
              },
              {
                "name": "resource",
                "kind": "optional",
                "type": "object",
                "nullable": true,
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "systemId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  }
                ]
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "updated",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/Event",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Event",
            "schema": [
              {
                "name": "guid",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              },
              {
                "name": "systemId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": ""
              },
              {
                "name": "version",
                "kind": "optional",
                "type": "integer",
                "description": ""
              },
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": ""
              },
              {
                "name": "startDateTime",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "endDateTime",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string<custom_event | work_hour>",
                "description": "",
                "enum": [
                  "custom_event",
                  "work_hour"
                ]
              },
              {
                "name": "busy",
                "kind": "optional",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "deleted",
                "kind": "optional",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "user",
                "kind": "optional",
                "type": "object",
                "nullable": true,
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "systemId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  }
                ]
              },
              {
                "name": "task",
                "kind": "optional",
                "type": "object",
                "nullable": true,
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "systemId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  }
                ]
              },
              {
                "name": "resource",
                "kind": "optional",
                "type": "object",
                "nullable": true,
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "",
                    "format": "uuid"
                  },
                  {
                    "name": "systemId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": ""
                  }
                ]
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "updated",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/Event",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Validation error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "NmsN3Q1aIaC8qW8_4ueCi",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://dev1.frontu.com//client/api/v2/events \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"title\": \"\",\n     \"startDateTime\": \"\",\n     \"endDateTime\": \"\",\n     \"type\": \"\",\n     \"user\": \"\"\n     }'"
        },
        {
          "id": "RbsM_be_QotJKKSxzz4Vv",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"title\": \"\",\n   \"startDateTime\": \"\",\n   \"endDateTime\": \"\",\n   \"type\": \"\",\n   \"user\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://dev1.frontu.com//client/api/v2/events\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Jv3ASkcWIf6ia6IjS5fj0",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://dev1.frontu.com//client/api/v2/events\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"title\": \"\",\n   \"startDateTime\": \"\",\n   \"endDateTime\": \"\",\n   \"type\": \"\",\n   \"user\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "W-MsiRzVNUQf7CjOUah1v",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://dev1.frontu.com//client/api/v2/events\"\n\npayload = json.dumps({\n   \"title\": \"\",\n   \"startDateTime\": \"\",\n   \"endDateTime\": \"\",\n   \"type\": \"\",\n   \"user\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "NmsN3Q1aIaC8qW8_4ueCi"
    },
    "results": {
      "languages": [
        {
          "id": "anuuMA-7eeLLiaB-QFNAj",
          "language": "200",
          "code": "// Updated\n{\n  \"guid\": \"\",\n  \"systemId\": \"\",\n  \"version\": 0,\n  \"title\": \"\",\n  \"description\": \"\",\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\",\n  \"type\": \"\",\n  \"busy\": false,\n  \"deleted\": false,\n  \"user\": {\n    \"guid\": \"\",\n    \"systemId\": \"\"\n  },\n  \"task\": {\n    \"guid\": \"\",\n    \"systemId\": \"\"\n  },\n  \"resource\": {\n    \"guid\": \"\",\n    \"systemId\": \"\"\n  },\n  \"created\": \"\",\n  \"updated\": \"\"\n}"
        },
        {
          "id": "XAaUQuM41wpZ4aUdhhddI",
          "language": "201",
          "code": "// Created\n{\n  \"guid\": \"\",\n  \"systemId\": \"\",\n  \"version\": 0,\n  \"title\": \"\",\n  \"description\": \"\",\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\",\n  \"type\": \"\",\n  \"busy\": false,\n  \"deleted\": false,\n  \"user\": {\n    \"guid\": \"\",\n    \"systemId\": \"\"\n  },\n  \"task\": {\n    \"guid\": \"\",\n    \"systemId\": \"\"\n  },\n  \"resource\": {\n    \"guid\": \"\",\n    \"systemId\": \"\"\n  },\n  \"created\": \"\",\n  \"updated\": \"\"\n}"
        },
        {
          "id": "_2QEyBUc2DdsvKEqShs_j",
          "language": "400",
          "code": "// Validation error\n"
        }
      ],
      "selectedLanguageId": "anuuMA-7eeLLiaB-QFNAj"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}