Unlike SAML 2.0 and OAuth 2.0, customers integrating with Skilljar via Token-based SSO will use Skilljar's API to set custom user attributes (via signup fields).
There are two options for endpoints to use when setting sign up fields.
Updating multiple sign up fields
you can do this with:
POST /v1/domains/{domain_name}/users/{user_id}/signup-fields-bulk
If the user does not have a current value assigned to any of the domain signup fields, this endpoint will create a new signup field value for the user.
If the user already has a value associated with the signup field, it will be updated to the new value.
Request Body
{
"signup_fields": [
{"id": "4mjoj729j1my", "value": "NEW VALUE"},
{"id": "2dm0wghioq6rl", "value": "ANOTHER VALUE"}
]
}
Response
On success, the service will return a 201 Created
with the Location
header set.
The Path specified in the Location
header can be used to retrieve a paginated list of all signup field values for the user.
The response body will include all new and updated signup fields values. Unchanged values will not be included in this response.
{
"signup_fields"": [
{
"signup_field": {
"id": "4mjoj729j1my",
"label": "Job Title"
},
"value": "NEW VALUE"
},
{
"signup_field": {
"id": "2dm0wghioq6rl",
"label": "who is it"
},
"value": "ANOTHER VALUE"
}
]
}
Updating only one sign up field
you can use the endpoint above, or use the following
POST /v1/domains/{domain_name}/users/{user_id}/signup-fields
Example POST request body:
{
"signup_field": {
"id": "abcd1234"
},
"value": "Example Company Name"
}
The endpoint above creates or updates a user's signup field value. If the user does not have a current value assigned to the POSTed signup field, this endpoint will create a new signup field value for the user. If the user already has a value associated with that signup field, it will be updated to the value POSTed.
Additional Notes
Please note that the signup field ID can be pulled from the Dashboard (navigate to Domains and Publishing --> Domain Settings --> Click edit next to the Signup Field id value you would like to reference and the id will be the last obfuscated id in the URL. Example: https://dashboard.skilljar.com/publishing/domains/3tcw1lfhvd71s/fields/30sbbrpoj1pfy/edit) or the List API Call
Note: You'll need to call this endpoint for each signup field you'd like to create or update.