POST
/
v1
/
members
curl --request POST \
  --url https://api.onsi.com/v1/members \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "email": "jane-smith@onsi.com",
  "firstName": "John",
  "lastName": "Smith",
  "phone": "+447123456789",
  "workerId": "ID_123",
  "tier": "Gold",
  "accountDetails": {
    "accountHolder": "John Smith",
    "sortCode": "123456",
    "accountNumber": "12345678"
  },
  "enablePayroll": true,
  "dob": "1990-01-01",
  "gender": "Female"
}'
{
  "email": "jsmith@example.com",
  "memberId": "mem_q5sdae3se6eg9m9dcvug",
  "firstName": "John",
  "lastName": "Smith",
  "phone": "+447123456789",
  "tier": "Gold",
  "workerId": "ID_123",
  "status": "active",
  "accountDetails": {
    "accountHolder": "John Smith",
    "sortCode": "123456",
    "accountNumber": "12345678"
  },
  "enablePayroll": true,
  "gender": "Female",
  "dob": "1990-01-01"
}

This invites a new member to your platform, when they are created they will have the status of invited, if their email already has an associated Onsi account their status will go straight to active.

Relevant Error Codes

If there are any issues with the member add, the API will return a 400 status code with the following error codes:

Authorizations

X-API-KEY
string
header
required

Headers

x-idempotency-key
string

Unique key to ensure idempotency of the request

Body

application/json

Body

The body is of type object.

Response

201 - application/json

201

A member on the platform.