All URIs are relative to http://localhost:8090
Method | HTTP request | Description |
---|---|---|
post_invitation | POST /api/invitation | Send Invitation |
post_invitation(tr_organization, invitation_data)
Send Invitation
Send Invitation Invitations act as a way to invite users to join an organization. After a user is invited, they will automatically be added to the organization with the role specified in the invitation once they set their.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::InvitationApi.new
tr_organization = 'tr_organization_example' # String | The organization id to use for the request
invitation_data = TrieveRubyClient::InvitationData.new({app_url: 'app_url_example', email: 'email_example', organization_id: 'organization_id_example', redirect_uri: 'redirect_uri_example', user_role: 37}) # InvitationData | JSON request payload to send an invitation
begin
# Send Invitation
api_instance.post_invitation(tr_organization, invitation_data)
rescue TrieveRubyClient::ApiError => e
puts "Error when calling InvitationApi->post_invitation: #{e}"
end
This returns an Array which contains the response data (nil
in this case), status code and headers.
<Array(nil, Integer, Hash)> post_invitation_with_http_info(tr_organization, invitation_data)
begin
# Send Invitation
data, status_code, headers = api_instance.post_invitation_with_http_info(tr_organization, invitation_data)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue TrieveRubyClient::ApiError => e
puts "Error when calling InvitationApi->post_invitation_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | String | The organization id to use for the request | |
invitation_data | InvitationData | JSON request payload to send an invitation |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json