---
title: "Add a pet"
method: POST
path: "/v1/pets"
tags: ["Account"]
---

# Add a pet

`POST /v1/pets`

## Request

- Base URL: `https://api.nogpets.com`
- URL: `https://api.nogpets.com/v1/pets`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://api.nogpets.com/oauth/authorize`, token URL `https://api.nogpets.com/oauth/token`, scopes: `pets`)
  - HTTP bearer

## Request body

- NewPet
  - `name` string, required
  - `type` 'DOG' | 'CAT', required
  - `weightKg` number, required
  - `coat` 'SHORT' | 'MEDIUM' | 'LONG', required
  - `breed` string
  - `birthYear` integer
  - `notes` string

## Response `201`

The saved pet

- Pet
  - `id` string, required
  - `name` string, required
  - `type` 'DOG' | 'CAT', required
  - `breed` string
  - `weightKg` number, required
  - `coat` 'SHORT' | 'MEDIUM' | 'LONG', required
  - `birthYear` integer, nullable
  - `notes` string

## Other responses

- `400`: The input is wrong (`INVALID_ARGUMENT`, or a pricing code such as `ONE_PRIMARY`, `PET_TYPE`, `UNKNOWN_SERVICE`).
- `401`: No token, or it's expired or revoked. The `WWW-Authenticate` header points at the resource metadata.
- `403`: The token lacks a scope (`INSUFFICIENT_SCOPE`, with `details.scope`).

---

[API](https://skmtc.dev/nogpets/apis/nogpets-api.md) · [All operations](https://skmtc.dev/nogpets/apis/nogpets-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nogpets/apis/nogpets-api/revisions/a202c1012173?raw)
