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

# Create Event

> Create a new event in your organization.

## Request Body

<ParamField body="name" type="string" required>
  Event name
</ParamField>

<ParamField body="description" type="string">
  Event description
</ParamField>

<ParamField body="event_type" type="string" required>
  Type of event. Options: `advisory_board`, `speaker_program`, `conference`, `workshop`, `webinar`, `dinner`, `other`
</ParamField>

<ParamField body="start_date" type="string" required>
  Start date and time (ISO 8601)
</ParamField>

<ParamField body="end_date" type="string" required>
  End date and time (ISO 8601)
</ParamField>

<ParamField body="location" type="object">
  <Expandable title="Location details">
    <ParamField body="type" type="string" required>
      Location type: `in_person`, `virtual`, `hybrid`
    </ParamField>

    <ParamField body="venue" type="string">
      Venue name (for in-person)
    </ParamField>

    <ParamField body="address" type="string">
      Full address
    </ParamField>

    <ParamField body="city" type="string">
      City
    </ParamField>

    <ParamField body="country" type="string">
      Country code
    </ParamField>

    <ParamField body="virtual_link" type="string">
      Video conference link (for virtual/hybrid)
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="visibility" type="string" default="organization">
  Event visibility. Options: `private`, `organization`, `invite_only`
</ParamField>

<ParamField body="agenda" type="array">
  <Expandable title="Agenda items">
    <ParamField body="time" type="string">
      Time slot (e.g., "09:00-10:00")
    </ParamField>

    <ParamField body="title" type="string">
      Session title
    </ParamField>

    <ParamField body="speaker_id" type="string">
      KOL ID for speaker
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="attendees" type="array">
  List of KOL IDs to invite
</ParamField>

## Response

Returns the created event object.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.medstrato.com/v1/events" \
    -H "Authorization: Bearer sk_live_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Q2 Orthopedics Advisory Board",
      "description": "Quarterly meeting to discuss robotic surgery trends",
      "event_type": "advisory_board",
      "start_date": "2024-06-20T09:00:00Z",
      "end_date": "2024-06-20T17:00:00Z",
      "location": {
        "type": "in_person",
        "venue": "Four Seasons Hotel",
        "city": "Boston",
        "country": "US"
      },
      "visibility": "invite_only",
      "attendees": ["kol_abc123", "kol_def456"]
    }'
  ```

  ```javascript Node.js theme={null}
  const event = await medstrato.events.create({
    name: 'Q2 Orthopedics Advisory Board',
    description: 'Quarterly meeting to discuss robotic surgery trends',
    event_type: 'advisory_board',
    start_date: '2024-06-20T09:00:00Z',
    end_date: '2024-06-20T17:00:00Z',
    location: {
      type: 'in_person',
      venue: 'Four Seasons Hotel',
      city: 'Boston',
      country: 'US'
    },
    visibility: 'invite_only',
    attendees: ['kol_abc123', 'kol_def456']
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "id": "evt_new123",
      "name": "Q2 Orthopedics Advisory Board",
      "description": "Quarterly meeting to discuss robotic surgery trends",
      "event_type": "advisory_board",
      "status": "draft",
      "start_date": "2024-06-20T09:00:00Z",
      "end_date": "2024-06-20T17:00:00Z",
      "location": {
        "type": "in_person",
        "venue": "Four Seasons Hotel",
        "city": "Boston",
        "country": "US"
      },
      "visibility": "invite_only",
      "attendee_count": 2,
      "rsvp_stats": {
        "confirmed": 0,
        "pending": 2,
        "declined": 0
      },
      "created_at": "2024-01-20T14:30:00Z",
      "updated_at": "2024-01-20T14:30:00Z"
    }
  }
  ```
</ResponseExample>
