All URIs are relative to https://api.clerk.com/v1
Method | HTTP request | Description |
---|---|---|
create_email_address | POST /email_addresses | Create an email address |
delete_email_address | DELETE /email_addresses/{email_address_id} | Delete an email address |
get_email_address | GET /email_addresses/{email_address_id} | Retrieve an email address |
update_email_address | PATCH /email_addresses/{email_address_id} | Update an email address |
create_email_address(opts)
Create an email address
Create a new email address
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::EmailAddressesApi.new
opts = {
create_email_address_request: ClerkBackend::CreateEmailAddressRequest.new # CreateEmailAddressRequest |
}
begin
# Create an email address
result = api_instance.create_email_address(opts)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->create_email_address: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_email_address_with_http_info(opts)
begin
# Create an email address
data, status_code, headers = api_instance.create_email_address_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <EmailAddress>
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->create_email_address_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_email_address_request | CreateEmailAddressRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
delete_email_address(email_address_id)
Delete an email address
Delete the email address with the given ID
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::EmailAddressesApi.new
email_address_id = 'email_address_id_example' # String | The ID of the email address to delete
begin
# Delete an email address
result = api_instance.delete_email_address(email_address_id)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->delete_email_address: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_email_address_with_http_info(email_address_id)
begin
# Delete an email address
data, status_code, headers = api_instance.delete_email_address_with_http_info(email_address_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeletedObject>
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->delete_email_address_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
email_address_id | String | The ID of the email address to delete |
- Content-Type: Not defined
- Accept: application/json
get_email_address(email_address_id)
Retrieve an email address
Returns the details of an email address.
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::EmailAddressesApi.new
email_address_id = 'email_address_id_example' # String | The ID of the email address to retrieve
begin
# Retrieve an email address
result = api_instance.get_email_address(email_address_id)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->get_email_address: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_email_address_with_http_info(email_address_id)
begin
# Retrieve an email address
data, status_code, headers = api_instance.get_email_address_with_http_info(email_address_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <EmailAddress>
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->get_email_address_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
email_address_id | String | The ID of the email address to retrieve |
- Content-Type: Not defined
- Accept: application/json
update_email_address(email_address_id, opts)
Update an email address
Updates an email address.
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::EmailAddressesApi.new
email_address_id = 'email_address_id_example' # String | The ID of the email address to update
opts = {
update_email_address_request: ClerkBackend::UpdateEmailAddressRequest.new # UpdateEmailAddressRequest |
}
begin
# Update an email address
result = api_instance.update_email_address(email_address_id, opts)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->update_email_address: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_email_address_with_http_info(email_address_id, opts)
begin
# Update an email address
data, status_code, headers = api_instance.update_email_address_with_http_info(email_address_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <EmailAddress>
rescue ClerkBackend::ApiError => e
puts "Error when calling EmailAddressesApi->update_email_address_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
email_address_id | String | The ID of the email address to update | |
update_email_address_request | UpdateEmailAddressRequest | [optional] |
- Content-Type: application/json
- Accept: application/json