# Make your first call (https://developer.godaddy.com/en/docs/api-users/quickstart)

***

title: Make your first call
description: Make your first API call to the GoDaddy Domains API using a Personal Access Token (PAT).
agentNotes:
permissions: \["Any account"]
scopes: \["domains.domain:read", "commerce.store:read"]
idempotent: true
destructive: false
failureRecovery: "Read-only. Safe to retry any failure. On 401, verify the Bearer token has not expired or been revoked. On 429, wait for Retry-After."
related:
guides:

* title: "Search domain availability"
  href: "/docs/api-users/domains/search"
* title: "Register a domain"
  href: "/docs/api-users/domains/register"
* title: "Manage existing domains"
  href: "/docs/api-users/domains/manage"
  concepts:
* title: "Authentication"
  href: "/docs/api-users/auth"
* title: "Error handling"
  href: "/docs/api-users/errors"
  apis:
* title: "Domains v3 reference"
  href: "/docs/references/rest/domains/v3"
* title: "Commerce API reference"
  href: "/docs/references/rest/stores/store"

***

For full API coverage, provide the [Domains v3 OpenAPI spec](https://developer.godaddy.com/openapi/domains-v3.json) as additional context to your LLM or API client.

## Overview

This guide walks through making your first GoDaddy API call. All calls use a Bearer token in the `Authorization` header. Only the endpoint and scope change between APIs.

## Prerequisites

Before making any API call, you need:

* a GoDaddy account
* a Personal Access Token (PAT) with the appropriate scopes

  Go to [How to Authenticate](https://developer.godaddy.com/docs/api-users/auth/how-to) to create a PAT.
* a terminal with `curl` (macOS, Linux, or WSL)
* (*optional*) [the beta `gddy` CLI](https://developer.godaddy.com/docs/api-users/cli/set-up), if you prefer CLI workflows

## Set the credential as an environment variable

The PAT is passed as a Bearer token in the `Authorization` header on every request. Exporting it as an environment variable keeps it out of your shell history and lets you reference it directly in commands without retyping.

The following procedure exports your PAT so the samples below can reuse it.

* Export the credential:

  ```bash
  export GODADDY_PAT="<YOUR_GODADDY_PAT>"
  ```

## Common errors

| Error                             | Likely cause                                                               | Fix                                                                                                                                                                                    |
| --------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `401 Unauthorized`                | Token is missing, expired, or wasn't exported                              | Run `echo $GODADDY_PAT` — if blank, re-run the export. If the token was deleted or expired, generate a new one in the [developer dashboard](https://developer.godaddy.com/personal-access-token).                   |
| `403 Forbidden`                   | Token lacks the required scope for this API, or the account isn't eligible | Check the `code` field in the response body. Scope issues return `UNABLE_TO_AUTHENTICATE`; account issues return a different code. Regenerate the PAT with the correct scope selected. |
| `429 Too Many Requests`           | Rate limit exceeded                                                        | Wait for the number of seconds in the `Retry-After` header before retrying. Go to [Rate limits](https://developer.godaddy.com/docs/api-users/rate-limits) for current values and retry guidance.                    |
| Response is `null` or `undefined` | The JSON response wasn't awaited or parsed                                 | Ensure you `await res.json()` in Node, or `res.json()` in Python.                                                                                                                      |
| `Could not resolve host`          | Wrong base URL                                                             | The API base is `https://api.godaddy.com`. There is no local dev server — all requests go to production.                                                                               |

Go to [Handle errors](https://developer.godaddy.com/docs/api-users/errors) for the full error envelope reference, status code semantics, and retry guidance.
