> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quickblox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Event

> Edit event.

#### Path Parameters

<ParamField path="event_id" type="integer">ID of the event. </ParamField>

#### Body Parameters

<ParamField body="event" type="object">
  <Expandable title="event object">
    <ParamField body="active" type="boolean">
      Marks event as active/inactive. Possible values are: `true` and `false`.
    </ParamField>

    <ParamField body="message" type="string">
      Encoded message payload. Can be Base64 encoded plain text or push notification payload
      ([Push notifications formats](/reference/push-notification-formats)).
    </ParamField>

    <ParamField body="date" type="date-time">
      The date of the event. If `event_type=fixed_date`, the date cannot be in the past.
    </ParamField>

    <ParamField body="period" type="date-time">
      The period of the event in seconds.
    </ParamField>

    <ParamField body="name" type="string">
      The name of the event.
    </ParamField>
  </Expandable>
</ParamField>

#### Headers

<ParamField header="QB-Token" type="string" required>
  A user session token. See [Authentication](/reference/authentication) page
  to learn more about the session token.
</ParamField>

#### Responses

<AccordionGroup>
  <Accordion title="200">
    A successful response

    <ResponseField name="event" type="object">
      <Expandable title="properties">
        <ResponseField name="id" type="integer" />

        <ResponseField name="event_type" type="string" />

        <ResponseField name="message" type="string" />

        <ResponseField name="date" type="string" />

        <ResponseField name="period" type="string" />

        <ResponseField name="name" type="string" />

        <ResponseField name="occured_count" type="integer" />

        <ResponseField name="created_at" type="string" />

        <ResponseField name="updated_at" type="string" />

        <ResponseField name="end_date" type="string" />

        <ResponseField name="active" type="boolean" />

        <ResponseField name="application_id" type="integer" />

        <ResponseField name="user_id" type="integer" />

        <ResponseField name="kind" type="string" />

        <ResponseField name="environment" type="string" />

        <ResponseField name="tag_query" type="string" />

        <ResponseField name="notification_channel" type="object">
          <Expandable title="properties">
            <ResponseField name="name" type="string" />
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="400">
    An error response
  </Accordion>

  <Accordion title="422">
    An error response

    <Expandable title="Option 1">
      <ResponseField name="errors" type="object">
        <Expandable title="properties">
          <ResponseField name="period" type="array of strings" />

          <ResponseField name="end_date" type="array of strings" />

          <ResponseField name="name" type="array of strings" />
        </Expandable>
      </ResponseField>
    </Expandable>

    <Expandable title="Option 2">
      <ResponseField name="errors" type="object">
        <Expandable title="properties">
          <ResponseField name="date" type="array of strings" />
        </Expandable>
      </ResponseField>
    </Expandable>

    <Expandable title="Option 3">
      <ResponseField name="errors" type="object">
        <Expandable title="properties">
          <ResponseField name="event_type" type="array of strings" />
        </Expandable>
      </ResponseField>
    </Expandable>
  </Accordion>
</AccordionGroup>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT \
  -H "Content-Type: application/json" \
  -H "QB-Token: 37d3a10a1843ac780cb6f2c683bddad2b0012bba" \
  -d '{  
    "event":{  
      "date":"1568839180",
      "period":"86400",
      "name":"My New Event"
    }
  }' \
  https://api.quickblox.com/events/30529342.json
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "event": {
      "id": 30529342,
      "event_type": "period_date",
      "message": "payload=eyJhcHMiOnsiYWxlcnQiOiJQdXNoIG5vdGlmaWNhdGlvbiBmcm9tIFRheWxvciIsInNvdW5kIjoiZGVmYXVsdCJ9fQ==",
      "date": 1568839180,
      "period": 86400,
      "name": "My New Event",
      "occured_count": 0,
      "created_at": "2019-09-01T20:19:08Z",
      "updated_at": "2019-09-03T19:45:42Z",
      "end_date": 1569359375,
      "active": false,
      "application_id": 76730,
      "user_id": 91141808,
      "kind": "API",
      "environment": "production",
      "tag_query": null,
      "notification_channel": {
        "name": "apns"
      }
    }
  }
  ```

  ```json 400 theme={null}
  {}
  ```

  ```json 422 theme={null}
  {
    "errors": {
      "event_type": [
        "is not included in the list"
      ]
    }
  }
  ```
</ResponseExample>
