Events

Search, create, read and delete Facebook events, list and invite their guests, and answer them with Unipile API.

Search events

Use Perform Events Search with these fields:

FieldValue
keywordsRequired.
start_date, end_dateDays (YYYY-MM-DD). The same day twice searches that day. Without dates, the search covers the next 12 months.
locationA list with the ID of one city: ["{CITY_ID}"]. Find it with List Search Parameters (type=location), see Facebook Search. Several cities get a 400.
categoryA list of numeric category IDs. Find them with List Search Parameters (type=event_category).

Facebook sets the page size: a page may hold fewer results than limit. Search results have dates, a place and a picture.


Create an event

Use Create an Event. The answer is the created event.

FieldBehaviour
name, start_atRequired. start_at must be in the future.
end_atOptional, after start_at. Without it, the event has no end.
timezoneIANA name (Europe/Paris), UTC by default: the time zone the event is shown in.
is_online + online_urlAn online event and the link to join it. A link Facebook blocks is refused, and the event may still be created without it.
locationWhere an in-person event takes place.
visibilityprivate by default; public, friends, or group with group_id.
group_idCreates the event in a group (visibility group). invite_group_members invites all its members; without group_id it gets a 400.
co_host_idsFacebook user IDs invited to co-host.
can_attendees_inviteFor a private event, true by default; another visibility gets a 400.
is_attendees_list_hiddenfalse by default.
curl --request POST \
     --url https://api.unipile.com/v2/{ACCOUNT_ID}/events \
     --header 'X-API-KEY: {YOUR_API_KEY}' \
     --header 'content-type: application/json' \
     --data '{
  "name": "Product demo",
  "start_at": "2026-12-10T17:00:00Z",
  "end_at": "2026-12-10T18:30:00Z",
  "timezone": "Europe/Paris",
  "is_online": true,
  "online_url": "https://meet.google.com/abc-defg-hij",
  "group_id": "{GROUP_ID}"
}'

Read, delete and list

  • Get an Event returns the details, the place or the link, and is_host.
  • List all Group's Events returns a group's upcoming events, or its past ones with period=past on the first page (the cursor of the next pages keeps the period). This list has no dates and places: retrieve each event for them.
  • Delete an Event deletes an event the account organizes. Someone else's event gets a 403.

Guests, invitations and RSVP

  • List all Event's Attendees: status is yes (going, the default), maybe (interested), noreply (invited) or no (declined). Facebook serves the first page only: raise limit (up to 100), a cursor gets a 400.
  • Respond to an Event: yes, maybe or no. On a public event, maybe marks it as interested and no stops following it. The organizer always attends its own event: its response gets a 400.
  • Invite a User to an Event invites a friend of the account (user_id, a numeric Facebook ID). They are then listed with status=noreply until they answer. Inviting the same friend again succeeds, and an unknown event gets a 404.
curl --request POST \
     --url https://api.unipile.com/v2/{ACCOUNT_ID}/events/{EVENT_ID}/attendees \
     --header 'X-API-KEY: {YOUR_API_KEY}' \
     --header 'content-type: application/json' \
     --data '{ "user_id": "100012345678901" }'

What’s Next

Continue with Facebook search.

Did this page help you?