Skip to main content

Experience User Actions

https://api.losant.com/applications/APPLICATION_ID/experience/users/EXPERIENCE_USER_ID

Below are the various requests that can be performed against the Experience User resource, as well as the expected parameters and the potential responses.

Delete​

Deletes an experience user

Method And Url​

DELETE https://api.losant.com/applications/APPLICATION_ID/experience/users/EXPERIENCE_USER_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.Application, all.Application.bounded, all.Organization, all.Organization.bounded, all.User, all.User.bounded, experienceUser.*, or experienceUser.delete.

Request Path Components​

Path ComponentDescriptionExample
APPLICATION_IDID associated with the application575ec8687ae143cd83dc4a97
EXPERIENCE_USER_IDID associated with the experience user575ed78e7ae143cd83dc4aab

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X DELETE \
https://api.losant.com/applications/APPLICATION_ID/experience/users/EXPERIENCE_USER_ID

Successful Responses​

CodeTypeDescription
200SuccessIf experience user was successfully deleted

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if experience user was not found

Get​

Retrieves information on an experience user

Method And Url​

GET https://api.losant.com/applications/APPLICATION_ID/experience/users/EXPERIENCE_USER_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.Application, all.Application.bounded, all.Application.read, all.Organization, all.Organization.bounded, all.Organization.read, all.User, all.User.bounded, all.User.read, experienceUser.*, or experienceUser.get.

Request Path Components​

Path ComponentDescriptionExample
APPLICATION_IDID associated with the application575ec8687ae143cd83dc4a97
EXPERIENCE_USER_IDID associated with the experience user575ed78e7ae143cd83dc4aab

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X GET \
https://api.losant.com/applications/APPLICATION_ID/experience/users/EXPERIENCE_USER_ID

Successful Responses​

CodeTypeDescription
200Experience UserExperience user information

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if experience user was not found

Patch​

Updates information about an experience user

Method And Url​

PATCH https://api.losant.com/applications/APPLICATION_ID/experience/users/EXPERIENCE_USER_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.Application, all.Application.bounded, all.Organization, all.Organization.bounded, all.User, all.User.bounded, experienceUser.*, or experienceUser.patch.

Request Path Components​

Path ComponentDescriptionExample
APPLICATION_IDID associated with the application575ec8687ae143cd83dc4a97
EXPERIENCE_USER_IDID associated with the experience user575ed78e7ae143cd83dc4aab

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Request Body​

The body of the request should be serialized JSON that validates against the Experience User Patch schema. For example, the following would be a valid body for this request:

{
"password": "aNewPassword",
"userTags": {
"customKey": "newCustomValue"
}
}

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X PATCH \
-d '{"password":"aNewPassword","userTags":{"customKey":"newCustomValue"}}' \
https://api.losant.com/applications/APPLICATION_ID/experience/users/EXPERIENCE_USER_ID

Successful Responses​

CodeTypeDescription
200Experience UserUpdated experience user information

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if experience user was not found

Schemas​

Error​

Schema for errors returned by the API

Error Schema​

  • ▶
    {} 3 keys
    • "http://json-schema.org/draft-07/schema#"
    • "object"
    • ▶
      {} 3 keys
      • ▶
        {} 1 key
        • ▶
          {} 1 key
          • ▶
            {} 2 keys

        Error Example​

        • ▶
          {} 2 keys
          • "NotFound"
          • "Application was not found"

        Experience User​

        Schema for a single Experience User

        Experience User Schema​

        • ▶
          {} 3 keys
          • "http://json-schema.org/draft-07/schema#"
          • "object"
          • ▶
            {} 14 keys
            • ▶
              {} 2 keys
              • ▶
                {} 2 keys
                • ▶
                  {} 2 keys
                  • ▶
                    {} 2 keys
                    • ▶
                      {} 2 keys
                      • ▶
                        {} 2 keys
                        • ▶
                          {} 2 keys
                          • ▶
                            {} 3 keys
                            • ▶
                              {} 2 keys
                              • ▶
                                {} 2 keys
                                • ▶
                                  {} 3 keys
                                  • ▶
                                    {} 2 keys
                                    • ▶
                                      {} 3 keys
                                      • ▶
                                        {} 2 keys

                                    Experience User Example​

                                    • ▶
                                      {} 12 keys
                                      • "58b9d782cbfafe1be675744d"
                                      • "58b9d782cbfafe1be675744d"
                                      • "575ec8687ae143cd83dc4a97"
                                      • "2016-06-13T04:00:00.000Z"
                                      • "2016-06-13T04:00:00.000Z"
                                      • "2016-06-13T04:00:00.000Z"
                                      • "2016-06-13T04:00:00.000Z"
                                      • "experienceuser@example.com"
                                      • "Example"
                                      • "Name"
                                      • "https://example.avatar.url/is_here.png"
                                      • ▶
                                        {} 1 key

                                      Experience User Patch​

                                      Schema for the body of an Experience User modification request

                                      Experience User Patch Schema​

                                      • ▶
                                        {} 4 keys
                                        • "http://json-schema.org/draft-07/schema#"
                                        • "object"
                                        • ▶
                                          {} 7 keys
                                          • ▶
                                            {} 3 keys
                                            • ▶
                                              {} 2 keys
                                              • ▶
                                                {} 2 keys
                                                • ▶
                                                  {} 3 keys
                                                  • ▶
                                                    {} 2 keys
                                                    • ▶
                                                      {} 3 keys
                                                      • ▶
                                                        {} 3 keys
                                                      • false

                                                    Experience User Patch Example​

                                                    • ▶
                                                      {} 2 keys
                                                      • "aNewPassword"
                                                      • ▶
                                                        {} 1 key

                                                      Success​

                                                      Schema for reporting a successful operation

                                                      Success Schema​

                                                      • ▶
                                                        {} 3 keys
                                                        • "http://json-schema.org/draft-07/schema#"
                                                        • "object"
                                                        • ▶
                                                          {} 1 key
                                                          • ▶
                                                            {} 2 keys

                                                        Success Example​

                                                        • ▶
                                                          {} 1 key
                                                          • true

                                                        Was this page helpful?


                                                        Still looking for help? You can also search the Losant Forums or submit your question there.