All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
invitation_create | POST /accounts/{account_id}/invitations | Create a new invitation |
invitation_delete | DELETE /accounts/{account_id}/invitations/{id} | Delete an invitation |
invitation_resend | POST /accounts/{account_id}/invitations/{id}/resend | Resend an invitation |
invitation_show | GET /accounts/{account_id}/invitations/{id} | Get a single invitation |
invitation_update | PATCH /accounts/{account_id}/invitations/{id} | Update an invitation |
invitation_update_settings | PATCH /projects/{project_id}/invitations/{id} | Update a member's invitation access |
invitations_list | GET /accounts/{account_id}/invitations | List invitations |
Invitation invitation_create(account_id, invitation_create_parameters, opts)
Create a new invitation
Invite a person to an account. Developers and translators need project_ids
and locale_ids
assigned to access them. Access token scope must include team.manage
.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::InvitationsApi.new
account_id = 'account_id_example' # String | Account ID
invitation_create_parameters = Phrase::InvitationCreateParameters.new({email: '[email protected]', role: 'Developer'}) # InvitationCreateParameters |
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Create a new invitation
result = api_instance.invitation_create(account_id, invitation_create_parameters, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling InvitationsApi->invitation_create: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
invitation_create_parameters | InvitationCreateParameters | ||
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Invitation)>
- Content-Type: application/json
- Accept: application/json
invitation_delete(account_id, id, opts)
Delete an invitation
Delete an existing invitation (must not be accepted yet). Access token scope must include team.manage
.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::InvitationsApi.new
account_id = 'account_id_example' # String | Account ID
id = 'id_example' # String | ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Delete an invitation
api_instance.invitation_delete(account_id, id, opts)
rescue Phrase::ApiError => e
puts "Exception when calling InvitationsApi->invitation_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
id | String | ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(nil (empty response body))>
- Content-Type: Not defined
- Accept: Not defined
Invitation invitation_resend(account_id, id, opts)
Resend an invitation
Resend the invitation email (must not be accepted yet). Access token scope must include team.manage
.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::InvitationsApi.new
account_id = 'account_id_example' # String | Account ID
id = 'id_example' # String | ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Resend an invitation
result = api_instance.invitation_resend(account_id, id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling InvitationsApi->invitation_resend: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
id | String | ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Invitation)>
- Content-Type: Not defined
- Accept: application/json
Invitation invitation_show(account_id, id, opts)
Get a single invitation
Get details on a single invitation. Access token scope must include team.manage
.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::InvitationsApi.new
account_id = 'account_id_example' # String | Account ID
id = 'id_example' # String | ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Get a single invitation
result = api_instance.invitation_show(account_id, id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling InvitationsApi->invitation_show: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
id | String | ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Invitation)>
- Content-Type: Not defined
- Accept: application/json
Invitation invitation_update(account_id, id, invitation_update_parameters, opts)
Update an invitation
Update an existing invitation (must not be accepted yet). The email
cannot be updated. Developers and translators need project_ids
and locale_ids
assigned to access them. Access token scope must include team.manage
.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::InvitationsApi.new
account_id = 'account_id_example' # String | Account ID
id = 'id_example' # String | ID
invitation_update_parameters = Phrase::InvitationUpdateParameters.new # InvitationUpdateParameters |
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Update an invitation
result = api_instance.invitation_update(account_id, id, invitation_update_parameters, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling InvitationsApi->invitation_update: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
id | String | ID | |
invitation_update_parameters | InvitationUpdateParameters | ||
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Invitation)>
- Content-Type: application/json
- Accept: application/json
Invitation invitation_update_settings(project_id, id, invitation_update_settings_parameters, opts)
Update a member's invitation access
Update member's settings in the invitations. Access token scope must include team.manage
.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::InvitationsApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
invitation_update_settings_parameters = Phrase::InvitationUpdateSettingsParameters.new # InvitationUpdateSettingsParameters |
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Update a member's invitation access
result = api_instance.invitation_update_settings(project_id, id, invitation_update_settings_parameters, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling InvitationsApi->invitation_update_settings: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_id | String | Project ID | |
id | String | ID | |
invitation_update_settings_parameters | InvitationUpdateSettingsParameters | ||
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
Response<(Invitation)>
- Content-Type: application/json
- Accept: application/json
Array<Invitation> invitations_list(account_id, opts)
List invitations
List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include team.manage
.
# load the gem
require 'phrase'
# setup authorization
Phrase.configure do |config|
# Configure HTTP basic authorization: Basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::InvitationsApi.new
account_id = 'account_id_example' # String | Account ID
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
page: 1, # Integer | Page number
per_page: 25 # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
}
begin
#List invitations
result = api_instance.invitations_list(account_id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling InvitationsApi->invitations_list: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
account_id | String | Account ID | |
x_phrase_app_otp | String | Two-Factor-Authentication token (optional) | [optional] |
page | Integer | Page number | [optional] |
per_page | Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional] |
Response<(Array<Invitation>)>
- Content-Type: Not defined
- Accept: application/json