Create Event Date
curl --request POST \
--url https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates \
--header 'Content-Type: application/json' \
--data '
{
"start": "<string>",
"end": "<string>"
}
'import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates"
payload = {
"start": "<string>",
"end": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({start: '<string>', end: '<string>'})
};
fetch('https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates', 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.example.com/wp-json/latepoint-api/v1/events/{id}/dates",
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([
'start' => '<string>',
'end' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/wp-json/latepoint-api/v1/events/{id}/dates"
payload := strings.NewReader("{\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/wp-json/latepoint-api/v1/events/{id}/dates")
.header("Content-Type", "application/json")
.body("{\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyEvent Dates
Create Event Date
Add a date to an event.
POST
/
wp-json
/
latepoint-api
/
v1
/
events
/
{id}
/
dates
Create Event Date
curl --request POST \
--url https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates \
--header 'Content-Type: application/json' \
--data '
{
"start": "<string>",
"end": "<string>"
}
'import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates"
payload = {
"start": "<string>",
"end": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({start: '<string>', end: '<string>'})
};
fetch('https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates', 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.example.com/wp-json/latepoint-api/v1/events/{id}/dates",
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([
'start' => '<string>',
'end' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/wp-json/latepoint-api/v1/events/{id}/dates"
payload := strings.NewReader("{\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/wp-json/latepoint-api/v1/events/{id}/dates")
.header("Content-Type", "application/json")
.body("{\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/events/{id}/dates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyThe event’s overall
start and end are recalculated after the date is added.
Path Parameters
integer
required
The ID of the event
Request Body Parameters
string
required
Start of the date,
YYYY-MM-DD HH:MM in the site timezone. See Dates and times.string
End of the date,
YYYY-MM-DD HH:MM in the site timezone. Must be on or after start. Defaults to start.Example Request
POST /wp-json/latepoint-api/v1/events/2/dates
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"start": "2026-12-07 09:00",
"end": "2026-12-07 12:00"
}
Response
Returns201 Created:
{
"success": true,
"message": "Event date created successfully",
"data": {
"id": 3,
"event_id": 2,
"start": "2026-12-07 09:00:00",
"end": "2026-12-07 12:00:00",
"start_utc": "2026-12-07 12:00:00",
"end_utc": "2026-12-07 15:00:00"
}
}
Error Responses
| Status | Code | Description |
|---|---|---|
400 | invalid_dates | start is missing, or end is before start |
400 | invalid_datetime | A value is not in YYYY-MM-DD HH:MM format |
404 | event_not_found | The event does not exist |
422 | save_error | LatePoint could not save the date |
503 | feature_disabled | Events is disabled in LatePoint settings |
