Skip to content


Welcome to packngo, the Equinix Metalâ„¢ Go API Client. This library is used by the Terraform provider, and the Equinix Metal CLI.

For more information about our API endpoints, please visit our API Documentation.


packngo can be installed with go get.

go get


To authenticate to the Equinix Metal API, you must have your API token exported in environment variable PACKET_AUTH_TOKEN.

export PACKET_AUTH_TOKEN=<your_api_token>

Usage Example

This code snippet initializes Equinix Metal API client, and lists your Projects.

package main

import (


func main() {
    c, err := packngo.NewClient()
    if err != nil {

    ps, _, err := c.Projects.List(nil)
    if err != nil {
    for _, p := range ps {
        log.Println(p.ID, p.Name)

Routes and Methods

A complete list of the available routes and methods is in the packngo GitHub repository.