# 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).
keywords: >-
  hello world, curl example, Bearer token, GODADDY_PAT, 401 unauthorized,
  domains v3, first request.
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/get-store-by-id
---

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, using the Domains API and a Personal Access Token (PAT) sent as a Bearer token in the `Authorization` header. For other APIs that accept a PAT, only the endpoint and scope change.

Not every GoDaddy API accepts a PAT. Some require a Classic Developer Key instead. Go to [About Authentication](https://developer.godaddy.com/docs/api-users/auth) for the credential each API requires.

## 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 GoDaddy CLI](https://developer.godaddy.com/docs/api-users/cli/set-up), if you prefer CLI workflows

## Set the credential as an environment variable

Include the PAT 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="<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.
