Register a new agent
curl --request POST \
--url https://olive-gateway-a6ba.onrender.com/api/v1/agents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_pin": "1234",
"agent_type": "super_agent",
"business_address": "45 Business Road",
"business_name": "ABC Money Transfer",
"contact_person": "Michael Smith",
"district": "Western Urban",
"kyc_documents": [
"[\"https://s3.amazonaws.com/doc1.pdf\"]"
],
"phone_number": "0778888888"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_pin: '1234',
agent_type: 'super_agent',
business_address: '45 Business Road',
business_name: 'ABC Money Transfer',
contact_person: 'Michael Smith',
district: 'Western Urban',
kyc_documents: ['["https://s3.amazonaws.com/doc1.pdf"]'],
phone_number: '0778888888'
})
};
fetch('https://olive-gateway-a6ba.onrender.com/api/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://olive-gateway-a6ba.onrender.com/api/v1/agents"
payload = {
"agent_pin": "1234",
"agent_type": "super_agent",
"business_address": "45 Business Road",
"business_name": "ABC Money Transfer",
"contact_person": "Michael Smith",
"district": "Western Urban",
"kyc_documents": ["[\"https://s3.amazonaws.com/doc1.pdf\"]"],
"phone_number": "0778888888"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent_id": "<string>",
"email": "<string>",
"instructions": "<string>",
"login_url": "<string>",
"message": "<string>",
"password": "<string>",
"success": true
}{}{}{}Agents
Register a new agent
Register a super-agent or sub-agent for the system. Only admins can register super-agents. Both admins and super-agents can register sub-agents.
POST
/
agents
Register a new agent
curl --request POST \
--url https://olive-gateway-a6ba.onrender.com/api/v1/agents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_pin": "1234",
"agent_type": "super_agent",
"business_address": "45 Business Road",
"business_name": "ABC Money Transfer",
"contact_person": "Michael Smith",
"district": "Western Urban",
"kyc_documents": [
"[\"https://s3.amazonaws.com/doc1.pdf\"]"
],
"phone_number": "0778888888"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_pin: '1234',
agent_type: 'super_agent',
business_address: '45 Business Road',
business_name: 'ABC Money Transfer',
contact_person: 'Michael Smith',
district: 'Western Urban',
kyc_documents: ['["https://s3.amazonaws.com/doc1.pdf"]'],
phone_number: '0778888888'
})
};
fetch('https://olive-gateway-a6ba.onrender.com/api/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://olive-gateway-a6ba.onrender.com/api/v1/agents"
payload = {
"agent_pin": "1234",
"agent_type": "super_agent",
"business_address": "45 Business Road",
"business_name": "ABC Money Transfer",
"contact_person": "Michael Smith",
"district": "Western Urban",
"kyc_documents": ["[\"https://s3.amazonaws.com/doc1.pdf\"]"],
"phone_number": "0778888888"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent_id": "<string>",
"email": "<string>",
"instructions": "<string>",
"login_url": "<string>",
"message": "<string>",
"password": "<string>",
"success": true
}{}{}{}Authorizations
ApiKeyAuthApiKeyAuthBearerAuth
API Key for third-party integrations (WhatsApp, Smart PAY, VULT). Format: 'Bearer olive_live_xxxxxxxxxxxxx'
Body
application/json
Agent registration details
Example:
"1234"
Required fields
Available options:
super_agent, sub_agent Example:
"super_agent"
Example:
"45 Business Road"
Example:
"ABC Money Transfer"
Example:
"Michael Smith"
Example:
"Western Urban"
Example:
["[\"https://s3.amazonaws.com/doc1.pdf\"]"]
Example:
"0778888888"
Default = 1
Required range:
1 <= x <= 3Example:
1
Optional fields
Example:
"michael@abc.com"
Conditionally required
Example:
""
Default = instant
Available options:
instant, weekly, monthly Example:
"instant"
⌘I