curl --request POST \
--url https://api.venlyfinance.com/v1/api-credentials \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "checkout-service"
}
'import requests
url = "https://api.venlyfinance.com/v1/api-credentials"
payload = { "name": "checkout-service" }
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({name: 'checkout-service'})
};
fetch('https://api.venlyfinance.com/v1/api-credentials', 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.venlyfinance.com/v1/api-credentials",
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([
'name' => 'checkout-service'
]),
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.venlyfinance.com/v1/api-credentials"
payload := strings.NewReader("{\n \"name\": \"checkout-service\"\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://api.venlyfinance.com/v1/api-credentials")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"checkout-service\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/api-credentials")
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 \"name\": \"checkout-service\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"clientId": "fin-8f2c1a9b-0000-4000-8000-000000000001-checkout-service",
"name": "checkout-service",
"secret": "generated-value-shown-exactly-once",
"status": "ACTIVE",
"createdAt": "2026-09-03T10:12:00Z",
"lastRotatedAt": null
}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}Create API credentials
Create an OAuth client-credentials pair. The secret is shown once.
curl --request POST \
--url https://api.venlyfinance.com/v1/api-credentials \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "checkout-service"
}
'import requests
url = "https://api.venlyfinance.com/v1/api-credentials"
payload = { "name": "checkout-service" }
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({name: 'checkout-service'})
};
fetch('https://api.venlyfinance.com/v1/api-credentials', 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.venlyfinance.com/v1/api-credentials",
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([
'name' => 'checkout-service'
]),
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.venlyfinance.com/v1/api-credentials"
payload := strings.NewReader("{\n \"name\": \"checkout-service\"\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://api.venlyfinance.com/v1/api-credentials")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"checkout-service\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/api-credentials")
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 \"name\": \"checkout-service\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"clientId": "fin-8f2c1a9b-0000-4000-8000-000000000001-checkout-service",
"name": "checkout-service",
"secret": "generated-value-shown-exactly-once",
"status": "ACTIVE",
"createdAt": "2026-09-03T10:12:00Z",
"lastRotatedAt": null
}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}manage:credentials — see Required scopes.
Creates a client-credentials pair and returns its secret in this response only. Record it now; a lost secret is replaced by rotating, never by reading it back.
The clientId is server-generated from your company and the name you supply. Each company holds one credential; disabling it does not free the slot. See API credentials.
Errors
| HTTP | code | When |
|---|---|---|
400 | (validation) | name missing, blank, or over 100 characters |
409 | credential-limit-exceeded | your company already holds its credential — rotate it instead |
409 | credential-name-unavailable | no free clientId could be derived for this name; try another |
503 | keycloak-unavailable | the identity provider was unreachable; retry |
Authorizations
OAuth2 client credentials flow. Token endpoints:
- Token URL
- https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
Headers
Which tenant the request is scoped to, among those your token grants. Omit it when the token grants exactly one tenant; it is required when the token grants more than one. A supplied value must exactly match a tenant the token grants.
Absent when required, blank, malformed, or naming a tenant the token does not grant — each gets
the same generic 403 forbidden, which reveals neither whether a tenant exists nor which ones
you may use. Send the header once: a repeated header is rejected the same way.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Body
Only a label is supplied — the clientId is derived server-side and can never be chosen by
the caller.
Your own label for the credential, e.g. the service that will use it. Must not be blank.
1 - 100"checkout-service"
Response
Credential created. The secret is present in this response only.
Indicates whether the request was successful
A credential together with its secret. Returned by create and rotate only. Record the
secret immediately: Finance does not store it, no endpoint returns it afterwards, and a lost
secret is replaced by rotating the credential rather than by reading it.
Show child attributes
Show child attributes
Was this page helpful?

