Create an event
curl --request POST \
--url https://api.spacebring.com/events/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"event": {
"endDate": "2023-11-07T05:31:56Z",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"price": {},
"showAttendees": true,
"venue": "<string>"
}
}
'import requests
url = "https://api.spacebring.com/events/v1"
payload = { "event": {
"endDate": "2023-11-07T05:31:56Z",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"price": {},
"showAttendees": True,
"venue": "<string>"
} }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
endDate: '2023-11-07T05:31:56Z',
locationRef: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
startDate: '2023-11-07T05:31:56Z',
title: '<string>',
description: '<string>',
media: [{key: '<string>', url: '<string>'}],
price: {},
showAttendees: true,
venue: '<string>'
}
})
};
fetch('https://api.spacebring.com/events/v1', 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.spacebring.com/events/v1",
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([
'event' => [
'endDate' => '2023-11-07T05:31:56Z',
'locationRef' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'startDate' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'description' => '<string>',
'media' => [
[
'key' => '<string>',
'url' => '<string>'
]
],
'price' => [
],
'showAttendees' => true,
'venue' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/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.spacebring.com/events/v1"
payload := strings.NewReader("{\n \"event\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"locationRef\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"media\": [\n {\n \"key\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"price\": {},\n \"showAttendees\": true,\n \"venue\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/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.spacebring.com/events/v1")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"locationRef\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"media\": [\n {\n \"key\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"price\": {},\n \"showAttendees\": true,\n \"venue\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacebring.com/events/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"locationRef\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"media\": [\n {\n \"key\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"price\": {},\n \"showAttendees\": true,\n \"venue\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"event": {
"confirmationEmail": {
"enabled": true,
"template": "<string>"
},
"createDate": "2023-11-07T05:31:56Z",
"customTax": {
"enabled": true,
"rate": 123
},
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limitedAttendees": {
"enabled": true,
"limit": 0
},
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timezoneId": "<string>",
"title": "<string>"
},
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"networkRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": {
"credits": {
"amount": 123,
"enabled": true,
"amountDiscounted": 123
},
"money": {
"amount": 123,
"enabled": true,
"amountDiscounted": 123
}
},
"showAttendees": true,
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>",
"attendees": 0,
"cancelDate": "2023-11-07T05:31:56Z",
"deleteDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"imageUrl": "<string>",
"joined": true,
"locale": "<string>",
"venue": "<string>"
}
}{
"message": "<string>",
"type": "<string>"
}Events
Create an event
Create an event.
OAuth
Required scopes:eventsPOST
/
events
/
v1
Create an event
curl --request POST \
--url https://api.spacebring.com/events/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"event": {
"endDate": "2023-11-07T05:31:56Z",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"price": {},
"showAttendees": true,
"venue": "<string>"
}
}
'import requests
url = "https://api.spacebring.com/events/v1"
payload = { "event": {
"endDate": "2023-11-07T05:31:56Z",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>",
"description": "<string>",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"price": {},
"showAttendees": True,
"venue": "<string>"
} }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
endDate: '2023-11-07T05:31:56Z',
locationRef: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
startDate: '2023-11-07T05:31:56Z',
title: '<string>',
description: '<string>',
media: [{key: '<string>', url: '<string>'}],
price: {},
showAttendees: true,
venue: '<string>'
}
})
};
fetch('https://api.spacebring.com/events/v1', 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.spacebring.com/events/v1",
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([
'event' => [
'endDate' => '2023-11-07T05:31:56Z',
'locationRef' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'startDate' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'description' => '<string>',
'media' => [
[
'key' => '<string>',
'url' => '<string>'
]
],
'price' => [
],
'showAttendees' => true,
'venue' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/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.spacebring.com/events/v1"
payload := strings.NewReader("{\n \"event\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"locationRef\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"media\": [\n {\n \"key\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"price\": {},\n \"showAttendees\": true,\n \"venue\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/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.spacebring.com/events/v1")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"locationRef\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"media\": [\n {\n \"key\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"price\": {},\n \"showAttendees\": true,\n \"venue\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spacebring.com/events/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"locationRef\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"media\": [\n {\n \"key\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"price\": {},\n \"showAttendees\": true,\n \"venue\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"event": {
"confirmationEmail": {
"enabled": true,
"template": "<string>"
},
"createDate": "2023-11-07T05:31:56Z",
"customTax": {
"enabled": true,
"rate": 123
},
"endDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limitedAttendees": {
"enabled": true,
"limit": 0
},
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timezoneId": "<string>",
"title": "<string>"
},
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media": [
{
"key": "<string>",
"url": "<string>"
}
],
"networkRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": {
"credits": {
"amount": 123,
"enabled": true,
"amountDiscounted": 123
},
"money": {
"amount": 123,
"enabled": true,
"amountDiscounted": 123
}
},
"showAttendees": true,
"startDate": "2023-11-07T05:31:56Z",
"title": "<string>",
"attendees": 0,
"cancelDate": "2023-11-07T05:31:56Z",
"deleteDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"imageUrl": "<string>",
"joined": true,
"locale": "<string>",
"venue": "<string>"
}
}{
"message": "<string>",
"type": "<string>"
}Authorizations
BasicAuthOAuth2
See our authentication documentation for how to authorize your requests
Headers
The id of the network. Required when using bearer token authentication
Body
application/json
Event to create.
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
Was this page helpful?
⌘I