Create staff accounts

Create a staff account for a store by sending an invitation to an email.

📘

To create staff accounts use secret token. The invite_staff access scope is required. Reach out to us at [email protected] to add the scope.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Request

A JSON object with the following fields:

Staff

FieldTypeDescription
emailstringAccount email
staffScopesarray of stringsScopes declaring permissions for the staff account. See: Get staff scopes
If scopes are not defined, staff account will have all scopes.

A new staff account is created with the "inviteAccepted": false status. Staff members must accept the invite to get access.

Response

A JSON object with the following fields:

CreateStatus

FieldTypeDescription
successbooleanStatus of sent invitation

Errors

In case of error, Ecwid responds with an error HTTP status code and JSON-formatted body containing error description.

HTTP codes

HTTP StatusResponse JSONDescription
400Request parameters are malformed
409The customer with the given email already exists
415Unsupported content-type: expected application/json or text/json
500The creation request failed because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language
Authorization
Query