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

# Admin Patch Event

> Partial update as the team principal -- only fields present in the
request body are applied.

Host rules are identical to the member-facing update endpoint:
``host_contact_ids`` replaces the event's whole host set with the
ordered list sent (1 to 3 entries), ``host_contact_id`` replaces it
with that one contact, the two are mutually exclusive, neither may be
sent as an explicit null (nor the list as an empty array), and every
contact named as a host must already be a current, active member of
this hub or the whole request is rejected with 422
(``host_not_active_member``). That rejection does not say which entry
failed or why, but it does confirm membership one contact at a time;
this is accepted because the team principal can already list this
hub's members directly.

Binding a NEW ``cover_media_id`` additionally requires the caller to
have a current, active member identity in this hub (422
``author_not_active_member`` otherwise). An update that leaves the
cover unchanged -- including one that resends the event's current
``cover_media_id`` -- carries no such requirement.

A request that changes something emits hub_event.updated; a request
whose supplied fields all already match the stored event is a no-op
and emits nothing.



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/admin/teams/{team_id}/hubs/{hub_id}/events/{event_id}
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/admin/teams/{team_id}/hubs/{hub_id}/events/{event_id}:
    patch:
      tags:
        - hub-events-admin
      summary: Admin Patch Event
      description: |-
        Partial update as the team principal -- only fields present in the
        request body are applied.

        Host rules are identical to the member-facing update endpoint:
        ``host_contact_ids`` replaces the event's whole host set with the
        ordered list sent (1 to 3 entries), ``host_contact_id`` replaces it
        with that one contact, the two are mutually exclusive, neither may be
        sent as an explicit null (nor the list as an empty array), and every
        contact named as a host must already be a current, active member of
        this hub or the whole request is rejected with 422
        (``host_not_active_member``). That rejection does not say which entry
        failed or why, but it does confirm membership one contact at a time;
        this is accepted because the team principal can already list this
        hub's members directly.

        Binding a NEW ``cover_media_id`` additionally requires the caller to
        have a current, active member identity in this hub (422
        ``author_not_active_member`` otherwise). An update that leaves the
        cover unchanged -- including one that resends the event's current
        ``cover_media_id`` -- carries no such requirement.

        A request that changes something emits hub_event.updated; a request
        whose supplied fields all already match the stored event is a no-op
        and emits nothing.
      operationId: >-
        hub_events_admin.patch_hub_events_admin_patch_admin_teams_by_team_id_hubs_by_hub_id_events_by_event_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: path
          name: event_id
          required: true
          schema:
            title: Event Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HubEventUpdateEnvelope'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HubEventResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    HubEventUpdateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/HubEventUpdateResource'
      required:
        - data
      title: HubEventUpdateEnvelope
      type: object
    HubEventResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/HubEventResource'
      required:
        - data
      title: HubEventResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    HubEventUpdateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/HubEventUpdateAttributes'
        id:
          description: >-
            Optional. When present it must equal the id of the resource this
            request updates; a different id is a 409 resource_id_mismatch and
            null is a 422.
          title: Id
          type: string
        type:
          const: hub_events
          title: Type
          type: string
      required:
        - type
        - attributes
      title: HubEventUpdateResource
      type: object
    HubEventResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/HubEventAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        type:
          const: hub_events
          default: hub_events
          title: Type
          type: string
      required:
        - id
        - attributes
      title: HubEventResource
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    HubEventUpdateAttributes:
      additionalProperties: false
      properties:
        attendee_list_visible:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Attendee List Visible
        broadcast:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Update the stored broadcast choice for this event. Changing it NEVER
            re-announces the event and never rewrites the announcement record:
            announced_at and announced_loudly are stamped once, at announcement
            time, and are not settable through this endpoint. Cannot be
            explicitly nulled -- omit the field to leave the stored choice
            unchanged.
          title: Broadcast
        capacity:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          title: Capacity
        cover_image_url:
          anyOf:
            - maxLength: 1024
              type: string
            - type: 'null'
          description: >-
            Legacy raw cover URL. Rejected with 422 when this event already has
            a bound cover_media_id and the new value differs from what's stored,
            UNLESS cover_media_id is ALSO set to null in the same request --
            cover_url is derived from the bound media whenever one is set, so an
            unpaired cover_image_url change would otherwise be silently ignored.
            Send cover_media_id: null alongside the new cover_image_url to
            switch back to a URL cover.
          title: Cover Image Url
        cover_media_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Soft ref to a Media row; nullable via PATCH to clear a media-backed
            cover (falls back to cover_image_url, if any). Binding is ONE-SHOT:
            clearing this field and then re-sending the SAME media id 422s
            permanently (its one-use upload session was already consumed by the
            original bind) -- the only recovery is a fresh upload. Conflict
            rule: while this field is bound (non-null), changing cover_image_url
            alone (without also nulling this field) is rejected with 422.
          title: Cover Media Id
        description:
          anyOf:
            - maxLength: 20000
              type: string
            - type: 'null'
          title: Description
        ends_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Ends At
        host_contact_id:
          anyOf:
            - maxLength: 36
              type: string
            - type: 'null'
          description: >-
            Contact id to record as this event's SOLE host, REPLACING the whole
            existing host set with just this one -- shorthand for
            host_contact_ids=[this value]. Same validation as on create: must
            resolve as a CURRENT, active member of this hub (422 otherwise); the
            target need not hold an elevated role. Cannot be explicitly nulled
            -- omit the field to leave the host set unchanged. Mutually
            exclusive with host_contact_ids -- sending both is 422.
          title: Host Contact Id
        host_contact_ids:
          anyOf:
            - items:
                type: string
              maxItems: 3
              minItems: 1
              type: array
            - type: 'null'
          description: >-
            The full, ordered set of contact ids to record as this event's hosts
            (1 to 3 entries), REPLACING the existing set entirely -- not a
            merge/patch of individual hosts. Cannot be explicitly nulled or sent
            as an empty list (an event always needs at least one host). Every id
            must resolve as a CURRENT, active member of this hub, or the WHOLE
            request is rejected with 422 (fail closed). Mutually exclusive with
            host_contact_id -- sending both is 422.
          title: Host Contact Ids
        location_address:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          title: Location Address
        location_type:
          anyOf:
            - enum:
                - url
                - address
              type: string
            - type: 'null'
          title: Location Type
        location_url:
          anyOf:
            - maxLength: 1024
              type: string
            - type: 'null'
          title: Location Url
        rsvp_tag_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Rsvp Tag Id
        segment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Segment Id
        starts_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Starts At
        timezone:
          anyOf:
            - maxLength: 64
              minLength: 1
              type: string
            - type: 'null'
          title: Timezone
        title:
          anyOf:
            - maxLength: 200
              minLength: 1
              type: string
            - type: 'null'
          title: Title
        visibility:
          anyOf:
            - enum:
                - all_members
                - segment
              type: string
            - type: 'null'
          title: Visibility
      title: HubEventUpdateAttributes
      type: object
    HubEventAttributes:
      additionalProperties: false
      properties:
        announced_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When members were told this event exists, or null. Visible only to
            hub staff; always null for everyone else. Null also for an event
            that was never announced -- including events created before
            announcements shipped -- so a client renders the announcement chip
            if and only if this is present.
          title: Announced At
        announced_loudly:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether that announcement went out as a broadcast. Only ever
            non-null alongside announced_at, and only for hub staff. It records
            what was actually sent, so it does not change if the host later
            flips the broadcast switch.
          title: Announced Loudly
        attendee_list_visible:
          title: Attendee List Visible
          type: boolean
        attendee_sample_contact_ids:
          default: []
          items:
            type: string
          title: Attendee Sample Contact Ids
          type: array
        broadcast:
          description: >-
            Whether this event's announcement goes out as a broadcast. Not a
            mute switch -- see the create endpoint's field of the same name.
          title: Broadcast
          type: boolean
        capacity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Capacity
        cover_image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cover Image Url
        cover_media_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Soft ref to the bound Media row, or null when no media-backed cover
            is set. When non-null, cover_url is derived from this media rather
            than cover_image_url. See PATCH .../events/{id}'s cover_media_id
            field for the one-shot bind/clear limitation.
          title: Cover Media Id
        cover_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Derived, read-only display URL for the event cover -- resolved fresh
            on every read, never independently settable. A freshly (re-)signed
            URL when cover_media_id is bound and resolvable, else the raw
            cover_image_url value, else null.
          title: Cover Url
        cover_url_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            Expiry timestamp sealed into the signed cover_url, or null when
            cover_url is unsigned (a raw cover_image_url fallback) or itself
            null.
          title: Cover Url Expires At
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        ends_at:
          format: date-time
          title: Ends At
          type: string
        going_count:
          title: Going Count
          type: integer
        google_calendar_url:
          title: Google Calendar Url
          type: string
        host_contact_id:
          title: Host Contact Id
          type: string
        host_contact_ids:
          items:
            type: string
          maxItems: 3
          minItems: 1
          title: Host Contact Ids
          type: array
        hub_id:
          title: Hub Id
          type: string
        is_full:
          title: Is Full
          type: boolean
        location_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Address
        location_type:
          enum:
            - url
            - address
          title: Location Type
          type: string
        location_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Url
        my_rsvp_status:
          anyOf:
            - enum:
                - going
                - not_going
                - maybe
              type: string
            - type: 'null'
          title: My Rsvp Status
        rsvp_tag_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Rsvp Tag Id
        segment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Segment Id
        starts_at:
          format: date-time
          title: Starts At
          type: string
        status:
          enum:
            - scheduled
            - cancelled
          title: Status
          type: string
        team_id:
          title: Team Id
          type: string
        timezone:
          title: Timezone
          type: string
        title:
          title: Title
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
        visibility:
          enum:
            - all_members
            - segment
          title: Visibility
          type: string
      required:
        - hub_id
        - team_id
        - title
        - description
        - cover_image_url
        - cover_media_id
        - cover_url
        - cover_url_expires_at
        - starts_at
        - ends_at
        - timezone
        - location_type
        - location_url
        - location_address
        - capacity
        - host_contact_id
        - host_contact_ids
        - visibility
        - segment_id
        - rsvp_tag_id
        - attendee_list_visible
        - status
        - going_count
        - is_full
        - google_calendar_url
        - my_rsvp_status
        - broadcast
        - announced_at
        - announced_loudly
        - created_at
        - updated_at
      title: HubEventAttributes
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.