Update endpoint
curl --request POST \
--url https://akapulu.com/api/endpoints/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "22222222-3333-4444-5555-666666666666",
"name": "Book Appointment",
"url": "https://api.yourcompany.com/v1/book-appointment",
"headers": {
"Authorization": "Bearer {{secret.crm_token}}"
},
"body": {
"patient_id": "{{runtime.patient_id}}"
}
}
'import requests
url = "https://akapulu.com/api/endpoints/update"
payload = {
"id": "22222222-3333-4444-5555-666666666666",
"name": "Book Appointment",
"url": "https://api.yourcompany.com/v1/book-appointment",
"headers": { "Authorization": "Bearer {{secret.crm_token}}" },
"body": { "patient_id": "{{runtime.patient_id}}" }
}
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({
id: '22222222-3333-4444-5555-666666666666',
name: 'Book Appointment',
url: 'https://api.yourcompany.com/v1/book-appointment',
headers: {Authorization: 'Bearer {{secret.crm_token}}'},
body: JSON.stringify({patient_id: '{{runtime.patient_id}}'})
})
};
fetch('https://akapulu.com/api/endpoints/update', 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://akapulu.com/api/endpoints/update",
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([
'id' => '22222222-3333-4444-5555-666666666666',
'name' => 'Book Appointment',
'url' => 'https://api.yourcompany.com/v1/book-appointment',
'headers' => [
'Authorization' => 'Bearer {{secret.crm_token}}'
],
'body' => [
'patient_id' => '{{runtime.patient_id}}'
]
]),
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://akapulu.com/api/endpoints/update"
payload := strings.NewReader("{\n \"id\": \"22222222-3333-4444-5555-666666666666\",\n \"name\": \"Book Appointment\",\n \"url\": \"https://api.yourcompany.com/v1/book-appointment\",\n \"headers\": {\n \"Authorization\": \"Bearer {{secret.crm_token}}\"\n },\n \"body\": {\n \"patient_id\": \"{{runtime.patient_id}}\"\n }\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://akapulu.com/api/endpoints/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"22222222-3333-4444-5555-666666666666\",\n \"name\": \"Book Appointment\",\n \"url\": \"https://api.yourcompany.com/v1/book-appointment\",\n \"headers\": {\n \"Authorization\": \"Bearer {{secret.crm_token}}\"\n },\n \"body\": {\n \"patient_id\": \"{{runtime.patient_id}}\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://akapulu.com/api/endpoints/update")
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 \"id\": \"22222222-3333-4444-5555-666666666666\",\n \"name\": \"Book Appointment\",\n \"url\": \"https://api.yourcompany.com/v1/book-appointment\",\n \"headers\": {\n \"Authorization\": \"Bearer {{secret.crm_token}}\"\n },\n \"body\": {\n \"patient_id\": \"{{runtime.patient_id}}\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "updated",
"id": "22222222-3333-4444-5555-666666666666"
}{
"error": "id is required"
}{
"error": "Invalid API key"
}{
"error": "HttpEndpoint not found"
}Endpoints
Update Endpoint
Update an HTTP endpoint owned by the API key’s user.
POST
/
endpoints
/
update
Update endpoint
curl --request POST \
--url https://akapulu.com/api/endpoints/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "22222222-3333-4444-5555-666666666666",
"name": "Book Appointment",
"url": "https://api.yourcompany.com/v1/book-appointment",
"headers": {
"Authorization": "Bearer {{secret.crm_token}}"
},
"body": {
"patient_id": "{{runtime.patient_id}}"
}
}
'import requests
url = "https://akapulu.com/api/endpoints/update"
payload = {
"id": "22222222-3333-4444-5555-666666666666",
"name": "Book Appointment",
"url": "https://api.yourcompany.com/v1/book-appointment",
"headers": { "Authorization": "Bearer {{secret.crm_token}}" },
"body": { "patient_id": "{{runtime.patient_id}}" }
}
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({
id: '22222222-3333-4444-5555-666666666666',
name: 'Book Appointment',
url: 'https://api.yourcompany.com/v1/book-appointment',
headers: {Authorization: 'Bearer {{secret.crm_token}}'},
body: JSON.stringify({patient_id: '{{runtime.patient_id}}'})
})
};
fetch('https://akapulu.com/api/endpoints/update', 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://akapulu.com/api/endpoints/update",
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([
'id' => '22222222-3333-4444-5555-666666666666',
'name' => 'Book Appointment',
'url' => 'https://api.yourcompany.com/v1/book-appointment',
'headers' => [
'Authorization' => 'Bearer {{secret.crm_token}}'
],
'body' => [
'patient_id' => '{{runtime.patient_id}}'
]
]),
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://akapulu.com/api/endpoints/update"
payload := strings.NewReader("{\n \"id\": \"22222222-3333-4444-5555-666666666666\",\n \"name\": \"Book Appointment\",\n \"url\": \"https://api.yourcompany.com/v1/book-appointment\",\n \"headers\": {\n \"Authorization\": \"Bearer {{secret.crm_token}}\"\n },\n \"body\": {\n \"patient_id\": \"{{runtime.patient_id}}\"\n }\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://akapulu.com/api/endpoints/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"22222222-3333-4444-5555-666666666666\",\n \"name\": \"Book Appointment\",\n \"url\": \"https://api.yourcompany.com/v1/book-appointment\",\n \"headers\": {\n \"Authorization\": \"Bearer {{secret.crm_token}}\"\n },\n \"body\": {\n \"patient_id\": \"{{runtime.patient_id}}\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://akapulu.com/api/endpoints/update")
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 \"id\": \"22222222-3333-4444-5555-666666666666\",\n \"name\": \"Book Appointment\",\n \"url\": \"https://api.yourcompany.com/v1/book-appointment\",\n \"headers\": {\n \"Authorization\": \"Bearer {{secret.crm_token}}\"\n },\n \"body\": {\n \"patient_id\": \"{{runtime.patient_id}}\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "updated",
"id": "22222222-3333-4444-5555-666666666666"
}{
"error": "id is required"
}{
"error": "Invalid API key"
}{
"error": "HttpEndpoint not found"
}Update an HTTP endpoint you own. The request must include
id plus the full name, url, headers, and body fields (same shape as create).Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
⌘I

