curl --request POST \
--url https://api.member.dev/api/v1/hubs/{hub_id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"attributes": {
"ends_at": "2023-11-07T05:31:56Z",
"starts_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"title": "<string>",
"attendee_list_visible": true,
"broadcast": false,
"capacity": 2,
"cover_image_url": "<string>",
"cover_media_id": "<string>",
"description": "<string>",
"host_contact_id": "<string>",
"host_contact_ids": [
"<string>"
],
"location_address": "<string>",
"location_url": "<string>",
"rsvp_tag_id": "<string>",
"segment_id": "<string>",
"visibility": "all_members"
},
"type": "hub_events"
}
}
'import requests
url = "https://api.member.dev/api/v1/hubs/{hub_id}/events"
payload = { "data": {
"attributes": {
"ends_at": "2023-11-07T05:31:56Z",
"starts_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"title": "<string>",
"attendee_list_visible": True,
"broadcast": False,
"capacity": 2,
"cover_image_url": "<string>",
"cover_media_id": "<string>",
"description": "<string>",
"host_contact_id": "<string>",
"host_contact_ids": ["<string>"],
"location_address": "<string>",
"location_url": "<string>",
"rsvp_tag_id": "<string>",
"segment_id": "<string>",
"visibility": "all_members"
},
"type": "hub_events"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
attributes: {
ends_at: '2023-11-07T05:31:56Z',
starts_at: '2023-11-07T05:31:56Z',
timezone: '<string>',
title: '<string>',
attendee_list_visible: true,
broadcast: false,
capacity: 2,
cover_image_url: '<string>',
cover_media_id: '<string>',
description: '<string>',
host_contact_id: '<string>',
host_contact_ids: ['<string>'],
location_address: '<string>',
location_url: '<string>',
rsvp_tag_id: '<string>',
segment_id: '<string>',
visibility: 'all_members'
},
type: 'hub_events'
}
})
};
fetch('https://api.member.dev/api/v1/hubs/{hub_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.member.dev/api/v1/hubs/{hub_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'attributes' => [
'ends_at' => '2023-11-07T05:31:56Z',
'starts_at' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'title' => '<string>',
'attendee_list_visible' => true,
'broadcast' => false,
'capacity' => 2,
'cover_image_url' => '<string>',
'cover_media_id' => '<string>',
'description' => '<string>',
'host_contact_id' => '<string>',
'host_contact_ids' => [
'<string>'
],
'location_address' => '<string>',
'location_url' => '<string>',
'rsvp_tag_id' => '<string>',
'segment_id' => '<string>',
'visibility' => 'all_members'
],
'type' => 'hub_events'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.member.dev/api/v1/hubs/{hub_id}/events"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"attendee_list_visible\": true,\n \"broadcast\": false,\n \"capacity\": 2,\n \"cover_image_url\": \"<string>\",\n \"cover_media_id\": \"<string>\",\n \"description\": \"<string>\",\n \"host_contact_id\": \"<string>\",\n \"host_contact_ids\": [\n \"<string>\"\n ],\n \"location_address\": \"<string>\",\n \"location_url\": \"<string>\",\n \"rsvp_tag_id\": \"<string>\",\n \"segment_id\": \"<string>\",\n \"visibility\": \"all_members\"\n },\n \"type\": \"hub_events\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.member.dev/api/v1/hubs/{hub_id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"attributes\": {\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"attendee_list_visible\": true,\n \"broadcast\": false,\n \"capacity\": 2,\n \"cover_image_url\": \"<string>\",\n \"cover_media_id\": \"<string>\",\n \"description\": \"<string>\",\n \"host_contact_id\": \"<string>\",\n \"host_contact_ids\": [\n \"<string>\"\n ],\n \"location_address\": \"<string>\",\n \"location_url\": \"<string>\",\n \"rsvp_tag_id\": \"<string>\",\n \"segment_id\": \"<string>\",\n \"visibility\": \"all_members\"\n },\n \"type\": \"hub_events\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/hubs/{hub_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"attendee_list_visible\": true,\n \"broadcast\": false,\n \"capacity\": 2,\n \"cover_image_url\": \"<string>\",\n \"cover_media_id\": \"<string>\",\n \"description\": \"<string>\",\n \"host_contact_id\": \"<string>\",\n \"host_contact_ids\": [\n \"<string>\"\n ],\n \"location_address\": \"<string>\",\n \"location_url\": \"<string>\",\n \"rsvp_tag_id\": \"<string>\",\n \"segment_id\": \"<string>\",\n \"visibility\": \"all_members\"\n },\n \"type\": \"hub_events\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"announced_at": "2023-11-07T05:31:56Z",
"announced_loudly": true,
"attendee_list_visible": true,
"broadcast": true,
"capacity": 123,
"cover_image_url": "<string>",
"cover_media_id": "<string>",
"cover_url": "<string>",
"cover_url_expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"ends_at": "2023-11-07T05:31:56Z",
"going_count": 123,
"google_calendar_url": "<string>",
"host_contact_id": "<string>",
"host_contact_ids": [
"<string>"
],
"hub_id": "<string>",
"is_full": true,
"location_address": "<string>",
"location_type": "url",
"location_url": "<string>",
"my_rsvp_status": "going",
"rsvp_tag_id": "<string>",
"segment_id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"status": "scheduled",
"team_id": "<string>",
"timezone": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "all_members",
"attendee_sample_contact_ids": []
},
"id": "<string>",
"links": {
"self": "<string>"
},
"type": "hub_events"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Create Event
Create a hub event.
Hosts can be named on the request: host_contact_id records one
contact as the event’s sole host, and host_contact_ids records the
full ordered host set (1 to 3 entries — the maximum is enforced by the
API, not only by the UI). The two fields are mutually exclusive:
sending both, or sending either as an explicit null, is rejected with
422. Omit both and the authenticated caller becomes the event’s sole
host.
Every contact named as a host must already be a current, active member
of this hub. If any named contact is not, the whole request is rejected
with 422 (host_not_active_member) — never a partial accept. That
rejection does not say which entry failed or why, but it does confirm
membership one contact at a time: a caller allowed to manage events on
this hub can name a single contact and read success or 422 to learn
whether that contact is a current member. This is accepted rather than
hidden, because the same caller can already discover current members
through the @mention and direct-message candidate lists, which do not
depend on the member-directory setting. A host needs no elevated role:
being a host is attribution, and grants no permission to read or write
the event. The response’s host_contact_id is always
host_contact_ids[0].
Emits hub_event.created.
curl --request POST \
--url https://api.member.dev/api/v1/hubs/{hub_id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"attributes": {
"ends_at": "2023-11-07T05:31:56Z",
"starts_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"title": "<string>",
"attendee_list_visible": true,
"broadcast": false,
"capacity": 2,
"cover_image_url": "<string>",
"cover_media_id": "<string>",
"description": "<string>",
"host_contact_id": "<string>",
"host_contact_ids": [
"<string>"
],
"location_address": "<string>",
"location_url": "<string>",
"rsvp_tag_id": "<string>",
"segment_id": "<string>",
"visibility": "all_members"
},
"type": "hub_events"
}
}
'import requests
url = "https://api.member.dev/api/v1/hubs/{hub_id}/events"
payload = { "data": {
"attributes": {
"ends_at": "2023-11-07T05:31:56Z",
"starts_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"title": "<string>",
"attendee_list_visible": True,
"broadcast": False,
"capacity": 2,
"cover_image_url": "<string>",
"cover_media_id": "<string>",
"description": "<string>",
"host_contact_id": "<string>",
"host_contact_ids": ["<string>"],
"location_address": "<string>",
"location_url": "<string>",
"rsvp_tag_id": "<string>",
"segment_id": "<string>",
"visibility": "all_members"
},
"type": "hub_events"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
attributes: {
ends_at: '2023-11-07T05:31:56Z',
starts_at: '2023-11-07T05:31:56Z',
timezone: '<string>',
title: '<string>',
attendee_list_visible: true,
broadcast: false,
capacity: 2,
cover_image_url: '<string>',
cover_media_id: '<string>',
description: '<string>',
host_contact_id: '<string>',
host_contact_ids: ['<string>'],
location_address: '<string>',
location_url: '<string>',
rsvp_tag_id: '<string>',
segment_id: '<string>',
visibility: 'all_members'
},
type: 'hub_events'
}
})
};
fetch('https://api.member.dev/api/v1/hubs/{hub_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.member.dev/api/v1/hubs/{hub_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'attributes' => [
'ends_at' => '2023-11-07T05:31:56Z',
'starts_at' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'title' => '<string>',
'attendee_list_visible' => true,
'broadcast' => false,
'capacity' => 2,
'cover_image_url' => '<string>',
'cover_media_id' => '<string>',
'description' => '<string>',
'host_contact_id' => '<string>',
'host_contact_ids' => [
'<string>'
],
'location_address' => '<string>',
'location_url' => '<string>',
'rsvp_tag_id' => '<string>',
'segment_id' => '<string>',
'visibility' => 'all_members'
],
'type' => 'hub_events'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.member.dev/api/v1/hubs/{hub_id}/events"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"attendee_list_visible\": true,\n \"broadcast\": false,\n \"capacity\": 2,\n \"cover_image_url\": \"<string>\",\n \"cover_media_id\": \"<string>\",\n \"description\": \"<string>\",\n \"host_contact_id\": \"<string>\",\n \"host_contact_ids\": [\n \"<string>\"\n ],\n \"location_address\": \"<string>\",\n \"location_url\": \"<string>\",\n \"rsvp_tag_id\": \"<string>\",\n \"segment_id\": \"<string>\",\n \"visibility\": \"all_members\"\n },\n \"type\": \"hub_events\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.member.dev/api/v1/hubs/{hub_id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"attributes\": {\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"attendee_list_visible\": true,\n \"broadcast\": false,\n \"capacity\": 2,\n \"cover_image_url\": \"<string>\",\n \"cover_media_id\": \"<string>\",\n \"description\": \"<string>\",\n \"host_contact_id\": \"<string>\",\n \"host_contact_ids\": [\n \"<string>\"\n ],\n \"location_address\": \"<string>\",\n \"location_url\": \"<string>\",\n \"rsvp_tag_id\": \"<string>\",\n \"segment_id\": \"<string>\",\n \"visibility\": \"all_members\"\n },\n \"type\": \"hub_events\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/hubs/{hub_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"ends_at\": \"2023-11-07T05:31:56Z\",\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"title\": \"<string>\",\n \"attendee_list_visible\": true,\n \"broadcast\": false,\n \"capacity\": 2,\n \"cover_image_url\": \"<string>\",\n \"cover_media_id\": \"<string>\",\n \"description\": \"<string>\",\n \"host_contact_id\": \"<string>\",\n \"host_contact_ids\": [\n \"<string>\"\n ],\n \"location_address\": \"<string>\",\n \"location_url\": \"<string>\",\n \"rsvp_tag_id\": \"<string>\",\n \"segment_id\": \"<string>\",\n \"visibility\": \"all_members\"\n },\n \"type\": \"hub_events\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"announced_at": "2023-11-07T05:31:56Z",
"announced_loudly": true,
"attendee_list_visible": true,
"broadcast": true,
"capacity": 123,
"cover_image_url": "<string>",
"cover_media_id": "<string>",
"cover_url": "<string>",
"cover_url_expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"ends_at": "2023-11-07T05:31:56Z",
"going_count": 123,
"google_calendar_url": "<string>",
"host_contact_id": "<string>",
"host_contact_ids": [
"<string>"
],
"hub_id": "<string>",
"is_full": true,
"location_address": "<string>",
"location_type": "url",
"location_url": "<string>",
"my_rsvp_status": "going",
"rsvp_tag_id": "<string>",
"segment_id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"status": "scheduled",
"team_id": "<string>",
"timezone": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"visibility": "all_members",
"attendee_sample_contact_ids": []
},
"id": "<string>",
"links": {
"self": "<string>"
},
"type": "hub_events"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Send platform JWTs, contact JWTs, or team API keys as Authorization: Bearer <token>.
Path Parameters
Body
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes