curl --request POST \
--url https://api.scoutworks.app/api/v1/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"sectionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/events"
payload = {
"title": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"sectionIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
title: '<string>',
startsAt: '2023-11-07T05:31:56Z',
sectionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.scoutworks.app/api/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "programme_meeting",
"status": "draft",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"location": "<string>",
"hosted": true,
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rsvpRequired": true,
"rsvpDeadline": "2023-11-07T05:31:56Z",
"capacity": 0,
"attendeeCount": 0
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "programme_meeting",
"status": "draft",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"location": "<string>",
"hosted": true,
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rsvpRequired": true,
"rsvpDeadline": "2023-11-07T05:31:56Z",
"capacity": 0,
"attendeeCount": 0
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Add a draft event
Adds an event as a draft, for a leader to review and publish in Scoutworks: families hear of it only when it is published. Use it to load a term’s programme from a spreadsheet or another system. The type and date rules are the app’s: a camp needs an end, and an end comes after the start. A change is recorded as made by the admin who created the key, marked with the key. Writes count towards the key’s usual limit and a second one of 30 changes a minute. A group whose subscription has lapsed answers 402.
You may send an Idempotency-Key header (unique per event) so a retry after a timeout cannot make it twice. For 24 hours, the same key with the same body answers 200 with the first event and an Idempotent-Replayed: true header; with a different body it answers 400; while the first request is still running it answers 409 conflict.
curl --request POST \
--url https://api.scoutworks.app/api/v1/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"sectionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.scoutworks.app/api/v1/events"
payload = {
"title": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"sectionIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
title: '<string>',
startsAt: '2023-11-07T05:31:56Z',
sectionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.scoutworks.app/api/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "programme_meeting",
"status": "draft",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"location": "<string>",
"hosted": true,
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rsvpRequired": true,
"rsvpDeadline": "2023-11-07T05:31:56Z",
"capacity": 0,
"attendeeCount": 0
}
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"type": "programme_meeting",
"status": "draft",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"location": "<string>",
"hosted": true,
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"rsvpRequired": true,
"rsvpDeadline": "2023-11-07T05:31:56Z",
"capacity": 0,
"attendeeCount": 0
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Authorizations
Headers
Body
Always a draft: a leader reviews and publishes it in Scoutworks, which is when families hear of it. A field not listed here is refused with a 400.
Sections from GET /sections the event is for, at least one. A PATCH replaces them.
1 - 20 elements^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$