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
Name | Required | Description | Default | Example |
---|---|---|---|---|
token | Y | The token associated with the invite | token=aTokenString | |
Y | The email associated with the invite | email=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
Code | Type | Description |
---|---|---|
200 | Organization Invitation Information | Information about invite |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if invite not found |
410 | Error | Error 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
Code | Type | Description |
---|---|---|
200 | Organization Invitation Result | Acceptance/Rejection of invite |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if invite not found |
410 | Error | Error 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"
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
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.