curl --request POST \
--url https://api.monid.ai/v1/wallet/promo-codes/redeem \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "WELCOME10",
"source": "manual"
}
'import requests
url = "https://api.monid.ai/v1/wallet/promo-codes/redeem"
payload = {
"code": "WELCOME10",
"source": "manual"
}
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({code: 'WELCOME10', source: 'manual'})
};
fetch('https://api.monid.ai/v1/wallet/promo-codes/redeem', 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.monid.ai/v1/wallet/promo-codes/redeem",
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([
'code' => 'WELCOME10',
'source' => 'manual'
]),
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.monid.ai/v1/wallet/promo-codes/redeem"
payload := strings.NewReader("{\n \"code\": \"WELCOME10\",\n \"source\": \"manual\"\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.monid.ai/v1/wallet/promo-codes/redeem")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"WELCOME10\",\n \"source\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monid.ai/v1/wallet/promo-codes/redeem")
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 \"code\": \"WELCOME10\",\n \"source\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"amount": 10,
"currency": "USD",
"balance": {
"value": 25.5,
"currency": "USD"
}
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 503,
"message": "Wallet is being provisioned.",
"walletStatus": "PROVISIONING"
}Redeem a promo code
Redeems a promo code for the caller’s workspace, granting a PROMOTIONAL credit. One redemption per workspace per code. A code may carry a policy (e.g. identity: the user must hold a verified World ID, one redemption per identity) — see the 403/409 codes. Sessions only: an API key is refused regardless of its scopes — except for the signup credit code MONID-SIGNUP, which an API key holding topups:create may redeem (one signup credit per workspace and per user).
curl --request POST \
--url https://api.monid.ai/v1/wallet/promo-codes/redeem \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "WELCOME10",
"source": "manual"
}
'import requests
url = "https://api.monid.ai/v1/wallet/promo-codes/redeem"
payload = {
"code": "WELCOME10",
"source": "manual"
}
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({code: 'WELCOME10', source: 'manual'})
};
fetch('https://api.monid.ai/v1/wallet/promo-codes/redeem', 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.monid.ai/v1/wallet/promo-codes/redeem",
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([
'code' => 'WELCOME10',
'source' => 'manual'
]),
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.monid.ai/v1/wallet/promo-codes/redeem"
payload := strings.NewReader("{\n \"code\": \"WELCOME10\",\n \"source\": \"manual\"\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.monid.ai/v1/wallet/promo-codes/redeem")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"WELCOME10\",\n \"source\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monid.ai/v1/wallet/promo-codes/redeem")
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 \"code\": \"WELCOME10\",\n \"source\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"amount": 10,
"currency": "USD",
"balance": {
"value": 25.5,
"currency": "USD"
}
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 400,
"message": "Bad Request",
"hints": {},
"errorCode": "RATE_LIMITED"
}{
"code": 503,
"message": "Wallet is being provisioned.",
"walletStatus": "PROVISIONING"
}Authorizations
Monid API key (Authorization: Bearer mk_...) or Clerk-issued JWT. Each operation lists the ONE scope an API key needs. {resource}:* grants every action on that resource; * grants everything; Clerk sessions hold *. Operations with an empty list need no scope. Scope catalog: GET /v1/api-keys/scopes.
Headers
Model driving the calling agent. Optional; a value that is empty, longer than 256 characters or not printable ASCII is ignored (never an error).
256Agent harness or client making the call (e.g. a coding agent, an agent framework). Optional; a value that is empty, longer than 256 characters or not printable ASCII is ignored (never an error).
256Caller-side session identifier, so the calls of one agent session (discover → inspect → run → polling) can be correlated. Optional; a value that is empty, longer than 256 characters or not printable ASCII is ignored (never an error).
256Body
Promo code (normalized to uppercase before lookup).
1 - 64"WELCOME10"
How the redemption was started, for telemetry only: link = auto-claimed from a ?promo= URL; omitted / manual = typed by the user. Both are handled identically.
link, manual "manual"