---
updatedAt: 2026-05-11T06:52:42.000Z
agentTools:
  projectIndex: https://platform.simpplr.com/llms.txt
---

# Add an event to a site

This API allows us to add an event to a site

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "version": "1.0.0",
    "title": "Simpplr User API Documentation",
    "description": ""
  },
  "x-proxy-enabled": true,
  "tags": [
    {
      "name": "Content",
      "description": "Everything about Content"
    },
    {
      "name": "Files",
      "description": "Everything about Files"
    }
  ],
  "servers": [
    {
      "url": "https://{endpoint}/v1",
      "variables": {
        "env": {
          "default": "app"
        },
        "endpoint": {
          "default": "platform.app.simpplr.com"
        }
      }
    }
  ],
  "paths": {
    "/content/sites/{site_id}/event": {
      "post": {
        "operationId": "addEventUser",
        "tags": [
          "Content"
        ],
        "summary": "Add an event to a site",
        "description": "This API allows us to add an event to a site",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "eb4a3545-05f7-46e8-b17d-107339b6aae6"
            },
            "description": "The ID of the site to add an event to"
          },
          {
            "name": "action",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "publish",
              "enum": [
                "publish",
                "saveDraft"
              ]
            },
            "description": "The action to perform on the event"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listOfFiles": {
                    "type": "array",
                    "items": {
                      "$ref": "#/paths/~1content~1files/post/requestBody/content/application~1json/schema/properties/file_id/items"
                    },
                    "description": "Array of file attachments"
                  },
                  "publishAt": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2025-04-09T18:30:00.000Z",
                    "description": "Date and time when the event should be published (required when publishingStatus is 'schedule'). Must be in ISO 8601 UTC format"
                  },
                  "publishTo": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "example": "2025-12-31T23:59:59.000Z",
                    "description": "Date and time when the content should expire/unpublish. Must be in ISO 8601 UTC format"
                  },
                  "startsAt": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2025-04-09T10:00:00.000Z",
                    "description": "Event start date and time in ISO 8601 format"
                  },
                  "endsAt": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2025-04-09T12:00:00.000Z",
                    "description": "Event end date and time in ISO 8601 format"
                  },
                  "bodyHtml": {
                    "type": "string",
                    "description": "Main content of the event in HTML format"
                  },
                  "publishingStatus": {
                    "type": "string",
                    "enum": [
                      "immediate",
                      "schedule"
                    ],
                    "description": "Publishing status of the event"
                  },
                  "timezoneIso": {
                    "type": "string",
                    "example": "America/Los_Angeles",
                    "description": "Timezone ISO string for the event"
                  },
                  "location": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Event location"
                  },
                  "directions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "description": "Array of directions to the event location"
                  },
                  "imgLayout": {
                    "type": "string",
                    "enum": [
                      "small",
                      "hidden",
                      "fullscreen",
                      "wide"
                    ],
                    "description": "Layout style for the featured image"
                  },
                  "listOfOrganizers": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Array of organizer user IDs"
                  },
                  "mapURL": {
                    "type": "string",
                    "nullable": true,
                    "description": "URL to map for the event location"
                  },
                  "imgCaption": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255,
                    "description": "Caption for the featured image"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Title of the event"
                  },
                  "isFeedEnabled": {
                    "type": "boolean",
                    "description": "Whether the event appears in feeds"
                  },
                  "isRestricted": {
                    "type": "boolean",
                    "description": "Whether the content is restricted to specific audiences"
                  },
                  "targetAudience": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "List of UUIDs identifying the target audiences",
                    "minItems": 0
                  },
                  "isQuestionAnswerEnabled": {
                    "type": "boolean",
                    "description": "Whether question and answer feature is enabled"
                  },
                  "listOfTopics": {
                    "type": "array",
                    "nullable": true,
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "nullable": true
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Array of topics associated with the event"
                  },
                  "summary": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 10000,
                    "description": "Summary of the event content"
                  },
                  "imgLandscapeFile": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "UUID of the landscape image file"
                  },
                  "imgFile": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "UUID of the main image file"
                  },
                  "imgOriginalFile": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "UUID of the original image file"
                  },
                  "rsvp": {
                    "type": "object",
                    "properties": {
                      "dueAtDate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "RSVP due date"
                      },
                      "hasMaybeOption": {
                        "type": "boolean",
                        "description": "Whether RSVP has maybe option"
                      },
                      "capacityCount": {
                        "type": "integer",
                        "nullable": true,
                        "minimum": 1,
                        "maximum": 1000000,
                        "default": null,
                        "description": "Maximum capacity for the event"
                      },
                      "noteLabel": {
                        "type": "string",
                        "nullable": true,
                        "maxLength": 255,
                        "description": "Label for RSVP note field"
                      }
                    },
                    "additionalProperties": false,
                    "description": "RSVP configuration for the event"
                  },
                  "isAllDay": {
                    "type": "boolean",
                    "description": "Whether the event is an all-day event"
                  },
                  "category": {
                    "type": "object",
                    "description": "Content category for the item. Optional in schema. Required at runtime when event and album category is enabled; when not enabled, omit category — sending it is rejected.\n",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ],
                    "additionalProperties": false
                  },
                  "language": {
                    "type": "string",
                    "description": "Language of the event content"
                  }
                },
                "required": [
                  "publishingStatus",
                  "title",
                  "bodyHtml",
                  "timezoneIso",
                  "isAllDay",
                  "isFeedEnabled",
                  "location",
                  "startsAt",
                  "endsAt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success",
                      "description": "Response status",
                      "enum": [
                        "success",
                        "error"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "description": "Contains the ID of the newly created event",
                      "properties": {
                        "contentId": {
                          "type": "string",
                          "example": "49502e9f-a6e6-4773-a0b4-64be9388b7b1",
                          "description": "Unique identifier of the newly created event"
                        }
                      }
                    },
                    "message": {
                      "type": "string",
                      "example": "Event created successfully",
                      "description": "Descriptive message about the operation result"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error",
                      "description": "Response status",
                      "enum": [
                        "success",
                        "error"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "description": "List of validation or processing errors",
                      "items": {
                        "type": "object",
                        "properties": {
                          "seq_id": {
                            "type": "integer",
                            "example": 0,
                            "description": "Sequence identifier for the error"
                          },
                          "field_name": {
                            "type": "string",
                            "example": "siteId",
                            "description": "Name of the field that caused the error"
                          },
                          "error_code": {
                            "type": "integer",
                            "example": 1001,
                            "description": "Numeric code identifying the type of error"
                          },
                          "message": {
                            "type": "string",
                            "example": "The 'siteId' field is required and must not be empty",
                            "description": "Human-readable error message"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/content/files": {
      "post": {
        "operationId": "addFilesUser",
        "tags": [
          "Files"
        ],
        "summary": "Add files",
        "description": "This API lets you add files to a site.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parent_dir": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the parent directory",
                    "example": "123e4567-e89b-12d3-a456-426614174000"
                  },
                  "file_id": {
                    "type": "array",
                    "items": {
                      "title": "Files",
                      "type": "object",
                      "description": "File object with provider-specific properties",
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "description": "File identifier"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true,
                          "description": "File name"
                        },
                        "type": {
                          "type": "string",
                          "nullable": true,
                          "description": "File type/MIME type"
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true,
                          "description": "File size in bytes"
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1,
                          "nullable": true,
                          "description": "File version number"
                        }
                      },
                      "required": [
                        "file_id",
                        "provider"
                      ],
                      "allOf": [
                        {
                          "oneOf": [
                            {
                              "type": "object",
                              "title": "Intranet File",
                              "description": "File stored in intranet with UUID file_id",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "intranet"
                                  ]
                                },
                                "file_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "provider",
                                "file_id"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "Google Drive File",
                              "description": "File stored in Google Drive with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "googledrive"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 1
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "Box File",
                              "description": "File stored in Box with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "box"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "OneDrive File",
                              "description": "File stored in OneDrive with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "onedrive"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "SharePoint File",
                              "description": "File stored in SharePoint with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "sharepoint"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "Dropbox File",
                              "description": "File stored in Dropbox with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "dropbox"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      ]
                    },
                    "description": "Array of files to be added"
                  },
                  "site_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the site",
                    "example": "123e4567-e89b-12d3-a456-426614174000"
                  }
                },
                "required": [
                  "file_id",
                  "site_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "listOfFiles": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "example": "PNG"
                              },
                              "title": {
                                "type": "string",
                                "example": "Screenshot 2025-10-14 at 1.05.47 AM.png"
                              },
                              "provider": {
                                "type": "string",
                                "example": "intranet"
                              },
                              "driveType": {
                                "type": "string",
                                "nullable": true,
                                "example": null
                              },
                              "owner": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "example": "Ajay Tanwar"
                                  },
                                  "id": {
                                    "type": "string",
                                    "example": "e5149282-2b89-4588-8b70-590ea3218e83"
                                  }
                                }
                              },
                              "onlyPDFDownload": {
                                "type": "boolean",
                                "example": false
                              },
                              "modifiedAtDateTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-11-18T07:17:14.244Z"
                              },
                              "modifiedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-11-18T07:17:14.244Z"
                              },
                              "filepk": {
                                "type": "string",
                                "example": "1186775"
                              },
                              "listOfSite": {
                                "type": "array",
                                "items": {
                                  "type": "object"
                                },
                                "example": []
                              },
                              "isDownloadableOniOS": {
                                "type": "boolean",
                                "example": true
                              },
                              "id": {
                                "type": "string",
                                "example": "f5f4a9db-462d-4a15-8d27-4845ce3b82cc"
                              },
                              "isExternal": {
                                "type": "boolean",
                                "example": false
                              },
                              "isRestricted": {
                                "type": "boolean",
                                "example": false
                              },
                              "canMarkRestricted": {
                                "type": "boolean",
                                "example": false
                              },
                              "canMarkUnrestricted": {
                                "type": "boolean",
                                "example": false
                              },
                              "fileExtension": {
                                "type": "string",
                                "example": "png"
                              },
                              "isImage": {
                                "type": "boolean",
                                "example": true
                              },
                              "isAudio": {
                                "type": "boolean",
                                "example": false
                              },
                              "thumbnailImg": {
                                "type": "string",
                                "example": "https://zeta-qna.dev.simpplr.xyz/content/r/f5f4a9db-462d-4a15-8d27-4845ce3b82cc?site_id=YzVhZWVjNjItNTZmZC00NTJmLWJiNDMtMDU0ZGVmOTQ1OGYy"
                              },
                              "downloadUrl": {
                                "type": "string",
                                "example": "https://zeta-qna.dev.simpplr.xyz/content/r/f5f4a9db-462d-4a15-8d27-4845ce3b82cc?site_id=YzVhZWVjNjItNTZmZC00NTJmLWJiNDMtMDU0ZGVmOTQ1OGYy"
                              },
                              "fileId": {
                                "type": "string",
                                "example": "f5f4a9db-462d-4a15-8d27-4845ce3b82cc"
                              },
                              "size": {
                                "type": "string",
                                "example": "354007"
                              },
                              "version": {
                                "type": "integer",
                                "example": 1
                              },
                              "description": {
                                "type": "string",
                                "example": ""
                              },
                              "canFavorite": {
                                "type": "boolean",
                                "example": true
                              },
                              "canLike": {
                                "type": "boolean",
                                "example": true
                              },
                              "isLiked": {
                                "type": "boolean",
                                "example": false
                              },
                              "isFavorited": {
                                "type": "boolean",
                                "example": false
                              },
                              "canEditDescription": {
                                "type": "boolean",
                                "example": true
                              },
                              "canDelete": {
                                "type": "boolean",
                                "example": true
                              },
                              "canCreateNewVersion": {
                                "type": "boolean",
                                "example": true
                              },
                              "canDownload": {
                                "type": "boolean",
                                "example": true
                              },
                              "altText": {
                                "type": "string",
                                "example": ""
                              },
                              "canCreatePublicShareLink": {
                                "type": "boolean",
                                "example": false
                              },
                              "canRemove": {
                                "type": "boolean",
                                "example": true
                              },
                              "canMove": {
                                "type": "boolean",
                                "example": true
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error"
                    },
                    "message": {
                      "type": "string",
                      "example": "Failed to add files"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "seq_id": {
                            "type": "integer",
                            "example": 0
                          },
                          "field_name": {
                            "type": "string",
                            "example": "site"
                          },
                          "error_code": {
                            "type": "integer",
                            "example": 1001
                          },
                          "message": {
                            "type": "string",
                            "example": "The site is deactivated"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Unauthorized": {
        "description": "Authorize error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "example": "Missing/Invalid authentication token"
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error_code": {
                  "type": "integer",
                  "example": 2001
                },
                "message": {
                  "type": "string",
                  "example": "Something went wrong, please try again"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiAuthSecurity": {
        "type": "oauth2",
        "description": "This API uses OAuth 2 with the implicit grant flow.",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://platform.test.simpplr.xyz/v1",
            "scopes": {
              "read": "read data",
              "write": "create/update data",
              "everything": "allow full access"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiAuthSecurity": []
    }
  ]
}
```