POST /signup
Requires authentication with server access token.
Create a new user with minimal data, normally used in mobile clients.
The email is globally unique in Schibsted account, and there can only be one account associated with any given email address. To query for the availability of an email address, see the email status endpoint.
See also
Help us improve
Did you spot an error? Or maybe you just have a suggestion for how we can improve? Leave us a comment.
Request
POST /api/2/signup
requiredEmail of the user. Must be unique across all of SPiD | |
password | optionalDesired password |
redirectUri | optionalWhere to redirect the user after completing signup |
displayName | optionalNew preferred display name |
name | optionalJSON object containing |
birthday | optionalNew date of birth, YYYY-MM-DD |
addresses | optionalA JSON string. A map of addresses, with the address type as keys and the address objects/maps as values. See the address type for appropriate types |
gender | optionalNew gender. Legal values and a localized description can be fetched from /api/2/describe/User?property=gender. |
acceptTerms | optionalCreate the user with terms & conditions and privacy policy pre-accepted |
deviceData | optionalJSON object containing user agent and device data |
Example request
curl
Minimal example
curl https://login.schibsted.com/api/2/signup \
-X POST \
-H "Authorization: Bearer [access token]" \
-d "email=johnd@example.com"
With all parameters
curl https://login.schibsted.com/api/2/signup \
-X POST \
-H "Authorization: Bearer [access token]" \
-d "email=johnd@example.com" \
-d "password=admin123" \
-d "redirectUri=http://somewhere.com/else/" \
-d "displayName=John" \
-d "name={"givenName":"John","familyName":"Doe","formatted":"John Doe"}" \
-d "birthday=1977-01-31" \
-d "addresses={"home":{"country":"Norway","streetNumber":"1","longitude":"","floor":"","locality":"","formatted":"STREET 1, 0123 OSLO, NORGE","streetEntrance":"","apartment":"","postalCode":"0123","latitude":"","type":"home","region":"","streetAddress":"STREET"}}" \
-d "gender=undisclosed" \
-d "acceptTerms=true" \
-d "deviceData={"platform":"Mac","userAgent":"Chrome","userAgentVersion":"73.0.3683.75","hasLiedOs":false,"hasLiedBrowser":false,"fonts":["Example font"],"plugins":["Example plugin"]}"
Response
This endpoint supports the JSON response format.
Success: 201 Created
Returns the new user
User
The user object is based on the portable contacts specification. It is extended with some custom fields. userId
is an integer and represents the unique user ID, while id
is a legacy uuid and should be ignored in new integrations. The uuid
is also a user identifier, which is is globally unique and should therefore be the preferred identifier for a user. The email
and phoneNumber
fields will always contain the primary used for both if available. The corresponding *Verified fields are the date of the last time those were verified.
When requesting a user that is not connected to the authorized client, only public profile data will be available:
id
userId
uuid
status
displayName
name
gender
preferredUsername
utcOffset
published
updated
lastLoggedIn
locale
tracking
id ✓ | stringLegacy |
---|---|
userId ✓ | integer (as string)Unique user ID. Custom extension. |
uuid ✓ | stringUnique user UUID. Custom extension. Should be preferred as the user identifier. |
name ✓ | NameJSON object containing |
displayName ✓ | stringName suitable for displaying to end-users. |
published ✓ | date-timeThe date this user was first added. Can return false if the user account was deleted. |
updated ✓ | date-timeThe most recent date the details of this user were updated |
status ✓ | User status |
email ✓ | stringPrimary email |
emailVerified | stringDate when the email was last verified. |
emails ✓ | list of Email addressesAll user's registered email addresses. |
phoneNumber | stringPrimary phone number |
phoneNumberVerified | stringDate when the phone number was last verified. |
phoneNumbers | list of Phone numbersAll user's registered phone numbers. |
verified | stringDate when user last verified data (email, phone number). Returns false if user wasn't verified. |
url | string |
photo | stringURL to a photo of the user (GIF/JPG/PNG) |
preferredUsername | string |
gender ✓ | stringOne of undisclosed, female, male, other, withheld. Default is undisclosed. Portable contacts |
birthday ✓ | dateDate of birth in YYYY-MM-DD format. Year will be 0000 if not provided. Defaults to 0000-00-00. Portable contacts |
locale ✓ | stringThe user's preferred locale. Locales follow ISO Language and country codes respectively, joined by an underscore. |
utcOffset ✓ | stringThe user's timezone, given as offset from UTC. |
lastLoggedIn ✓ | datetimeReturns false if the user has not been logged in before. |
lastAuthenticated ✓ | datetimeThe last time the user authenticated with their password. Returns false if the user has not been authenticated before. |
imported | datetime |
migrated | datetime |
addresses | collection of Addresses, as an object with |
accounts | list of Third-party accountsThird-party accounts and other client services |
merchants | arrayList of Schibsted account merchants the user is connected to |
currentLocation | list of AddressesIf user has no current location returns empty array. |
tracking | booleanIf |
The check mark ✓ indicates that the field always contains a valid non-empty value.
Failure cases
Some HTTP response codes are used for multiple error situations. There is no consistent way to tell these apart, but the error object will contain a textual explanation of the reason for the error. For explanation on OAuth related failures and errors see OAuth authentication failures.
- 302 Found The email address already exists.
- 400 Bad Request Required email parameter is missing.
- 401 Unauthorized You don't have administration rights for this client.
- 401 Unauthorized Your client doesn't have administration rights for this client.
- 403 Forbidden Client is not authorized to access this API endpoint. Contact Schibsted account to request access.
- 403 Forbidden Requesting IP is not whitelisted
- 403 Forbidden Access token rejected
- 404 Not Found Unknown client ID
- 404 Not Found Client ID mismatch. The client making the request is no the owner of this resource, and does not have administrative privileges for it.
- 409 Conflict Users could not be created.
- 420 Request Ratelimit exceeded
- 451 Domain of email is blocked due to legal reasons.
Sample response
JSON
{
"email": "user@domain.tld",
"oauthToken": "0123456789abcdef0123456789abcdef01234567",
"accounts": {
"52f8e3d9efd04bb749000000": {
"id": "52f8e3d9efd04bb749000000",
"domain": "www.kodemaker.no",
"accountName": "Kodemaker"
}
},
"merchants": [
47000
]
}
Comments/feedback
Do you have questions, or just want to contribute some newly gained insight? Want to share an example? Please leave a comment. Our team reads and responds to every question. Additionally, your experience can help others using Schibsted account, and it can help us continuously improve our documentation.