curl https://api.knock.app/v1/schedules \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $KNOCK_API_KEY" \
-d '{
"recipients": [
"user_123"
],
"repeats": [
{
"__typename": "ScheduleRepeat",
"frequency": "daily"
}
],
"workflow": "comment-created",
"tenant": "acme_corp"
}'
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"inserted_at": "2021-01-01T00:00:00Z",
"recipient": {
"id": "jane",
"__typename": "User",
"updated_at": "2024-05-22T12:00:00Z",
"avatar": null,
"created_at": null,
"email": "[email protected]",
"name": "Jane Doe",
"phone_number": null,
"timezone": null
},
"repeats": [
{
"__typename": "ScheduleRepeat",
"frequency": "daily",
"day_of_month": null,
"days": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
],
"hours": null,
"interval": 1,
"minutes": null
}
],
"updated_at": "2021-01-01T00:00:00Z",
"workflow": "workflow_123",
"__typename": "Schedule",
"actor": {
"id": "id",
"__typename": "User",
"updated_at": "2019-12-27T18:11:19.117Z",
"avatar": "avatar",
"created_at": "2019-12-27T18:11:19.117Z",
"email": "email",
"name": "name",
"phone_number": "phone_number",
"timezone": "timezone"
},
"data": {
"foo": "bar"
},
"last_occurrence_at": null,
"next_occurrence_at": null,
"tenant": null
}
]