curl --request PATCH \
--url https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"path": "<string>",
"inputSchema": {},
"inputExample": {},
"outputSchema": {},
"outputExample": "<unknown>",
"providerCostUsdc": "<string>",
"markupBps": 50000,
"flatMarkupUsdc": "<string>",
"enabled": true
}
'import requests
url = "https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}"
payload = {
"name": "<string>",
"description": "<string>",
"path": "<string>",
"inputSchema": {},
"inputExample": {},
"outputSchema": {},
"outputExample": "<unknown>",
"providerCostUsdc": "<string>",
"markupBps": 50000,
"flatMarkupUsdc": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
path: '<string>',
inputSchema: {},
inputExample: {},
outputSchema: {},
outputExample: '<unknown>',
providerCostUsdc: '<string>',
markupBps: 50000,
flatMarkupUsdc: '<string>',
enabled: true
})
};
fetch('https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}', 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.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'path' => '<string>',
'inputSchema' => [
],
'inputExample' => [
],
'outputSchema' => [
],
'outputExample' => '<unknown>',
'providerCostUsdc' => '<string>',
'markupBps' => 50000,
'flatMarkupUsdc' => '<string>',
'enabled' => true
]),
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://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"path\": \"<string>\",\n \"inputSchema\": {},\n \"inputExample\": {},\n \"outputSchema\": {},\n \"outputExample\": \"<unknown>\",\n \"providerCostUsdc\": \"<string>\",\n \"markupBps\": 50000,\n \"flatMarkupUsdc\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"path\": \"<string>\",\n \"inputSchema\": {},\n \"inputExample\": {},\n \"outputSchema\": {},\n \"outputExample\": \"<unknown>\",\n \"providerCostUsdc\": \"<string>\",\n \"markupBps\": 50000,\n \"flatMarkupUsdc\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"path\": \"<string>\",\n \"inputSchema\": {},\n \"inputExample\": {},\n \"outputSchema\": {},\n \"outputExample\": \"<unknown>\",\n \"providerCostUsdc\": \"<string>\",\n \"markupBps\": 50000,\n \"flatMarkupUsdc\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"publicSlug": "<string>",
"name": "<string>",
"description": "<string>",
"method": "GET",
"path": "<string>",
"inputSchema": {},
"inputExample": {},
"outputSchema": {},
"outputExample": "<unknown>",
"providerCostUsdc": "<string>",
"markupBps": 1,
"flatMarkupUsdc": "<string>",
"endUserPriceUsdc": "<string>",
"enabled": true,
"pricingRevision": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Update a custom API action
Updates one action without changing its stable slug. Contract and pricing changes are revalidated; a pricing change increments pricingRevision. Requires the enterprise owner with credentials:manage, catalog:write, and recent step-up.
curl --request PATCH \
--url https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"path": "<string>",
"inputSchema": {},
"inputExample": {},
"outputSchema": {},
"outputExample": "<unknown>",
"providerCostUsdc": "<string>",
"markupBps": 50000,
"flatMarkupUsdc": "<string>",
"enabled": true
}
'import requests
url = "https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}"
payload = {
"name": "<string>",
"description": "<string>",
"path": "<string>",
"inputSchema": {},
"inputExample": {},
"outputSchema": {},
"outputExample": "<unknown>",
"providerCostUsdc": "<string>",
"markupBps": 50000,
"flatMarkupUsdc": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
path: '<string>',
inputSchema: {},
inputExample: {},
outputSchema: {},
outputExample: '<unknown>',
providerCostUsdc: '<string>',
markupBps: 50000,
flatMarkupUsdc: '<string>',
enabled: true
})
};
fetch('https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}', 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.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'path' => '<string>',
'inputSchema' => [
],
'inputExample' => [
],
'outputSchema' => [
],
'outputExample' => '<unknown>',
'providerCostUsdc' => '<string>',
'markupBps' => 50000,
'flatMarkupUsdc' => '<string>',
'enabled' => true
]),
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://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"path\": \"<string>\",\n \"inputSchema\": {},\n \"inputExample\": {},\n \"outputSchema\": {},\n \"outputExample\": \"<unknown>\",\n \"providerCostUsdc\": \"<string>\",\n \"markupBps\": 50000,\n \"flatMarkupUsdc\": \"<string>\",\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"path\": \"<string>\",\n \"inputSchema\": {},\n \"inputExample\": {},\n \"outputSchema\": {},\n \"outputExample\": \"<unknown>\",\n \"providerCostUsdc\": \"<string>\",\n \"markupBps\": 50000,\n \"flatMarkupUsdc\": \"<string>\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywithlocus.com/api/credits/custom-endpoints/{providerId}/endpoints/{endpointId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"path\": \"<string>\",\n \"inputSchema\": {},\n \"inputExample\": {},\n \"outputSchema\": {},\n \"outputExample\": \"<unknown>\",\n \"providerCostUsdc\": \"<string>\",\n \"markupBps\": 50000,\n \"flatMarkupUsdc\": \"<string>\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"publicSlug": "<string>",
"name": "<string>",
"description": "<string>",
"method": "GET",
"path": "<string>",
"inputSchema": {},
"inputExample": {},
"outputSchema": {},
"outputExample": "<unknown>",
"providerCostUsdc": "<string>",
"markupBps": 1,
"flatMarkupUsdc": "<string>",
"endUserPriceUsdc": "<string>",
"enabled": true,
"pricingRevision": 1,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
Locus Pro dashboard session (Cognito).
Path Parameters
Workspace-owned custom provider ID. This is distinct from its public custom-{slug} catalog name.
Workspace-owned custom action ID.
Body
Any non-empty subset of the create fields except slug. Unspecified fields remain unchanged; all affected contracts and prices are revalidated.
1 - 801 - 500GET, POST, PUT, PATCH, DELETE 1 - 1024Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
^\d+(?:\.\d{1,6})?$0 <= x <= 100000Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.
^\d+(?:\.\d{1,6})?$