Substy Developers
Team

Create team schedules

Create multiple AI or employee work schedules in one request. Each schedule supplies its own creators, dates, time slots and timezone.

POST/v1/agencies/{agencyId}/team/schedule-batches

Create multiple AI or employee work schedules in one request. Each schedule supplies its own creators, dates, time slots and timezone.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

agencyId*string
Length1 <= length

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

application/json

application/json

application/json

curl -X POST "https://example.com/v1/agencies/string/team/schedule-batches" \  -H "Authorization: Bearer YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "schedules": [      {        "creatorIds": [          "string"        ],        "dates": [          "2019-08-24T14:15:22Z"        ],        "timeSlots": [          {            "startTime": "string",            "endTime": "string"          }        ]      }    ]  }'
{  "data": [    {      "timeSlots": [        {          "id": "string",          "createdAt": "2019-08-24T14:15:22Z",          "updatedAt": "2019-08-24T14:15:22Z",          "startTime": "string",          "endTime": "string",          "position": 0,          "dayOfWeek": null,          "scheduleId": "string"        }      ],      "creators": [        {          "creator": {            "platform": "ONLYFANS",            "id": "string",            "name": "string"          },          "creatorId": "string",          "scheduleId": "string",          "assignedAt": "2019-08-24T14:15:22Z"        }      ],      "employees": [        {          "agencyEmployee": {            "id": "string",            "color": null,            "employeeId": "string"          },          "scheduleId": "string",          "assignedAt": "2019-08-24T14:15:22Z",          "agencyEmployeeId": "string"        }      ],      "scheduleDates": [        {          "date": "2019-08-24T14:15:22Z",          "id": "string",          "createdAt": "2019-08-24T14:15:22Z",          "scheduleId": "string"        }      ],      "id": "string",      "createdAt": "2019-08-24T14:15:22Z",      "status": "COMPLETED",      "timezone": "string",      "updatedAt": "2019-08-24T14:15:22Z",      "scheduledFor": "AI",      "isAllDay": true,      "isRecurring": true,      "recurrenceType": null,      "recurrenceEnd": null,      "color": null,      "isCompleted": true,      "completedAt": null,      "lastOccurrenceStart": null    }  ],  "meta": {    "requestId": "string",    "operationId": "3051932a-fdd2-48fa-b330-7e7d41535969",    "status": "COMPLETED"  }}