Create a new driver
The playground uses your live account
Create a driver with the given data in your team. Prefer using the batch import endpoint for creating multiple drivers at once as it is more efficient, faster.
BasicAuthAuthorizationBasic <token>Use the API key as the username and leave the password empty.
The request body for creating a driver. Even though email and phone are optional, you must provide exactly one of them
application/json- body
The request body for creating a driver. Even though email and phone are optional, you must provide exactly one of them
name?|The driver's full name
displayName?|The name displayed for the driver in the UI
email?|Driver's email
phone?|Driver's phone number
depots?array<>|The depot IDs associated with the driver in the format depots/<id>, duplicates will be ignored. If set to null or not provided, the team's Main depot will be set as driver depot.
routeOverrides?|Overrides for the driver route behavior.
The created driver
application/json- response
The created driver
id*stringThe driver id, in the format drivers/<id>
^drivers\/[a-zA-Z0-9---_]{1,50}$name*|The name of the driver.
email*|The email of the driver.
phone*|The phone number of the driver.
displayName*|The display name of the driver.
active*booleanWhether the driver membership is active or paused. Paused drivers will not be assigned to any routes.
depots*array<>Depots associated with the driver.
routeOverrides*Settings to override default route settings.
curl -X POST 'https://api.spoke.com/public/v0.2b/drivers' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "name": null, "email": null, "phone": null, "displayName": null, "active": true, "depots": [ "string" ], "routeOverrides": { "startTime": { "hour": 0, "minute": 0 }, "endTime": { "hour": 0, "minute": 0 }, "startAddress": { "address": "string", "addressLineOne": "string", "addressLineTwo": "string", "latitude": -90, "longitude": -180, "placeId": "string", "placeTypes": [ "string" ] }, "endAddress": { "address": "string", "addressLineOne": "string", "addressLineTwo": "string", "latitude": -90, "longitude": -180, "placeId": "string", "placeTypes": [ "string" ] }, "maxStops": -9007199254740991, "drivingSpeed": "slower", "deliverySpeed": "slower", "vehicleType": "bike" }}