Skip to main content
POST
/
v2
/
access
/
promotions
Create promotion
curl --request POST \
  --url https://api-next.ofauth.com/v2/access/promotions \
  --header 'Content-Type: application/json' \
  --header 'apiKey: <api-key>' \
  --header 'x-connection-id: <api-key>' \
  --data '
{
  "discount": 50,
  "message": "<string>",
  "finishDays": 183,
  "subscribeCounts": 2,
  "subscribeDays": 183,
  "type": [
    "<string>"
  ]
}
'
[
  {
    "id": 123,
    "message": "<string>",
    "rawMessage": "<string>",
    "hasRelatedPromo": true,
    "price": 123,
    "type": "<string>",
    "canClaim": true,
    "claimsCount": 123,
    "subscribeCounts": 123,
    "subscribeDays": 123,
    "createdAt": "<string>",
    "finishedAt": "<string>",
    "isFinished": true
  }
]

Authorizations

apiKey
string
header
required

Your OFAuth API key for authenticating requests.

x-connection-id
string
header
required

Requires a connection via the x-connection-id header.

Body

application/json
discount
integer
required

Discount percentage to offer

Required range: 1 <= x <= 100
message
string
required

Promotion message

Maximum string length: 1000
finishDays
integer
required

Days until promotion ends

Required range: 1 <= x <= 365
subscribeCounts
integer
required

Maximum subscribers

Required range: x >= 1
subscribeDays
integer
required

Subscription duration in days

Required range: 1 <= x <= 365
type
string[]
required

Promotion types

Minimum array length: 1

Response

Successful response

id
number
required
message
string
required
rawMessage
string
required
price
number
required
type
string
required
canClaim
boolean
required
claimsCount
number
required
subscribeCounts
number
required
subscribeDays
number
required
createdAt
string
required
finishedAt
string
required
isFinished
boolean
required