Server-Side API Overview
Real server-to-server endpoints for campaigns and payment links
/automation/webhooks/subscribeRequired
Requires API key authentication (UGSK_xxx)
Real server-to-server endpoints for campaigns and payment links
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 POST https://api.ugc.africa/automation/webhooks/subscribe \ -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/webhooks/subscribe \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Base URL: https://api.ugc.africa
This section documents the two real server-to-server surfaces developers integrate against: the Automation Actions API (campaign management) and the Payment Links API (shareable payment/invoice links). There is no separate "merchant" product - both sit on top of the same Campaign → Slot → CreatorProfile ad-distribution engine described in Getting Started.
Automation Actions API
/api/automation/actions/* - create and manage campaigns, fund them, and inspect slots, from your own backend or automation platform.
Authentication (any one of):
| Credential | Format | Where it comes from |
|---|---|---|
| Self-serve API key | Authorization: Bearer UGSK_live_... | Console → API Keys - see API key authentication |
| Automation connection key | Authorization: Bearer UGAU_... | Console → Automation - see Automation overview |
| Portal session JWT | Authorization: Bearer <jwt> | Same token your logged-in dashboard session uses |
See Campaign & Slot endpoints for the full reference and Fund a campaign for the funding call.
Payment Links API
/payment-links/* - create shareable payment/invoice links (optionally with transaction protection), used for one-off invoicing or as a campaign-funding link for a third party.
Authentication: portal session JWT only (Authorization: Bearer <jwt>) - this is an account-holder endpoint, not a third-party integration credential.
See Payment Links endpoints for the full reference and Payment Links guide for the conceptual overview.
Response Format
There is no single universal envelope - a successful response is usually the resource itself (whatever shape that endpoint's reference documents, e.g. { "id": "...", "status": "..." }). A handful of endpoints that process a payment inline (card/crypto charges) return { "success": false, "error": "..." } on failure instead of throwing, with error as a plain string. Request-validation and auth failures instead use the standard { "statusCode": 400, "message": "...", "error": "Bad Request" } shape. Always check the HTTP status, not a success field. See Errors & troubleshooting.
Webhooks, not polling
Both surfaces emit events through the same Automation trigger catalog (campaign_created, campaign_funded, campaign_activated, slot_reserved, slot_approved, earnings_released, withdrawal_completed, and others) - subscribe once via POST /automation/webhooks/subscribe instead of polling for status changes. See Automation triggers for the full catalog (31 REST-hook names in AUTOMATION_TRIGGER_LIST; the Console picker shows the 19-event UGC subset) and the real X-UGC-Signature / X-UGC-Event-Id delivery headers.
Rate Limits
| Endpoint Type | Limit | Window |
|---|---|---|
| Campaign actions | 100 requests | per minute |
| Payment Links | 100 requests | per minute |
| List endpoints | 200 requests | per minute |
Responses include standard rate-limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1709639400Common 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?