Docs/Getting Started/Quickstart

Go

Use the Repull API from Go with standard net/http.

1

Prerequisites

Go 1.21+ installed on your machine.

You also need a Repull API key. Get one from your dashboard.

2

Install

go get github.com/repull-dev/go-sdk
3

Set up environment variables

Add your credentials to a .env file in your project root:

REPULL_API_KEY=sk_test_YOUR_KEY
REPULL_WORKSPACE_ID=YOUR_WORKSPACE_ID

Start with sk_test_ keys for sandbox data. Switch to sk_live_ when you are ready for production.

4

Make your first API call

Make authenticated HTTP requests to the Repull API. The example below fetches all properties.

package main

import (
    "fmt"
    "io"
    "net/http"
    "os"
)

func main() {
    client := &http.Client{}
    req, _ := http.NewRequest("GET", "https://api.repull.dev/v1/properties", nil)
    req.Header.Set("Authorization", "Bearer "+os.Getenv("REPULL_API_KEY"))

    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
AI