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:
| Field | Value |
|---|---|
keywords | Required. |
start_date, end_date | Days (YYYY-MM-DD). The same day twice searches that day. Without dates, the search covers the next 12 months. |
location | A 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. |
category | A 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.
| Field | Behaviour |
|---|---|
name, start_at | Required. start_at must be in the future. |
end_at | Optional, after start_at. Without it, the event has no end. |
timezone | IANA name (Europe/Paris), UTC by default: the time zone the event is shown in. |
is_online + online_url | An online event and the link to join it. A link Facebook blocks is refused, and the event may still be created without it. |
location | Where an in-person event takes place. |
visibility | private by default; public, friends, or group with group_id. |
group_id | Creates the event in a group (visibility group). invite_group_members invites all its members; without group_id it gets a 400. |
co_host_ids | Facebook user IDs invited to co-host. |
can_attendees_invite | For a private event, true by default; another visibility gets a 400. |
is_attendees_list_hidden | false 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=paston the first page (thecursorof 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:
statusisyes(going, the default),maybe(interested),noreply(invited) orno(declined). Facebook serves the first page only: raiselimit(up to 100), acursorgets a400. - Respond to an Event:
yes,maybeorno. On a public event,maybemarks it as interested andnostops following it. The organizer always attends its own event: its response gets a400. - Invite a User to an Event invites a friend of the account (
user_id, a numeric Facebook ID). They are then listed withstatus=noreplyuntil they answer. Inviting the same friend again succeeds, and an unknown event gets a404.
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" }'Updated 3 days ago
What’s Next
Continue with Facebook search.
Did this page help you?