Enterprise workspace
A workspace is one company account. These endpoints cover who is in it, its settings and the companies you trade with (counterparties). Member and settings changes are dashboard actions: API keys can read them but get 403 KEY_NOT_ALLOWED on writes. Auth, roles, the workspace header and the shared limits are explained in Enterprise overview.
Endpoints
| Method | Path | Endpoint | Auth |
|---|---|---|---|
GET | /v1/enterprise/me | Get the current workspace | Any signed-in user, dashboard only |
POST | /v1/enterprise/invites/:memberId/accept | Accept an invite | Any signed-in user, dashboard only |
GET | /v1/enterprise/members | List members | viewer |
POST | /v1/enterprise/members | Invite a member | admin, dashboard only |
PATCH | /v1/enterprise/members/:id | Change a member's role | admin, dashboard only |
DELETE | /v1/enterprise/members/:id | Remove a member | admin, dashboard only |
PATCH | /v1/enterprise/members/me/preferences | Update your notification toggles | viewer, dashboard only |
GET | /v1/enterprise/settings | Get workspace settings | viewer |
PATCH | /v1/enterprise/settings | Change workspace settings | admin, dashboard only |
GET | /v1/enterprise/notifications | List workspace notifications | viewer, dashboard only |
POST | /v1/enterprise/notifications/read | Mark workspace notifications read | viewer, dashboard only |
GET | /v1/enterprise/counterparties | List counterparties | viewer |
POST | /v1/enterprise/counterparties | Add a counterparty | operator |
PATCH | /v1/enterprise/counterparties/:id | Update a counterparty | operator |
Get the current workspace
The workspace picked by X-Enterprise-Account (or the first one you joined), your membership and notification toggles, every workspace you belong to and any pending invites. It works for users with no workspace yet, so it is the right first call after sign-in.
- Auth: Dashboard session of any signed-in user, no workspace needed. API keys get
403 KEY_NOT_ALLOWED. - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not needed. Reading has no side effects.
Example request
curl https://api.rekberpay.com/v1/enterprise/me \
-b cookies.txt \
-H "X-Enterprise-Account: $WORKSPACE_ID"const res = await fetch('https://api.rekberpay.com/v1/enterprise/me', {
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-Enterprise-Account': process.env.WORKSPACE_ID,
},
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.get(
"https://api.rekberpay.com/v1/enterprise/me",
headers={
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/me');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"account": {
"id": "fffffff2-ffff-4fff-8fff-ffffffffffff",
"display_name": "Northline Trading",
"legal_name": "PT Northline Trading Indonesia",
"country_code": "ID",
"kyb_status": "verified",
"risk_tier": "standard",
"is_sandbox": true,
"settings": {
"four_eyes_threshold": 100000000,
"dispute_sla_hours": 24,
"watchlist": [
"Blacklisted Supplier"
],
"account_manager": {
"name": "Maya Patel",
"email": "[email protected]"
}
}
},
"membership": {
"id": "11111113-1111-4111-8111-111111111111",
"role": "finance",
"joined_at": "2026-09-29T15:03:06.162Z",
"notify": {
"email": true,
"approvals": true,
"money": true,
"reminders": true
}
},
"memberships": [
{
"account_id": "fffffff2-ffff-4fff-8fff-ffffffffffff",
"display_name": "Northline Trading",
"role": "finance"
}
],
"invites": []
}
}| Field | Type | Description |
|---|---|---|
account | object | null | The current workspace, with is_sandbox and settings |
membership | object | null | Your role, joined_at and notify toggles here |
memberships | array | Every workspace you are an active member of |
invites | array | Pending invites: member_id, display_name, role, invited_by_name |
Errors
| Status | Code | Cause |
|---|---|---|
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Accept an invite
Accepts a pending invite addressed to you. Take member_id from invites in Get the current workspace. You become an active member with the invited role.
- Auth: Dashboard session of any signed-in user, no workspace needed. API keys get
403 KEY_NOT_ALLOWED. - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not supported. A retry runs the call again.
Path parameters
| Name | Type | Description |
|---|---|---|
memberId | UUID | The member_id of the invite |
Example request
curl -X POST https://api.rekberpay.com/v1/enterprise/invites/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa/accept \
-b cookies.txt \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "X-Enterprise-Account: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/invites/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa/accept', {
method: 'POST',
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-CSRF-Token': process.env.REKBERPAY_CSRF_TOKEN,
'X-Enterprise-Account': process.env.WORKSPACE_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.post(
"https://api.rekberpay.com/v1/enterprise/invites/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa/accept",
headers={
"X-CSRF-Token": os.environ["REKBERPAY_CSRF_TOKEN"],
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
json={},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/invites/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa/accept');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-CSRF-Token: ' . getenv('REKBERPAY_CSRF_TOKEN'),
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(new stdClass()),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"member_id": "aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"account_id": "fffffff2-ffff-4fff-8fff-ffffffffffff",
"role": "viewer"
}
}Errors
| Status | Code | Cause |
|---|---|---|
404 | NOT_FOUND | No pending invite with this ID for you |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
List members
Members of the workspace, owners first. Removed members are left out. status is invited, active or suspended.
- Auth: A workspace API key (
Authorization: Bearer rpe_...), a personal API key or a dashboard session. - Role: Any workspace member (
viewerand up). - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not needed. Reading has no side effects.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | No | Default 1 |
limit | integer | No | 1 to 50. Default 20 |
Example request
curl "https://api.rekberpay.com/v1/enterprise/members?limit=2" \
-H "Authorization: Bearer $REKBERPAY_WORKSPACE_KEY"const res = await fetch('https://api.rekberpay.com/v1/enterprise/members?limit=2', {
headers: {
Authorization: `Bearer ${process.env.REKBERPAY_WORKSPACE_KEY}`,
},
});
const data = await res.json();import os
import requests
resp = requests.get(
"https://api.rekberpay.com/v1/enterprise/members?limit=2",
headers={
"Authorization": f"Bearer {os.environ['REKBERPAY_WORKSPACE_KEY']}",
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/members?limit=2');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('REKBERPAY_WORKSPACE_KEY'),
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": [
{
"id": "77777773-7777-4777-8777-777777777777",
"user": {
"id": "88888883-8888-4888-8888-888888888888",
"email": "[email protected]",
"full_name": "Alex Pratama"
},
"role": "owner",
"status": "active",
"joined_at": "2026-09-29T13:33:06.162Z",
"created_at": "2026-09-29T13:33:06.162Z"
},
{
"id": "99999993-9999-4999-8999-999999999999",
"user": {
"id": "33333333-3333-4333-8333-333333333333",
"email": "[email protected]",
"full_name": "Dimas Hidayat"
},
"role": "admin",
"status": "active",
"joined_at": "2026-09-29T14:33:06.162Z",
"created_at": "2026-09-29T14:33:06.162Z"
}
],
"pagination": {
"page": 1,
"limit": 2,
"total": 5,
"total_pages": 3
}
}Errors
| Status | Code | Cause |
|---|---|---|
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Invite a member
Invites a RekberPay user by email. The answer is always 202 with the same body, whether or not the email has an account, so the call cannot be used to find out who uses RekberPay. The invite is created (and member.invited recorded) only when the email belongs to an active account that is not yours and not already in the workspace. The person accepts it from their own session. Only an owner can invite another owner.
- Auth: Dashboard session only. API keys, workspace or personal, get
403 KEY_NOT_ALLOWED. - Role:
adminorowner. - Rate limit: 30 a minute per user for this route, plus the shared 300 a minute.
- Idempotency: Not supported. A retry runs the call again.
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email of a RekberPay account |
role | string | Yes | owner, admin, finance, operator or viewer |
Example request
curl -X POST https://api.rekberpay.com/v1/enterprise/members \
-b cookies.txt \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "X-Enterprise-Account: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"role": "viewer"
}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/members', {
method: 'POST',
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-CSRF-Token': process.env.REKBERPAY_CSRF_TOKEN,
'X-Enterprise-Account': process.env.WORKSPACE_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: "[email protected]",
role: "viewer"
}),
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.post(
"https://api.rekberpay.com/v1/enterprise/members",
headers={
"X-CSRF-Token": os.environ["REKBERPAY_CSRF_TOKEN"],
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
json={
"email": "[email protected]",
"role": "viewer",
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/members');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-CSRF-Token: ' . getenv('REKBERPAY_CSRF_TOKEN'),
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'role' => 'viewer',
]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
202 Accepted
{
"success": true,
"message": "If that email has a RekberPay account, they will see the invite in their workspace list.",
"data": {
"queued": true,
"email": "[email protected]"
}
}Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_BODY | Email or role missing or not valid |
403 | FORBIDDEN | Only an owner can grant the owner role |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | FORBIDDEN | Your role is below admin |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Change a member's role
Sets a new role. Only an owner can change an owner or make someone an owner, and the workspace always keeps at least one active owner.
- Auth: Dashboard session only. API keys, workspace or personal, get
403 KEY_NOT_ALLOWED. - Role:
adminorowner. - Rate limit: 30 a minute per user for this route, plus the shared 300 a minute.
- Idempotency: Not supported. A retry runs the call again.
Path parameters
| Name | Type | Description |
|---|---|---|
id | UUID | The member ID (not the user ID) |
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
role | string | Yes | owner, admin, finance, operator or viewer |
Example request
curl -X PATCH https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa \
-b cookies.txt \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "X-Enterprise-Account: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"role": "operator"
}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa', {
method: 'PATCH',
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-CSRF-Token': process.env.REKBERPAY_CSRF_TOKEN,
'X-Enterprise-Account': process.env.WORKSPACE_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
role: "operator"
}),
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.patch(
"https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
headers={
"X-CSRF-Token": os.environ["REKBERPAY_CSRF_TOKEN"],
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
json={
"role": "operator",
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-CSRF-Token: ' . getenv('REKBERPAY_CSRF_TOKEN'),
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'role' => 'operator',
]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"id": "aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"role": "operator"
}
}Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_BODY | Role missing or not valid |
403 | FORBIDDEN | Only an owner can change the owner role |
404 | NOT_FOUND | No member with this ID |
409 | LAST_OWNER | This would leave the workspace without an active owner |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | FORBIDDEN | Your role is below admin |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
A real FORBIDDEN answer:
403 Forbidden
{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Only an owner can change the owner role"
}
}Remove a member
Removes the member at once. Workspace API keys that the member created stop working.
- Auth: Dashboard session only. API keys, workspace or personal, get
403 KEY_NOT_ALLOWED. - Role:
adminorowner. - Rate limit: 30 a minute per user for this route, plus the shared 300 a minute.
- Idempotency: Not supported. A retry runs the call again.
Path parameters
| Name | Type | Description |
|---|---|---|
id | UUID | The member ID |
Example request
curl -X DELETE https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa \
-b cookies.txt \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "X-Enterprise-Account: $WORKSPACE_ID"const res = await fetch('https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa', {
method: 'DELETE',
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-CSRF-Token': process.env.REKBERPAY_CSRF_TOKEN,
'X-Enterprise-Account': process.env.WORKSPACE_ID,
},
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.delete(
"https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
headers={
"X-CSRF-Token": os.environ["REKBERPAY_CSRF_TOKEN"],
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/members/aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-CSRF-Token: ' . getenv('REKBERPAY_CSRF_TOKEN'),
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"id": "aaaaaaa3-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"status": "removed"
}
}Errors
| Status | Code | Cause |
|---|---|---|
403 | FORBIDDEN | Only an owner can remove an owner |
404 | NOT_FOUND | No member with this ID |
409 | LAST_OWNER | This would leave the workspace without an active owner |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | FORBIDDEN | Your role is below admin |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Update your notification toggles
Your own notification toggles in this workspace. Send only the keys you want to change; a key you never set counts as on.
- Auth: Dashboard session only. API keys, workspace or personal, get
403 KEY_NOT_ALLOWED. - Role: Any workspace member (
viewerand up). - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not supported. A retry runs the call again.
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
email | boolean | No | Email copies of workspace notifications |
approvals | boolean | No | Approval requests |
money | boolean | No | Funding, release and payout updates |
reminders | boolean | No | Due date and SLA reminders |
Example request
curl -X PATCH https://api.rekberpay.com/v1/enterprise/members/me/preferences \
-b cookies.txt \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "X-Enterprise-Account: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"reminders": false
}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/members/me/preferences', {
method: 'PATCH',
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-CSRF-Token': process.env.REKBERPAY_CSRF_TOKEN,
'X-Enterprise-Account': process.env.WORKSPACE_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
reminders: false
}),
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.patch(
"https://api.rekberpay.com/v1/enterprise/members/me/preferences",
headers={
"X-CSRF-Token": os.environ["REKBERPAY_CSRF_TOKEN"],
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
json={
"reminders": False,
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/members/me/preferences');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-CSRF-Token: ' . getenv('REKBERPAY_CSRF_TOKEN'),
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'reminders' => false,
]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"notify": {
"email": true,
"approvals": true,
"money": true,
"reminders": false
}
}
}Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_BODY | An unknown key or a value that is not a boolean |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Get workspace settings
Names, billing email, KYB status, risk tier, sandbox flag, the approval and dispute settings, and the account manager.
- Auth: A workspace API key (
Authorization: Bearer rpe_...), a personal API key or a dashboard session. - Role: Any workspace member (
viewerand up). - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not needed. Reading has no side effects.
Example request
curl https://api.rekberpay.com/v1/enterprise/settings \
-H "Authorization: Bearer $REKBERPAY_WORKSPACE_KEY"const res = await fetch('https://api.rekberpay.com/v1/enterprise/settings', {
headers: {
Authorization: `Bearer ${process.env.REKBERPAY_WORKSPACE_KEY}`,
},
});
const data = await res.json();import os
import requests
resp = requests.get(
"https://api.rekberpay.com/v1/enterprise/settings",
headers={
"Authorization": f"Bearer {os.environ['REKBERPAY_WORKSPACE_KEY']}",
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/settings');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('REKBERPAY_WORKSPACE_KEY'),
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"display_name": "Northline Trading",
"legal_name": "PT Northline Trading Indonesia",
"billing_email": "[email protected]",
"kyb_status": "verified",
"risk_tier": "standard",
"is_sandbox": true,
"settings": {
"four_eyes_threshold": 100000000,
"dispute_sla_hours": 24,
"watchlist": [
"Blacklisted Supplier"
],
"account_manager": {
"name": "Maya Patel",
"email": "[email protected]"
}
}
}
}| Field | Type | Description |
|---|---|---|
settings.four_eyes_threshold | integer | Milestones at or above this amount need two approvals |
settings.dispute_sla_hours | integer | Open disputes older than this raise an alert |
settings.watchlist | string[] | Names that raise an alert when a counterparty or account holder matches |
Errors
| Status | Code | Cause |
|---|---|---|
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Change workspace settings
Send any of the fields below. The answer holds the names and the merged settings, and settings.updated is recorded in the event feed.
- Auth: Dashboard session only. API keys, workspace or personal, get
403 KEY_NOT_ALLOWED. - Role:
adminorowner. - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not supported. A retry runs the call again.
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
display_name | string | No | 2 to 120 characters |
billing_email | string | No | Where invoices go |
four_eyes_threshold | integer | No | 1 or more. Milestones at or above it need two approvals |
dispute_sla_hours | integer | No | 1 to 168 |
watchlist | string[] | No | Up to 50 names, each 2 to 120 characters |
Example request
curl -X PATCH https://api.rekberpay.com/v1/enterprise/settings \
-b cookies.txt \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "X-Enterprise-Account: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"dispute_sla_hours": 24,
"four_eyes_threshold": 100000000
}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/settings', {
method: 'PATCH',
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-CSRF-Token': process.env.REKBERPAY_CSRF_TOKEN,
'X-Enterprise-Account': process.env.WORKSPACE_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({
dispute_sla_hours: 24,
four_eyes_threshold: 100000000
}),
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.patch(
"https://api.rekberpay.com/v1/enterprise/settings",
headers={
"X-CSRF-Token": os.environ["REKBERPAY_CSRF_TOKEN"],
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
json={
"dispute_sla_hours": 24,
"four_eyes_threshold": 100000000,
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/settings');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-CSRF-Token: ' . getenv('REKBERPAY_CSRF_TOKEN'),
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'dispute_sla_hours' => 24,
'four_eyes_threshold' => 100000000,
]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"display_name": "Northline Trading",
"billing_email": "[email protected]",
"settings": {
"four_eyes_threshold": 100000000,
"dispute_sla_hours": 24,
"watchlist": [
"Blacklisted Supplier"
],
"account_manager": {
"name": "Maya Patel",
"email": "[email protected]"
}
}
}
}Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_BODY | A field failed validation |
404 | NOT_FOUND | The workspace no longer exists |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | FORBIDDEN | Your role is below admin |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
A real FORBIDDEN answer:
403 Forbidden
{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Your workspace role does not allow this action"
}
}List workspace notifications
Your 20 newest notifications for this workspace (the dashboard bell) and the unread count, capped at 100. url is the dashboard page to open.
- Auth: Dashboard session only. API keys, workspace or personal, get
403 KEY_NOT_ALLOWED. - Role: Any workspace member (
viewerand up). - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not needed. Reading has no side effects.
Example request
curl https://api.rekberpay.com/v1/enterprise/notifications \
-b cookies.txt \
-H "X-Enterprise-Account: $WORKSPACE_ID"const res = await fetch('https://api.rekberpay.com/v1/enterprise/notifications', {
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-Enterprise-Account': process.env.WORKSPACE_ID,
},
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.get(
"https://api.rekberpay.com/v1/enterprise/notifications",
headers={
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/notifications');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"items": [],
"unread_count": 0
}
}Errors
| Status | Code | Cause |
|---|---|---|
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Mark workspace notifications read
Marks the listed notifications read, or all of them (up to 1,000) when ids is left out.
- Auth: Dashboard session only. API keys, workspace or personal, get
403 KEY_NOT_ALLOWED. - Role: Any workspace member (
viewerand up). - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not supported. A retry runs the call again.
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
ids | UUID[] | No | Up to 100 notification IDs |
Example request
curl -X POST https://api.rekberpay.com/v1/enterprise/notifications/read \
-b cookies.txt \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "X-Enterprise-Account: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/notifications/read', {
method: 'POST',
headers: {
Cookie: process.env.REKBERPAY_SESSION_COOKIE, // '__Host-rekber_session=...' from POST /v1/auth/login
'X-CSRF-Token': process.env.REKBERPAY_CSRF_TOKEN,
'X-Enterprise-Account': process.env.WORKSPACE_ID,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await res.json();import os
import requests
session = requests.Session()
# The session cookie from POST /v1/auth/login
session.cookies.set("__Host-rekber_session", os.environ["REKBERPAY_SESSION"], domain="api.rekberpay.com")
resp = session.post(
"https://api.rekberpay.com/v1/enterprise/notifications/read",
headers={
"X-CSRF-Token": os.environ["REKBERPAY_CSRF_TOKEN"],
"X-Enterprise-Account": os.environ["WORKSPACE_ID"],
},
json={},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/notifications/read');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'cookies.txt',
CURLOPT_COOKIEFILE => 'cookies.txt',
CURLOPT_HTTPHEADER => [
'X-CSRF-Token: ' . getenv('REKBERPAY_CSRF_TOKEN'),
'X-Enterprise-Account: ' . getenv('WORKSPACE_ID'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(new stdClass()),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true
}Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_BODY | ids is not a list of UUIDs, or has more than 100 |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | KEY_NOT_ALLOWED | Called with an API key instead of a dashboard session |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
List counterparties
The companies you trade with, newest first.
- Auth: A workspace API key (
Authorization: Bearer rpe_...), a personal API key or a dashboard session. - Role: Any workspace member (
viewerand up). - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not needed. Reading has no side effects.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | No | Name contains |
kyb_status | string | No | not_started, pending, verified, rejected or suspended |
page | integer | No | Default 1 |
limit | integer | No | 1 to 50. Default 20 |
Example request
curl "https://api.rekberpay.com/v1/enterprise/counterparties?limit=2" \
-H "Authorization: Bearer $REKBERPAY_WORKSPACE_KEY"const res = await fetch('https://api.rekberpay.com/v1/enterprise/counterparties?limit=2', {
headers: {
Authorization: `Bearer ${process.env.REKBERPAY_WORKSPACE_KEY}`,
},
});
const data = await res.json();import os
import requests
resp = requests.get(
"https://api.rekberpay.com/v1/enterprise/counterparties?limit=2",
headers={
"Authorization": f"Bearer {os.environ['REKBERPAY_WORKSPACE_KEY']}",
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/counterparties?limit=2');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('REKBERPAY_WORKSPACE_KEY'),
],
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": [
{
"id": "bbbbbbb3-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"name": "Straits Packaging Co",
"country_code": "SG",
"contact_email": "[email protected]",
"contact_name": "Grace Lim",
"relationship": "vendor",
"kyb_status": "not_started",
"created_at": "2026-09-30T07:03:06.162Z"
},
{
"id": "ccccccc3-cccc-4ccc-8ccc-cccccccccccc",
"name": "PT Mitra Retail Jaya",
"country_code": "ID",
"contact_email": "[email protected]",
"contact_name": "Yusuf Firmansyah",
"relationship": "buyer",
"kyb_status": "pending",
"created_at": "2026-09-30T04:33:06.162Z"
}
],
"pagination": {
"page": 1,
"limit": 2,
"total": 6,
"total_pages": 3
}
}Errors
| Status | Code | Cause |
|---|---|---|
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Add a counterparty
kyb_status starts at not_started. RekberPay sets it after checking the company; the workspace cannot.
- Auth: A workspace API key (
Authorization: Bearer rpe_...), a personal API key or a dashboard session. - Role:
operator,finance,adminorowner. - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not supported. A retry runs the call again.
Body (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 2 to 180 characters |
relationship | string | Yes | buyer, seller, both, vendor or client |
country_code | string | No | Two-letter country code |
contact_name | string | No | 1 to 120 characters |
contact_email | string | No | Contact email |
Example request
curl -X POST https://api.rekberpay.com/v1/enterprise/counterparties \
-H "Authorization: Bearer $REKBERPAY_WORKSPACE_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Kestrel Freight Pte Ltd",
"country_code": "SG",
"relationship": "vendor",
"contact_name": "Daniel Tan",
"contact_email": "[email protected]"
}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/counterparties', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.REKBERPAY_WORKSPACE_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: "Kestrel Freight Pte Ltd",
country_code: "SG",
relationship: "vendor",
contact_name: "Daniel Tan",
contact_email: "[email protected]"
}),
});
const data = await res.json();import os
import requests
resp = requests.post(
"https://api.rekberpay.com/v1/enterprise/counterparties",
headers={
"Authorization": f"Bearer {os.environ['REKBERPAY_WORKSPACE_KEY']}",
},
json={
"name": "Kestrel Freight Pte Ltd",
"country_code": "SG",
"relationship": "vendor",
"contact_name": "Daniel Tan",
"contact_email": "[email protected]",
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/counterparties');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('REKBERPAY_WORKSPACE_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Kestrel Freight Pte Ltd',
'country_code' => 'SG',
'relationship' => 'vendor',
'contact_name' => 'Daniel Tan',
'contact_email' => '[email protected]',
]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
201 Created
{
"success": true,
"data": {
"id": "ddddddd3-dddd-4ddd-8ddd-dddddddddddd",
"name": "Kestrel Freight Pte Ltd",
"country_code": "SG",
"contact_email": "[email protected]",
"contact_name": "Daniel Tan",
"relationship": "vendor",
"kyb_status": "not_started"
}
}Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_BODY | A field failed validation |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | FORBIDDEN | Your role is below operator |
403 | SCOPE_REQUIRED | The workspace key only has the read scope |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |
Update a counterparty
Any of the fields from Add a counterparty.
- Auth: A workspace API key (
Authorization: Bearer rpe_...), a personal API key or a dashboard session. - Role:
operator,finance,adminorowner. - Rate limit: 300 requests a minute per user, shared by every route.
- Idempotency: Not supported. A retry runs the call again.
Path parameters
| Name | Type | Description |
|---|---|---|
id | UUID | The counterparty ID |
Example request
curl -X PATCH https://api.rekberpay.com/v1/enterprise/counterparties/ddddddd3-dddd-4ddd-8ddd-dddddddddddd \
-H "Authorization: Bearer $REKBERPAY_WORKSPACE_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact_name": "Daniel Tan Wei"
}'const res = await fetch('https://api.rekberpay.com/v1/enterprise/counterparties/ddddddd3-dddd-4ddd-8ddd-dddddddddddd', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.REKBERPAY_WORKSPACE_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
contact_name: "Daniel Tan Wei"
}),
});
const data = await res.json();import os
import requests
resp = requests.patch(
"https://api.rekberpay.com/v1/enterprise/counterparties/ddddddd3-dddd-4ddd-8ddd-dddddddddddd",
headers={
"Authorization": f"Bearer {os.environ['REKBERPAY_WORKSPACE_KEY']}",
},
json={
"contact_name": "Daniel Tan Wei",
},
timeout=30,
)
print(resp.status_code, resp.json())<?php
$ch = curl_init('https://api.rekberpay.com/v1/enterprise/counterparties/ddddddd3-dddd-4ddd-8ddd-dddddddddddd');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('REKBERPAY_WORKSPACE_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'contact_name' => 'Daniel Tan Wei',
]),
]);
$response = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);Example response
200 OK
{
"success": true,
"data": {
"id": "ddddddd3-dddd-4ddd-8ddd-dddddddddddd",
"name": "Kestrel Freight Pte Ltd",
"country_code": "SG",
"contact_email": "[email protected]",
"contact_name": "Daniel Tan Wei",
"relationship": "vendor",
"kyb_status": "not_started",
"created_at": "2026-10-13T14:33:16.281Z"
}
}Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_BODY | A field failed validation, or the body was empty |
404 | NOT_FOUND | No counterparty with this ID in the workspace |
401 | UNAUTHORIZED, SESSION_EXPIRED, INVALID_TOKEN | No session or key, the session expired, or the key is wrong or revoked |
400 | INVALID_ACCOUNT | X-Enterprise-Account is not a UUID |
403 | NO_WORKSPACE | You are not an active member of that workspace, or the key belongs to another one |
403 | FORBIDDEN | Your role is below operator |
403 | SCOPE_REQUIRED | The workspace key only has the read scope |
403 | CSRF_FAILED | Session call without the matching X-CSRF-Token header |
429 | RATE_LIMITED | Over the rate limit. Wait for Retry-After seconds |