Skip to main content
POST
/
contests
/
contests
/
referral
Create Referral
curl --request POST \
  --url http://localhost:8080/contests/contests/referral \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "start_at": "2023-11-07T05:31:56Z",
  "end_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "prize_text": "<string>",
  "contest_type": "referral_paid",
  "daily_summary_time": "12:00:00",
  "daily_summary_times": "<string>",
  "timezone": "UTC",
  "is_active": true,
  "created_by": 123
}
'
{
  "id": 123,
  "title": "<string>",
  "contest_type": "<string>",
  "start_at": "2023-11-07T05:31:56Z",
  "end_at": "2023-11-07T05:31:56Z",
  "daily_summary_time": "<string>",
  "timezone": "<string>",
  "is_active": true,
  "final_summary_sent": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "prize_text": "<string>",
  "daily_summary_times": "<string>",
  "last_daily_summary_date": "2023-12-25",
  "last_daily_summary_at": "2023-11-07T05:31:56Z",
  "created_by": 123
}

Body

application/json
title
string
required
start_at
string<date-time>
required
end_at
string<date-time>
required
description
string | null
prize_text
string | null
contest_type
string
default:referral_paid
Minimum string length: 1
daily_summary_time
string<time>
default:12:00:00
daily_summary_times
string | null

Список времён ЧЧ:ММ через запятую (например, 12:00,18:00)

timezone
string
default:UTC
is_active
boolean
default:true
created_by
integer | null

Response

Successful Response

id
integer
required
title
string
required
contest_type
string
required
start_at
string<date-time>
required
end_at
string<date-time>
required
daily_summary_time
string<time>
required
timezone
string
required
is_active
boolean
required
final_summary_sent
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
description
string | null
prize_text
string | null
daily_summary_times
string | null
last_daily_summary_date
string<date> | null
last_daily_summary_at
string<date-time> | null
created_by
integer | null