GET
/
domains
package main

import(
	"context"
	dubgo "github.com/dubinc/dub-go"
	"github.com/dubinc/dub-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := dubgo.New(
        dubgo.WithSecurity("DUB_API_KEY"),
    )

    res, err := s.Domains.List(ctx, operations.ListDomainsRequest{
        Archived: dubgo.Bool(true),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        for {
            // handle items

            res, err = res.Next()

            if err != nil {
                // handle error
            }

            if res == nil {
                break
            }
        }
    }
}
[
  {
    "id": "<string>",
    "slug": "acme.com",
    "verified": false,
    "primary": false,
    "archived": false,
    "placeholder": "https://dub.co/help/article/what-is-dub",
    "expiredUrl": "https://acme.com/expired",
    "notFoundUrl": "https://acme.com/not-found",
    "assetLinks": null,
    "appleAppSiteAssociation": null,
    "logo": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "registeredDomain": {
      "id": "<string>",
      "createdAt": "<string>",
      "expiresAt": "<string>"
    }
  }
]

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

archived
boolean
default:false

Whether to include archived domains in the response. Defaults to false if not provided.

The search term to filter the domains by.

page
number
default:1

The page number for pagination.

Required range: x > 0
Example:

1

pageSize
number
default:50

The number of items per page.

Required range: 0 < x <= 50
Example:

50

Response

200
application/json

The domains were retrieved.

The response is of type object[].