> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Learn how to configure and add your first contact with SendX Ruby SDK

## Prerequisites

To get the most out of this guide, you’ll need to:

* [**Create a SendX Account**](https://app.sendx.io/register)
* [**Install Ruby >v3.0**](https://www.ruby-lang.org/en/downloads/)

## 1. Install

Get the ruby sendx sdk

```shellscript shell theme={null}
gem install sendx-ruby-sdk
```

## 2. Getting Started

```ruby Ruby theme={null}
# Load the gem
require 'time'
require 'sendx-ruby-sdk'
# setup authorization
SendX.configure do |config|
  # Configure API key authorization: apiKeyAuth
  config.api_key['apiKeyAuth'] = 'YOUR API KEY'
  config.server_index = 2
end

api_instance = SendX::ContactApi.new
contact_request = SendX::ContactRequest.new(
  email: "john@doe.com",
  first_name: "John",
  last_name: "Doe",
  company: "SendX",
  last_tracked_ip: "34.94.159.140",
  tags: ["MKdhTovsTJDetCyrJmRySL"],
  custom_fields: {
        'fnwfnke23kn4kn' => "VIP",
        "9i0jinjn0ib0"=> "Subscribers"
    },
)

begin
  # Create a contact
  result = api_instance.create_contact(contact_request)
  p result
rescue SendX::ApiError => e
  puts "Error when calling ContactApi->create_contact: #{e}"
end
```

## 3. Try it yourself

<Card title="Ruby Example" icon="arrow-up-right-from-square" href="https://github.com/sendx/sendx-ruby-sdk">
  See detailed sdk example
</Card>
