Create a note
curl --request POST \
--url https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"note_type": "ops",
"sensitivity": "normal"
}
'import requests
url = "https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes"
payload = {
"content": "<string>",
"note_type": "ops",
"sensitivity": "normal"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', note_type: 'ops', sensitivity: 'normal'})
};
fetch('https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes', 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://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes",
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([
'content' => '<string>',
'note_type' => 'ops',
'sensitivity' => 'normal'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"note_type\": \"ops\",\n \"sensitivity\": \"normal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"note_type\": \"ops\",\n \"sensitivity\": \"normal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes")
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/json'
request.body = "{\n \"content\": \"<string>\",\n \"note_type\": \"ops\",\n \"sensitivity\": \"normal\"\n}"
response = http.request(request)
puts response.read_body{
"note": {
"id": 42,
"content": "<string>",
"note_type": "ops",
"sensitivity": "normal",
"created_at": "2023-11-07T05:31:56Z",
"author": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com"
}
}
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Notes
Create a note
Add a note authored by the current user. User tokens only.
POST
/
events
/
{event_id}
/
participants
/
{participant_id}
/
notes
Create a note
curl --request POST \
--url https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"note_type": "ops",
"sensitivity": "normal"
}
'import requests
url = "https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes"
payload = {
"content": "<string>",
"note_type": "ops",
"sensitivity": "normal"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', note_type: 'ops', sensitivity: 'normal'})
};
fetch('https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes', 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://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes",
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([
'content' => '<string>',
'note_type' => 'ops',
'sensitivity' => 'normal'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"note_type\": \"ops\",\n \"sensitivity\": \"normal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"note_type\": \"ops\",\n \"sensitivity\": \"normal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://attend.hackclub.com/api/v1/events/{event_id}/participants/{participant_id}/notes")
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/json'
request.body = "{\n \"content\": \"<string>\",\n \"note_type\": \"ops\",\n \"sensitivity\": \"normal\"\n}"
response = http.request(request)
puts response.read_body{
"note": {
"id": 42,
"content": "<string>",
"note_type": "ops",
"sensitivity": "normal",
"created_at": "2023-11-07T05:31:56Z",
"author": {
"id": 123,
"name": "<string>",
"email": "jsmith@example.com"
}
}
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Authorizations
Mobile token, global API token, series API key, or event API key. See Authentication above for which endpoints each one reaches.
Path Parameters
Event id.
The participant_event id.
Body
application/json
Response
Note created.
Show child attributes
Show child attributes
Was this page helpful?