logo
Events/Id

Update event

Update an existing event by its unique ID.

PATCH
/events/{id}

Authorization

x-kommunity-api-key<token>

In: header

Request Body

application/jsonRequired
namestring
descriptionstring
categorystring
subcategorystring
attendeeLimitinteger
hostNamestring
emailstring
Format: "email"
phonestring
countrystring
streetstring
citystring
statestring
zipCodestring
eventImgstring
startTimestring
endTimestring
timezonestring
ticketsarray<object>

Only include the ID if you want to update an existing ticket

joinUrlstring
questionsarray<object>

Only include the ID if you want to update an existing question

Path Parameters

idRequiredstring

Unique identifier for the event

Response Body

Event updated successfully

TypeScript Definitions

Use the response body type in TypeScript.

successboolean
dataobject

Invalid event data or unknown argument

TypeScript Definitions

Use the response body type in TypeScript.

successRequiredboolean
Value in: false
errorRequiredstring
detailsstring

Unauthorized - Invalid API key or permission

TypeScript Definitions

Use the response body type in TypeScript.

successRequiredboolean
Value in: false
errorRequiredstring
detailsstring

Event not found or no permission

TypeScript Definitions

Use the response body type in TypeScript.

successRequiredboolean
Value in: false
errorRequiredstring
detailsstring

Server error

TypeScript Definitions

Use the response body type in TypeScript.

successRequiredboolean
Value in: false
errorRequiredstring
detailsstring
curl -X PATCH "/api/v1/events/string" \
  -H "x-kommunity-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "category": "string",
    "subcategory": "string",
    "attendeeLimit": 0,
    "hostName": "string",
    "email": "[email protected]",
    "phone": "string",
    "country": "string",
    "street": "string",
    "city": "string",
    "state": "string",
    "zipCode": "string",
    "eventImg": "string",
    "startTime": "string",
    "endTime": "string",
    "timezone": "string",
    "tickets": [
      {
        "id": "string",
        "name": "string",
        "price": 0
      }
    ],
    "joinUrl": "string",
    "questions": [
      {
        "id": "string",
        "question": "string",
        "required": true
      }
    ]
  }'
const body = JSON.stringify({
  "name": "string",
  "description": "string",
  "category": "string",
  "subcategory": "string",
  "attendeeLimit": 0,
  "hostName": "string",
  "email": "[email protected]",
  "phone": "string",
  "country": "string",
  "street": "string",
  "city": "string",
  "state": "string",
  "zipCode": "string",
  "eventImg": "string",
  "startTime": "string",
  "endTime": "string",
  "timezone": "string",
  "tickets": [
    {
      "id": "string",
      "name": "string",
      "price": 0
    }
  ],
  "joinUrl": "string",
  "questions": [
    {
      "id": "string",
      "question": "string",
      "required": true
    }
  ]
})

fetch("/api/v1/events/string", {
  headers: {
    "x-kommunity-api-key": "<token>"
  },
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "/api/v1/events/string"
  body := strings.NewReader(`{
    "name": "string",
    "description": "string",
    "category": "string",
    "subcategory": "string",
    "attendeeLimit": 0,
    "hostName": "string",
    "email": "[email protected]",
    "phone": "string",
    "country": "string",
    "street": "string",
    "city": "string",
    "state": "string",
    "zipCode": "string",
    "eventImg": "string",
    "startTime": "string",
    "endTime": "string",
    "timezone": "string",
    "tickets": [
      {
        "id": "string",
        "name": "string",
        "price": 0
      }
    ],
    "joinUrl": "string",
    "questions": [
      {
        "id": "string",
        "question": "string",
        "required": true
      }
    ]
  }`)
  req, _ := http.NewRequest("PATCH", url, body)
  req.Header.Add("x-kommunity-api-key", "<token>")
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "/api/v1/events/string"
body = {
  "name": "string",
  "description": "string",
  "category": "string",
  "subcategory": "string",
  "attendeeLimit": 0,
  "hostName": "string",
  "email": "[email protected]",
  "phone": "string",
  "country": "string",
  "street": "string",
  "city": "string",
  "state": "string",
  "zipCode": "string",
  "eventImg": "string",
  "startTime": "string",
  "endTime": "string",
  "timezone": "string",
  "tickets": [
    {
      "id": "string",
      "name": "string",
      "price": 0
    }
  ],
  "joinUrl": "string",
  "questions": [
    {
      "id": "string",
      "question": "string",
      "required": true
    }
  ]
}
response = requests.request("PATCH", url, json = body, headers = {
  "x-kommunity-api-key": "<token>",
  "Content-Type": "application/json"
})

print(response.text)
{
  "success": true,
  "data": {
    "name": "string",
    "description": "string",
    "category": "string",
    "subcategory": "string",
    "hostName": "string",
    "attendeeLimit": 1,
    "country": "string",
    "street": "string",
    "city": "string",
    "state": "string",
    "zipCode": "string",
    "eventImg": "string",
    "startTime": "2019-08-24T14:15:22Z",
    "endTime": "2019-08-24T14:15:22Z",
    "timezone": "string",
    "email": "[email protected]",
    "phone": "string",
    "tickets": [
      {
        "id": "string",
        "name": "string",
        "price": 0
      }
    ],
    "joinUrl": "string",
    "questions": [
      {
        "id": "string",
        "question": "string",
        "required": true
      }
    ]
  }
}
{
  "success": false,
  "error": "string",
  "details": "string"
}
{
  "success": false,
  "error": "string",
  "details": "string"
}
{
  "success": false,
  "error": "string",
  "details": "string"
}
{
  "success": false,
  "error": "string",
  "details": "string"
}