Auth Integration - Signup
In case you want the user to be able to signup from within the FastEditor, please provide a signup API endpoint according to the following specifications.
Endpoint
The endpoints for this request (for staging/production environments) should be provided by you and shared with your account manager at FastEditor.
Authorization
When sending the login request to your endpoint, we will add the X-Api-Key header to the request so you can verify the sender. The value of this X-Api-Key will be shared by your account manager on start start of the integration process.
Request
This request body is a JSON objects with the following parameters:
| Parameter | Required | Description | Data Type | Example |
|---|---|---|---|---|
| userName | Yes | The username (usually the email address) the user choose to create the account with | string | hello@login.com |
| password | Yes | The password the user has chosen | string | #9ske%ls9#DS1 |
| firstName | No | First name of the user | string | John |
| lastName | No | Last name of the user | string | Doe |
| language | Yes | The language in which FastEditor is shown to the user. This can be used to send localized emails or save to the user's account | string | nl en en-gb |
Example Request
Below an example request to your login endpoint:
curl --location--request POST 'https://yourapidomain.com/your_signup_endpoint' \--header 'X-Api-Key: ************* ' \--header 'Content-Type: application/json' \--data-raw '{ "userName": "hello@login.com", "password": "#9ske%ls9\#DS1", "firstName": "John", "lastName": "Doe", "language": "en"}'Success Response
Your endpoint should return a 201 response with the following JSON body. Only the id parameter is required, the rest is optional and depending on your level of integration.
{ "id": "33d29b8f-91f7-407c-ada6-257d16c1c16a", "firstName": "John", "lastName": "Doe", "userName": "hello@login.com"}Error response
In case something is wrong, you should return a status code in the 400 or 500 range. If you want to show a message to the user in the application, it should return JSON in the following format:
{ "message": "This is the error message I want to show to the user", "code": "Optional error code that could be used to handle specific cases"}###