Create a campaign
Creates a new affiliate campaign for the authenticated merchant account. Commission duration is controlled by commissionRecurring and recurringMonthsLimit. commissionRecurring=false means only the first attributed payment earns commission. commissionRecurring=true with recurringMonthsLimit=null means lifetime recurring commissions. commissionRecurring=true with recurringMonthsLimit=12 means recurring payments remain commissionable for 12 months. Limited windows start at the first attributed payment / initial conversion, not the first click.
Creates a new affiliate campaign for the authenticated merchant account. Commission duration is controlled by commissionRecurring and recurringMonthsLimit. commissionRecurring=false means only the first attributed payment earns commission. commissionRecurring=true with recurringMonthsLimit=null means lifetime recurring commissions. commissionRecurring=true with recurringMonthsLimit=12 means recurring payments remain commissionable for 12 months. Limited windows start at the first attributed payment / initial conversion, not the first click.
Authorization
bearerAuth API key issued from the merchant dashboard. Sent as Authorization: Bearer <token>. Used by the SDK and any direct server-to-server integration.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.refcampaign.com/api/v1/campaigns" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "landingUrl": "http://example.com", "commissionRate": 1, "commissionType": "PERCENTAGE" }'{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"details": null
},
"meta": {
"timestamp": "2019-08-24T14:15:22Z",
"requestId": "string"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"details": null
},
"meta": {
"timestamp": "2019-08-24T14:15:22Z",
"requestId": "string"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"details": null
},
"meta": {
"timestamp": "2019-08-24T14:15:22Z",
"requestId": "string"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"details": null
},
"meta": {
"timestamp": "2019-08-24T14:15:22Z",
"requestId": "string"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"details": null
},
"meta": {
"timestamp": "2019-08-24T14:15:22Z",
"requestId": "string"
}
}