docs

Create User

1.0.0
OpenAPI 3.0.1

This is the specification of Authentication API. For more information about how to interact with the Authentication API, you can read the respective developer guide.

Getting Started

This API must be only used by backend services

Creating an API Client

First you will need to create a new API client using the SCAYLE Panel to obtain your client_id and client_secret. Make sure to store those credentials safely in your backend.

Authenticating a User

There are three different options on how to authenticate a user:

  1. Register a new user
  2. Login an existing user
  3. Login as a guest customer without a password

All of those endpoints will require you to provide the client_id and client_secret as a Basic Auth header.

Credentials client_id and client_secret don't have any expiration date. After successfully authenticating a user, you will get an access token and a refresh token. Access tokens are valid for 30 days and Refresh Tokens are valid for 60 days.

Validating a token

You will need to call the validation endpoint to check if an access token is still valid.

Refreshing a token

Refreshing a token is done by using the POST token endpoint by using the refresh_token OAuth grant.

You should consider to check the expiration date of the JWT to trigger a refresh early enough.

Server:https://{tenant-space}.auth.scayle.cloud
Client Libraries

OAuth Client endpoints

​

Endpoints for the OAuth clients with Basic Authorization

OAuth Client endpoints Operations

Create User

​

This endpoint registers a new user in the system and automatically logs them in upon successful registration. The response provides the shop frontend with an access token and a refresh token, eliminating the need for a separate login request. The access token is a JWT, signed with the shop secret, and can be stored on the frontend.

Body·

required
application/json
  • The email address of the user

  • The first name of the user

  • The last name of the user

  • Shop ID

  • Integer numbers.

  • The gender of the user

    values
    mfdn
  • The password of the user. Optional: omit it to register a passwordless customer, which is how the OTP flow registers. The shop backend decides which flows may omit it.

  • The newsletter opt-in collected on the form. When has_subscribed_newsletter is true, the opt-in is passed on to COBA, which triggers the newsletter-subscribed webhook for the shop. Omit the whole object when the customer did not opt in.

    Properties: 4

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • User already exists

  • Invalid data sent

  • Too many requests

Request Example for post/v1/auth/register
curl https://TENANT_SPACE.auth.scayle.cloud/v1/auth/register \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic username:password' \
  --data '{
  "first_name": "John",
  "last_name": "Doe",
  "email": "[email protected]",
  "password": "test123",
  "gender": "m",
  "shop_id": 139,
  "subscription": {
    "has_subscribed_newsletter": true,
    "source": "checkout-registration",
    "text": "Ich möchte zukünftig über aktuelle Trends, Angebote und Gutscheine per E-Mail informiert werden.",
    "client_ip": "8.8.8.8"
  }
}'
{
  "token_type": "Bearer",
  "expires_in": 2678400,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI1IiwianRpIjoiZjE3MDg2MWY0NDk4N2ExMmQyOTkxZjQ4NzE0ZGU2MTRhNGNjMTg2NjMyNmYxNmM1ODJmNGZkMTA2OTA3ZjM2NTU3NTQyYWI5YzFiY2ViNWEiLCJpYXQiOjE2Nzc2ODA0NzAuNzc3NDI2LCJuYmYiOjE2Nzc2ODA0NzAuNzc3NDM3LCJleHAiOjE2ODAzNTg4NzAuNzU0ODQsInN1YiI6IjEiLCJzY29wZXMiOltdLCJjdXN0b21lcklkIjoxMTcyOTU1MX0.SMf4J2jFDfFAOJnWfhgn4nO3_udda1LhIuVt9r0z1-Aeu8VVdhT53W_zUDAXEIVW3ba2VYne-u8hFxWaT82QXEukRuO8Wn23ZTfjtD7-0mWTz_psrvlg5-DjYZFFXvQ6P6tT9rOc21ibkEYl14-Wd1Ie2zF7HUdOu939rEBcEVU5jmJ-zzyHn7d3Qb1Z7CJL-_EU341rgQyByUCfYTmDAKN6wmI9hGChzgFIDewbV3CHXOs0RjQD6v0fZRZIBb91cdNpw1gLvAY-FhqcenBmGbBx09K9TwBum1zlQYpH_DrBFxH2HEa72-jERJWjUmMBVkSZ_9fHpQkrG3v9h7lDEobfRsfpolF89xCPPl-ug2oz_gLojTsWFXXfchIN-i8CNn3tY4D08qqsOs5lsl-OyA_pievPdSz8Q04pMTjmK1K5myPqONeG6X2gf8BQg--A4weOGYjJIjyo_NcEJN8nCKseg6i06JF2tSQAe0QnOzuVvVOHb-4HlD2h3XF2emGRtxGVXtvFtq5UhFgu9QNmwC8NkLJHBNDTlx7zDybNpHz597usUGV-ye06DZPs0Cx0Ch_RNUO6vV4aQUe0BsiEb4ZGncWt09uqO5iio8IFJTieHYpphPQg99asYhkcGqt1ZMoc6TFpm3lmpZE6uEfzhcEmu9FZA21NTxRtUHLLc9Q",
  "refresh_token": "def50200e47c39150262586222c6b1f9c700b386f2214fc33945a775f574c5902a0b919e701ec9fbfdbc3517d59936e8748443c8ca568d04616056b0755ef59a0281ac53ebec032f7f6155b2bf4cdf7cb845ff0639cc622cfbc1b0c9d72fb443e94f614ee87399f2bd593474b7cab30d4ea6b226c173989f3518ae616c2c8edb502f975c34c569cd70d326d7c9cf440a7f5e2f47f066c562064e9291e3ecd9cbf2a9df0989a48aa2732425478720319be7a3a235ac68c17bb3203b8fd1ba5fcdc71e205c8083b343df68bbfada6abc3d3c1d60eacdcef7d7d9a915e39a0c589766c6315f40c8af0b74af8cea9e230650c47fd425a0b7292862bc753cb97004ec8b505b7a37023ebc2ad3987c6693cbce5abb8e36f74e3b22e0b2d256f5845bbe63d4fddf2752a6a73e4229daa5f3f2c93f54121c58528b1a28f6bf347f1284d3145634ccd8552d7a05d8a086a212a2da2775a93a7ade1c8a42e309085a2a121999"
}

Models

​
​
​

Last updated: November 27, 2026