Automation actions (7)
Campaign discovery, funding, slots, username check, and crypto deposit addresses
/api/automation/actions/usernames/check/:usernameRequired
Requires an Automation connection key (UGAU_xxx) or OAuth access token
Campaign discovery, funding, slots, username check, and crypto deposit addresses
Rate Limit
This endpoint is limited to 100 requests per 1 minute per API key.
Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining
Credentials
Your API key is never stored and only used for this request
curl -X GET https://api.ugc.africa/api/automation/actions/usernames/check/:username \ -H "Authorization: Bearer YOUR_API_KEY"
SDK examples (coming soon)
// Official Node SDK - coming soon. Use REST (see Getting Started) or fetch() examples.
// Planned: npm install @UGC/node
Official @UGC/* client libraries are on the roadmap. Integrate with the REST API and webhooks today. SDK pages · Email notify
Success
{
"id": "..."
}curl -X POST https://api.ugc.africa/automation/actions/crypto/wallets/deposit-address \
-H "Authorization: Bearer UGAU_live_xxx" \
-H "Content-Type: application/json" \
-d '{ "currency": "USDT", "network": "TRC20" }'All routes are under /api/automation/actions and require Bearer (Automation connection key or OAuth access token). Send an Idempotency-Key header on POSTs for safe retries (24h replay window).
| # | Method & path | Purpose |
|---|---|---|
| 1 | GET /api/automation/actions/usernames/check/:username | Check username availability |
| 2 | POST /api/automation/actions/crypto/wallets/deposit-address | Generate a crypto deposit address |
| 3 | GET /api/automation/actions/campaigns | List my campaigns (?status= filter) |
| 4 | POST /api/automation/actions/campaigns | Create a DRAFT campaign |
| 5 | GET /api/automation/actions/campaigns/:id | Get a campaign I own |
| 6 | POST /api/automation/actions/campaigns/:id/fund | Fund a campaign |
| 7 | GET /api/automation/actions/campaigns/:id/slots | List a campaign's creator slots |
Generate a crypto deposit address
Create a campaign
Key fields: title, payoutType (FLAT | CPM_SOCIAL | CPM_STREAMING - not CPM), advertiserCpmRate, and totalBudget are required. The rate field is advertiserCpmRate. Channels are targetPlatforms (slugs such as whatsapp_status and snapchat). assets are URLs (no upload tool). Optional targeting (targetNiches, countryAllowlist, minCreatorLevel, minKycTier) and creative fields (captionTemplate, requiredHashtags) follow the same create schema as MCP campaign_create. The campaign is created DRAFT and unfunded - fund it next. OAuth callers need campaign:write to create and campaign:fund to fund; API keys and portal JWTs are not filtered by that scope ladder. Confirm before any funding call.
Fund a campaign
method is one of checkout (returns a checkout URL), payment_link (returns a shareable funding link), or wallet (debits the platform wallet immediately). amount defaults to the campaign's totalBudget on first funding. The campaign_funded trigger fires once the payment settles.
List a campaign's slots
Returns each slot's status, platform, postUrl, totalViews, and timestamps - only the campaign owner can query this.
Related
- MCP tools - the same Campaign/Slot domain, exposed to LLM/agent clients over MCP instead of REST
- Automation triggers
Common Errors
INVALID_CURRENCYInvalid Currency Code
The currency code provided is not supported.
{
"success": false,
"error": {
"code": "INVALID_CURRENCY",
"message": "Currency code \"XYZ\" is not supported",
"supportedCurrencies": [
"USD",
"EUR",
"GBP",
"GHS",
"NGN"
]
}
}Solution: Use a valid ISO 4217 currency code. See our list of supported currencies.
INSUFFICIENT_BALANCEInsufficient Wallet Balance
The wallet does not have enough balance to complete this transaction.
{
"success": false,
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient balance in USD wallet",
"required": 5000,
"available": 2500
}
}Solution: Add funds to your wallet or use a different payment method.
UNAUTHORIZEDAuthentication Required
The request requires authentication but none was provided.
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired authentication token"
}
}Solution: Include a valid API key or JWT token in the Authorization header.
RATE_LIMIT_EXCEEDEDRate Limit Exceeded
Too many requests have been made in a short period.
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Try again in 60 seconds",
"retryAfter": 60
}
}Solution: Wait for the specified retry period before making another request. Consider implementing exponential backoff.
Did this solve your problem?