Skip to main content

Organization Invites Actions

https://api.losant.com/invites

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

Get​

Gets information about an invite

Method And Url​

GET https://api.losant.com/invites

Authentication​

No authentication is required for this endpoint.

Request Query Parameters​

NameRequiredDescriptionDefaultExample
tokenYThe token associated with the invitetoken=aTokenString
emailYThe email associated with the inviteemail=example@example.com

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-X GET \
https://api.losant.com/invites?token=aTokenString&email=example%40example.com

Successful Responses​

CodeTypeDescription
200Organization Invitation InformationInformation about invite

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if invite not found
410ErrorError if invite has expired

Post​

Accepts/Rejects an invite

Method And Url​

POST https://api.losant.com/invites

Authentication​

No authentication is required for this endpoint.

Request Body​

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

{
"email": "invitedUser@example.com",
"token": "the_invitation_token",
"accept": true
}

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-X POST \
-d '{"email":"invitedUser@example.com","token":"the_invitation_token","accept":true}' \
https://api.losant.com/invites

Successful Responses​

CodeTypeDescription
200Organization Invitation ResultAcceptance/Rejection of invite

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if invite not found
410ErrorError if invite has expired

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"

        Organization Invitation Action​

        Schema for the body of a request to accept or reject an invitation

        Organization Invitation Action Schema​

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

                Organization Invitation Action Example​

                • ▶
                  {} 3 keys
                  • "invitedUser@example.com"
                  • "the_invitation_token"
                  • true

                Organization Invitation Information​

                Schema for information about an invitation

                Organization Invitation Information Schema​

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

                            Organization Invitation Information Example​

                            • ▶
                              {} 6 keys
                              • "My Organization"
                              • "invitedUser@example.com"
                              • "edit"
                              • "2016-05-13T04:00:00.000Z"
                              • 4233600000
                              • true

                            Organization Invitation Result​

                            Schema for the result of accepting/rejecting an invitation

                            Organization Invitation Result Schema​

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

                                Organization Invitation Result Example​

                                • ▶
                                  {} 2 keys
                                  • true
                                  • "575ed6e87ae143cd83dc4aa8"

                                Was this page helpful?


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