Grant credits in bulk
curl --request POST \
--url https://api.zenamu.com/v1/clients/credits/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sendEmail": false,
"items": [
{
"clientId": 123,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
},
{
"clientId": 456,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
}
]
}
'import requests
url = "https://api.zenamu.com/v1/clients/credits/bulk"
payload = {
"sendEmail": False,
"items": [
{
"clientId": 123,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
},
{
"clientId": 456,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
}
]
}
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({
sendEmail: false,
items: [
{
clientId: 123,
customEntryCount: {count: 10, validityTimeValue: 1, validityTimeUnit: 'month'},
currency: 'CZK',
price: 0
},
{
clientId: 456,
customEntryCount: {count: 10, validityTimeValue: 1, validityTimeUnit: 'month'},
currency: 'CZK',
price: 0
}
]
})
};
fetch('https://api.zenamu.com/v1/clients/credits/bulk', 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.zenamu.com/v1/clients/credits/bulk",
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([
'sendEmail' => false,
'items' => [
[
'clientId' => 123,
'customEntryCount' => [
'count' => 10,
'validityTimeValue' => 1,
'validityTimeUnit' => 'month'
],
'currency' => 'CZK',
'price' => 0
],
[
'clientId' => 456,
'customEntryCount' => [
'count' => 10,
'validityTimeValue' => 1,
'validityTimeUnit' => 'month'
],
'currency' => 'CZK',
'price' => 0
]
]
]),
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.zenamu.com/v1/clients/credits/bulk"
payload := strings.NewReader("{\n \"sendEmail\": false,\n \"items\": [\n {\n \"clientId\": 123,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n },\n {\n \"clientId\": 456,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n }\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://api.zenamu.com/v1/clients/credits/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sendEmail\": false,\n \"items\": [\n {\n \"clientId\": 123,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n },\n {\n \"clientId\": 456,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenamu.com/v1/clients/credits/bulk")
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 \"sendEmail\": false,\n \"items\": [\n {\n \"clientId\": 123,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n },\n {\n \"clientId\": 456,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Success",
"data": {
"results": [
{
"clientId": 123,
"success": true,
"numberOfCredits": 510,
"validTo": "2026-10-01"
},
{
"clientId": 456,
"success": false,
"error": {
"message": "Client not found"
}
}
],
"summary": {
"total": 2,
"succeeded": 1,
"failed": 1,
"failedClientIds": [
456
]
}
}
}{
"statusCode": 400,
"error": "Error",
"message": "dateFrom parameter is required (format: YYYY-MM-DD)"
}{
"statusCode": 401,
"error": "Error",
"message": "Missing access token. You must send your access token in the request header ('Authorization: Bearer YOUR_ACCESS_TOKEN' )"
}{
"statusCode": 403,
"error": "Error",
"message": "The Zenamu API is only available on the Ultimate tariff."
}{
"statusCode": 404,
"error": "Error",
"message": "API key not found"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded: up to 100 requests per minute per endpoint."
}{
"statusCode": 500,
"error": "Internal Server Error",
"message": "We apologize, but there was an error on our end. If problems persist, please contact us at [email protected]"
}Grant credits in bulk
Grants credits to up to 100 clients in one request. Each clientId
may appear only once in a batch.
Items are processed independently and in order. One failing item
does not roll back the others, so a response can report partial
success — always read results[].success per item rather than assuming
the whole batch went through. See
Partial success.
POST
/
v1
/
clients
/
credits
/
bulk
Grant credits in bulk
curl --request POST \
--url https://api.zenamu.com/v1/clients/credits/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sendEmail": false,
"items": [
{
"clientId": 123,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
},
{
"clientId": 456,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
}
]
}
'import requests
url = "https://api.zenamu.com/v1/clients/credits/bulk"
payload = {
"sendEmail": False,
"items": [
{
"clientId": 123,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
},
{
"clientId": 456,
"customEntryCount": {
"count": 10,
"validityTimeValue": 1,
"validityTimeUnit": "month"
},
"currency": "CZK",
"price": 0
}
]
}
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({
sendEmail: false,
items: [
{
clientId: 123,
customEntryCount: {count: 10, validityTimeValue: 1, validityTimeUnit: 'month'},
currency: 'CZK',
price: 0
},
{
clientId: 456,
customEntryCount: {count: 10, validityTimeValue: 1, validityTimeUnit: 'month'},
currency: 'CZK',
price: 0
}
]
})
};
fetch('https://api.zenamu.com/v1/clients/credits/bulk', 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.zenamu.com/v1/clients/credits/bulk",
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([
'sendEmail' => false,
'items' => [
[
'clientId' => 123,
'customEntryCount' => [
'count' => 10,
'validityTimeValue' => 1,
'validityTimeUnit' => 'month'
],
'currency' => 'CZK',
'price' => 0
],
[
'clientId' => 456,
'customEntryCount' => [
'count' => 10,
'validityTimeValue' => 1,
'validityTimeUnit' => 'month'
],
'currency' => 'CZK',
'price' => 0
]
]
]),
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.zenamu.com/v1/clients/credits/bulk"
payload := strings.NewReader("{\n \"sendEmail\": false,\n \"items\": [\n {\n \"clientId\": 123,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n },\n {\n \"clientId\": 456,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n }\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://api.zenamu.com/v1/clients/credits/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sendEmail\": false,\n \"items\": [\n {\n \"clientId\": 123,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n },\n {\n \"clientId\": 456,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenamu.com/v1/clients/credits/bulk")
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 \"sendEmail\": false,\n \"items\": [\n {\n \"clientId\": 123,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n },\n {\n \"clientId\": 456,\n \"customEntryCount\": {\n \"count\": 10,\n \"validityTimeValue\": 1,\n \"validityTimeUnit\": \"month\"\n },\n \"currency\": \"CZK\",\n \"price\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Success",
"data": {
"results": [
{
"clientId": 123,
"success": true,
"numberOfCredits": 510,
"validTo": "2026-10-01"
},
{
"clientId": 456,
"success": false,
"error": {
"message": "Client not found"
}
}
],
"summary": {
"total": 2,
"succeeded": 1,
"failed": 1,
"failedClientIds": [
456
]
}
}
}{
"statusCode": 400,
"error": "Error",
"message": "dateFrom parameter is required (format: YYYY-MM-DD)"
}{
"statusCode": 401,
"error": "Error",
"message": "Missing access token. You must send your access token in the request header ('Authorization: Bearer YOUR_ACCESS_TOKEN' )"
}{
"statusCode": 403,
"error": "Error",
"message": "The Zenamu API is only available on the Ultimate tariff."
}{
"statusCode": 404,
"error": "Error",
"message": "API key not found"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded: up to 100 requests per minute per endpoint."
}{
"statusCode": 500,
"error": "Internal Server Error",
"message": "We apologize, but there was an error on our end. If problems persist, please contact us at [email protected]"
}Authorizations
Your secret API key (zen_live_…), sent as Authorization: Bearer <key>. Backend-to-backend only — never expose it in a browser. See Authentication.
Body
application/json

