Skip to main content
POST
/
availability
/
create-availability
Create Availability
curl --request POST \
  --url http://localhost:3000/api/availability/create-availability \
  --header 'Content-Type: application/json' \
  --data '
{
  "artistId": "<string>",
  "weeklySlots": {},
  "dateRangeType": "indefinitely",
  "effectiveFrom": 123,
  "effectiveUntil": 123,
  "rollingDays": "<string>"
}
'
{
  "success": true
}

Body

application/json
artistId
string
required

ID of the artist this availability belongs to

weeklySlots
object
required

Weekly schedule with days as keys (e.g., 'Sunday', 'Monday')

dateRangeType
enum<string>
required

Type of date range for this availability

Available options:
indefinitely,
specific,
rolling
effectiveFrom
number
required

UTC timestamp in milliseconds when this availability becomes effective

effectiveUntil
number

Optional UTC timestamp in milliseconds when this availability ends

rollingDays
string

Optional number of days to roll over when dateRangeType is 'rolling'

Response

Availability created successfully

success
boolean
required

Whether the operation was successful