Skip to main content

Documentation Index

Fetch the complete documentation index at: https://loops.so/docs/llms.txt

Use this file to discover all available pages before exploring further.

Installation

Install the package with go get:
go get github.com/loops-so/loops-go
You can install Loops skills to help your coding agents use the Loops CLI, API and SDKs to manage contacts, lists, events, and transactional email.
You will need a Loops API key to use the SDK. In your Loops account, go to the API Settings page and click Generate key. Copy this key and save it in your application code (for example as LOOPS_API_KEY in an environment variable).

Usage

package main

import (
	"log"

	loops "github.com/loops-so/loops-go"
)

func main() {
	client := loops.NewClient("YOUR_API_KEY")

	err := client.SendEvent(loops.SendEventRequest{
		Email:     "user@example.com",
		EventName: "signup",
		EventProperties: map[string]any{
			"plan": "pro",
		},
	})
	if err != nil {
		log.Fatal(err)
	}
}
API errors are returned as *loops.APIError with StatusCode and Message. See the SDK README on GitHub for error handling, retries, pagination, uploads, and the full method list. See the API documentation to learn more about rate limiting and error handling.

pkg.go.dev reference

Browse types, methods, and package documentation.

GitHub

View the source code and release notes.

Loops API

Read the Loops API reference.
Last modified on May 27, 2026