Skip to main content
Skip to Content
Dispatch API

Create a new member

POST
/members

The playground uses your live account

Requests are sent with your real API key, so creating, updating or deleting here changes your production data.

Create a member with the given data in your team. Prefer using the batch import endpoint for creating multiple members at once as it is more efficient.

Authorization

BasicAuth
headerAuthorizationBasic <token>

Use the API key as the username and leave the password empty.

Request Body

The request body for creating a member.

application/json
  1. body

The request body for creating a member.

name?|

The member's full name

displayName?|

The name displayed for the member in the UI

email?|

Member's email

linkedDriverId?|

The existing driver to link the member to

role*string

The operational role given to the member.

Value in"admin""depot-manager""dispatcher""read-only"
depots?array<>|

The depot IDs associated with the member 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 member depot.

Response Body

The created member

application/json
  1. response

The created member

id*string

The member id, in the format members/<id>

Match^members\/[a-zA-Z0-9---_]{1,50}$
name*|

The name of the member.

email*|

The email of the member.

phone*|

The phone number of the member.

linkedDriverId*|

The driver linked to the member (where applicable).

displayName*|

The display name of the member.

active*boolean

Whether the member membership is active or paused.

depots*array<>

Depots associated with the member.

roles*array<>

The role(s) given to the member.

Example Request
curl -X POST 'https://api.spoke.com/public/v1/members' \  -H 'Content-Type: application/json' \  -d '{  "role": "admin"}'
Example Response
{  "id": "string",  "name": null,  "email": null,  "phone": null,  "linkedDriverId": "string",  "displayName": null,  "active": true,  "depots": [    "string"  ],  "roles": [    "owner"  ]}