import { PetStoreAPI } from '@petstoreapi/sdk';
const client = new PetStoreAPI({
accessToken: process.env.OAUTH_ACCESS_TOKEN
});
const newPet = await client.pets.create({
species: 'dog',
name: 'Buddy',
breed: 'Golden Retriever',
ageMonths: 24,
size: 'large',
color: 'Golden',
gender: 'male',
goodWithKids: true,
price: '150.00',
description: 'Friendly golden retriever looking for an active family'
});
console.log(`Created pet with ID: ${newPet.id}`);
from petstore import PetStoreAPI
client = PetStoreAPI(access_token=os.environ['OAUTH_ACCESS_TOKEN'])
new_pet = client.pets.create(
species='dog',
name='Buddy',
breed='Golden Retriever',
ageMonths=24,
size='large',
color='Golden',
gender='male',
goodWithKids=True,
price='150.00',
description='Friendly golden retriever looking for an active family'
)
print(f"Created pet with ID: {new_pet.id}")
const response = await fetch(
'https://api.petstoreapi.com/v1/pets',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
species: 'dog',
name: 'Buddy',
breed: 'Golden Retriever',
ageMonths: 24,
size: 'large',
color: 'Golden',
gender: 'male',
goodWithKids: true,
price: '150.00',
description: 'Friendly golden retriever looking for an active family'
})
}
);
const newPet = await response.json();
console.log(`Created pet with ID: ${newPet.id}`);
curl -X POST 'https://api.petstoreapi.com/v1/pets' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"species": "dog",
"name": "Buddy",
"breed": "Golden Retriever",
"ageMonths": 24,
"size": "large",
"color": "Golden",
"gender": "male",
"goodWithKids": true,
"price": "150.00",
"description": "Friendly golden retriever looking for an active family"
}'
{
"type": "https://petstoreapi.com/errors/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Invalid value for parameter 'status'. Must be one of: available, pending, sold.",
"instance": "/pets"
}
{
"type": "https://petstoreapi.com/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authentication is required to access this resource. Please provide a valid OAuth 2.0 token."
}
{
"type": "https://petstoreapi.com/errors/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The request body contains validation errors.",
"instance": "/pets",
"errors": [
{
"field": "name",
"message": "Pet name is required",
"code": "required_field"
},
{
"field": "status",
"message": "Invalid status value",
"code": "invalid_format"
}
]
}
{
"type": "https://petstoreapi.com/errors/rate-limit-exceeded",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded. Please wait 60 seconds before making another request."
}
Pet
Create Pet
Add a new pet to the store catalog, making it available for adoption.
Pet Lifecycle Workflow
When a new pet enters the system:
Intake: Staff creates a pet record with this endpoint (status: available)
Profile: Pet details include species, breed, age, medical info, photos, and adoption fee
Discovery: Pet appears in search results and listings
Adoption Application: Potential adopters can apply through the adoption endpoints
Adoption: Once approved, pet status changes to adopted
Post-Adoption: Pet record is retained for historical purposes
Access: This operation requires staff permissions (write:pets scope or valid Bearer token). Only authenticated staff members can add pets to the system.
POST
/
pets
TypeScript SDK
import { PetStoreAPI } from '@petstoreapi/sdk';
const client = new PetStoreAPI({
accessToken: process.env.OAUTH_ACCESS_TOKEN
});
const newPet = await client.pets.create({
species: 'dog',
name: 'Buddy',
breed: 'Golden Retriever',
ageMonths: 24,
size: 'large',
color: 'Golden',
gender: 'male',
goodWithKids: true,
price: '150.00',
description: 'Friendly golden retriever looking for an active family'
});
console.log(`Created pet with ID: ${newPet.id}`);
from petstore import PetStoreAPI
client = PetStoreAPI(access_token=os.environ['OAUTH_ACCESS_TOKEN'])
new_pet = client.pets.create(
species='dog',
name='Buddy',
breed='Golden Retriever',
ageMonths=24,
size='large',
color='Golden',
gender='male',
goodWithKids=True,
price='150.00',
description='Friendly golden retriever looking for an active family'
)
print(f"Created pet with ID: {new_pet.id}")
const response = await fetch(
'https://api.petstoreapi.com/v1/pets',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
species: 'dog',
name: 'Buddy',
breed: 'Golden Retriever',
ageMonths: 24,
size: 'large',
color: 'Golden',
gender: 'male',
goodWithKids: true,
price: '150.00',
description: 'Friendly golden retriever looking for an active family'
})
}
);
const newPet = await response.json();
console.log(`Created pet with ID: ${newPet.id}`);
curl -X POST 'https://api.petstoreapi.com/v1/pets' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"species": "dog",
"name": "Buddy",
"breed": "Golden Retriever",
"ageMonths": 24,
"size": "large",
"color": "Golden",
"gender": "male",
"goodWithKids": true,
"price": "150.00",
"description": "Friendly golden retriever looking for an active family"
}'
{
"type": "https://petstoreapi.com/errors/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Invalid value for parameter 'status'. Must be one of: available, pending, sold.",
"instance": "/pets"
}
{
"type": "https://petstoreapi.com/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Authentication is required to access this resource. Please provide a valid OAuth 2.0 token."
}
{
"type": "https://petstoreapi.com/errors/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The request body contains validation errors.",
"instance": "/pets",
"errors": [
{
"field": "name",
"message": "Pet name is required",
"code": "required_field"
},
{
"field": "status",
"message": "Invalid status value",
"code": "invalid_format"
}
]
}
{
"type": "https://petstoreapi.com/errors/rate-limit-exceeded",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded. Please wait 60 seconds before making another request."
}
Optional tenant identifier for data isolation. When provided, all operations will be scoped to this tenant, ensuring data separation between different organizations or users. If omitted, operations will access the shared/public data pool where data may be visible to and modified by other users.
Body
application/json
Animal information in the pet store available for adoption.
Optional tenant identifier for data isolation. When present, indicates this pet belongs to a specific tenant. Null or omitted means the pet is in the shared/public data pool.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Modern PetstoreAPI Docs","colors":{"primary":"#9333EA","light":"#C084FC","dark":"#7C3AED"},"logo":{"light":"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png","dark":"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png"},"favicon":"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png","navbar":{"links":[{"label":"Support","href":"mailto:hi@mintlify.com"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.mintlify.com"}},"footer":{"socials":{"x":"https://x.com/mintlify","github":"https://github.com/mintlify","linkedin":"https://linkedin.com/company/mintlify"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"]},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"book-open-cover","href":"https://petstoreapi.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"anakinlabs","hasAudioNarration":false,"actualSubdomain":"anakinlabs","customDomains":["docs2.petstoreapi.com"],"gitSource":{"type":"github","owner":"petstoreapi","repo":"petstoreapi-docs-mintilify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9456100312e79e6151590:success","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"Modern PetstoreAPI","count":19},{"language":"default","tag":"Classic PetstoreAPI","count":19},{"language":"default","tag":"Guides","count":15},{"language":"default","tag":"Protocol Guides","count":12},{"language":"default","tag":"pet","count":8},{"language":"default","tag":"user","count":7},{"language":"default","tag":"Pet","count":6},{"language":"default","tag":"Store","count":5},{"language":"default","tag":"store","count":4},{"language":"default","tag":"User","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/pet/create-pet","slug":"/api-reference/pet/create-pet","pageMetadata":{"title":"Create Pet","description":"Add a new pet to the store catalog, making it available for adoption.\n\n## Pet Lifecycle Workflow\n\nWhen a new pet enters the system:\n\n1. **Intake**: Staff creates a pet record with this endpoint (status: `available`)\n2. **Profile**: Pet details include species, breed, age, medical info, photos, and adoption fee\n3. **Discovery**: Pet appears in search results and listings\n4. **Adoption Application**: Potential adopters can apply through the adoption endpoints\n5. **Adoption**: Once approved, pet status changes to `adopted`\n6. **Post-Adoption**: Pet record is retained for historical purposes\n\n**Access**: This operation requires staff permissions (`write:pets` scope or valid Bearer token). Only authenticated staff members can add pets to the system.","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /pets","href":"/api-reference/pet/create-pet","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n h2: \"h2\",\n li: \"li\",\n ol: \"ol\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Add a new pet to the store catalog, making it available for adoption.\"\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Pet Lifecycle Workflow\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"When a new pet enters the system:\"\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Intake\"\n }), \": Staff creates a pet record with this endpoint (status: \", _jsx(_components.code, {\n children: \"available\"\n }), \")\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Profile\"\n }), \": Pet details include species, breed, age, medical info, photos, and adoption fee\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Discovery\"\n }), \": Pet appears in search results and listings\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Adoption Application\"\n }), \": Potential adopters can apply through the adoption endpoints\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Adoption\"\n }), \": Once approved, pet status changes to \", _jsx(_components.code, {\n children: \"adopted\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Post-Adoption\"\n }), \": Pet record is retained for historical purposes\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Access\"\n }), \": This operation requires staff permissions (\", _jsx(_components.code, {\n children: \"write:pets\"\n }), \" scope or valid Bearer token). Only authenticated staff members can add pets to the system.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Pet","description":"Add a new pet to the store catalog, making it available for adoption.\n\n## Pet Lifecycle Workflow\n\nWhen a new pet enters the system:\n\n1. **Intake**: Staff creates a pet record with this endpoint (status: `available`)\n2. **Profile**: Pet details include species, breed, age, medical info, photos, and adoption fee\n3. **Discovery**: Pet appears in search results and listings\n4. **Adoption Application**: Potential adopters can apply through the adoption endpoints\n5. **Adoption**: Once approved, pet status changes to `adopted`\n6. **Post-Adoption**: Pet record is retained for historical purposes\n\n**Access**: This operation requires staff permissions (`write:pets` scope or valid Bearer token). Only authenticated staff members can add pets to the system.","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /pets","href":"/api-reference/pet/create-pet","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create Pet","deprecated":false,"description":"Add a new pet to the store catalog, making it available for adoption.\n\n## Pet Lifecycle Workflow\n\nWhen a new pet enters the system:\n\n1. **Intake**: Staff creates a pet record with this endpoint (status: `available`)\n2. **Profile**: Pet details include species, breed, age, medical info, photos, and adoption fee\n3. **Discovery**: Pet appears in search results and listings\n4. **Adoption Application**: Potential adopters can apply through the adoption endpoints\n5. **Adoption**: Once approved, pet status changes to `adopted`\n6. **Post-Adoption**: Pet record is retained for historical purposes\n\n**Access**: This operation requires staff permissions (`write:pets` scope or valid Bearer token). Only authenticated staff members can add pets to the system.","operationId":"createPet","tags":["Pet"],"security":["f9dd6912-f63b-41ad-adb7-4609718e2ac8","6d02e73a-b15d-49a4-a54b-1cbe2fa5245d"],"requestBody":"83571dd7-d33a-4b14-84f3-365ff9f8893a","x-codeSamples":[{"lang":"TypeScript","label":"TypeScript SDK","source":"import { PetStoreAPI } from '@petstoreapi/sdk';\n\nconst client = new PetStoreAPI({\n accessToken: process.env.OAUTH_ACCESS_TOKEN\n});\n\nconst newPet = await client.pets.create({\n species: 'dog',\n name: 'Buddy',\n breed: 'Golden Retriever',\n ageMonths: 24,\n size: 'large',\n color: 'Golden',\n gender: 'male',\n goodWithKids: true,\n\n price: '150.00',\n description: 'Friendly golden retriever looking for an active family'\n});\n\nconsole.log(`Created pet with ID: ${newPet.id}`);"},{"lang":"Python","label":"Python","source":"from petstore import PetStoreAPI\n\nclient = PetStoreAPI(access_token=os.environ['OAUTH_ACCESS_TOKEN'])\n\nnew_pet = client.pets.create(\n species='dog',\n name='Buddy',\n breed='Golden Retriever',\n ageMonths=24,\n size='large',\n color='Golden',\n gender='male',\n goodWithKids=True,\n\n price='150.00',\n description='Friendly golden retriever looking for an active family'\n)\n\nprint(f\"Created pet with ID: {new_pet.id}\")"},{"lang":"JavaScript","label":"JavaScript (Fetch)","source":"const response = await fetch(\n 'https://api.petstoreapi.com/v1/pets',\n {\n method: 'POST',\n headers: {\n 'Authorization': `Bearer ${accessToken}`,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n species: 'dog',\n name: 'Buddy',\n breed: 'Golden Retriever',\n ageMonths: 24,\n size: 'large',\n color: 'Golden',\n gender: 'male',\n goodWithKids: true,\n\n price: '150.00',\n description: 'Friendly golden retriever looking for an active family'\n })\n }\n);\n\nconst newPet = await response.json();\nconsole.log(`Created pet with ID: ${newPet.id}`);"},{"lang":"Shell","label":"cURL","source":"curl -X POST 'https://api.petstoreapi.com/v1/pets' \\\n -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"species\": \"dog\",\n \"name\": \"Buddy\",\n \"breed\": \"Golden Retriever\",\n \"ageMonths\": 24,\n \"size\": \"large\",\n \"color\": \"Golden\",\n \"gender\": \"male\",\n \"goodWithKids\": true,\n\n \"price\": \"150.00\",\n \"description\": \"Friendly golden retriever looking for an active family\"\n }'"}],"responses":{"201":"f39a29df-af4a-4382-b6d8-2805626c8618","400":"e545ad5c-6ec9-4b28-a3b7-59ba13d3f283","401":"8ac570a7-836b-430d-a5cc-d6ef1a91d52b","422":"0a474419-16e1-46c6-953c-717582fcb7e0","429":"fc787f94-f126-40e0-b804-85ea660d507b"},"method":"post","type":"path","servers":["24cc1bfc-2570-42c6-9ff0-a085d7467e2a"],"path":"/pets","baseUrlOptions":["https://api.petstoreapi.com/v1"],"title":"Create Pet","codeSamples":[{"label":"TypeScript SDK","lang":"TypeScript","source":"import { PetStoreAPI } from '@petstoreapi/sdk';\n\nconst client = new PetStoreAPI({\n accessToken: process.env.OAUTH_ACCESS_TOKEN\n});\n\nconst newPet = await client.pets.create({\n species: 'dog',\n name: 'Buddy',\n breed: 'Golden Retriever',\n ageMonths: 24,\n size: 'large',\n color: 'Golden',\n gender: 'male',\n goodWithKids: true,\n\n price: '150.00',\n description: 'Friendly golden retriever looking for an active family'\n});\n\nconsole.log(`Created pet with ID: ${newPet.id}`);"},{"label":"Python","lang":"Python","source":"from petstore import PetStoreAPI\n\nclient = PetStoreAPI(access_token=os.environ['OAUTH_ACCESS_TOKEN'])\n\nnew_pet = client.pets.create(\n species='dog',\n name='Buddy',\n breed='Golden Retriever',\n ageMonths=24,\n size='large',\n color='Golden',\n gender='male',\n goodWithKids=True,\n\n price='150.00',\n description='Friendly golden retriever looking for an active family'\n)\n\nprint(f\"Created pet with ID: {new_pet.id}\")"},{"label":"JavaScript (Fetch)","lang":"JavaScript","source":"const response = await fetch(\n 'https://api.petstoreapi.com/v1/pets',\n {\n method: 'POST',\n headers: {\n 'Authorization': `Bearer ${accessToken}`,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n species: 'dog',\n name: 'Buddy',\n breed: 'Golden Retriever',\n ageMonths: 24,\n size: 'large',\n color: 'Golden',\n gender: 'male',\n goodWithKids: true,\n\n price: '150.00',\n description: 'Friendly golden retriever looking for an active family'\n })\n }\n);\n\nconst newPet = await response.json();\nconsole.log(`Created pet with ID: ${newPet.id}`);"},{"label":"cURL","lang":"Shell","source":"curl -X POST 'https://api.petstoreapi.com/v1/pets' \\\n -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"species\": \"dog\",\n \"name\": \"Buddy\",\n \"breed\": \"Golden Retriever\",\n \"ageMonths\": 24,\n \"size\": \"large\",\n \"color\": \"Golden\",\n \"gender\": \"male\",\n \"goodWithKids\": true,\n\n \"price\": \"150.00\",\n \"description\": \"Friendly golden retriever looking for an active family\"\n }'"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"ef3d4031-94a6-4b45-b841-6e9efd72671e":{"name":"X-Tenant-ID","in":"header","description":"Optional tenant identifier for data isolation. When provided, all operations will be scoped to this tenant, ensuring data separation between different organizations or users. If omitted, operations will access the shared/public data pool where data may be visible to and modified by other users.","required":false,"schema":{"type":"string","format":"uuid","isRequired":false,"description":"Optional tenant identifier for data isolation. When provided, all operations will be scoped to this tenant, ensuring data separation between different organizations or users. If omitted, operations will access the shared/public data pool where data may be visible to and modified by other users.","uniqueKey":"","typeLabel":"string\u003cuuid>"},"examples":{"organization":{"value":"550e8400-e29b-41d4-a716-446655440000","summary":"Organization tenant ID"},"development":{"value":"7c9e6679-7425-40de-944b-e07fc1f90ae7","summary":"Development environment"},"production":{"value":"9b5e4f89-3c12-4a5e-9f8e-2d3c5a7e6b1a","summary":"Production environment"}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Animal information in the pet store available for adoption.","required":["id","name","species","ageMonths","price","currency","status","createdAt","updatedAt"],"properties":{"species":{"type":"string","enum":["DOG","CAT","RABBIT","BIRD","REPTILE","OTHER"],"description":"The species of the pet","isRequired":true,"uniqueKey":"species","typeLabel":"enum\u003cstring>"},"name":{"type":"string","minLength":1,"maxLength":50,"description":"The pet's name","examples":["Whiskers","Max","Luna"],"isRequired":true,"uniqueKey":"name","typeLabel":"string"},"ageMonths":{"type":"integer","minimum":0,"description":"Age of the pet in months","examples":[18,36,6],"isRequired":true,"uniqueKey":"ageMonths","typeLabel":"integer"},"price":{"type":"string","description":"Adoption fee amount","examples":["75.00","150.00","50.00"],"isRequired":true,"uniqueKey":"price","typeLabel":"string"},"currency":{"type":"string","description":"Currency code for the adoption fee (ISO 4217)","default":"USD","pattern":"^[A-Z]{3}$","examples":["USD","EUR","GBP"],"isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"status":{"type":"string","enum":["AVAILABLE","PENDING","ADOPTED","NOT_AVAILABLE"],"description":"Current adoption status","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"breed":{"type":"string","description":"The breed of the pet","examples":["Domestic Shorthair","Labrador Retriever","Holland Lop"],"uniqueKey":"breed","typeLabel":"string"},"size":{"type":"string","enum":["SMALL","MEDIUM","LARGE"],"description":"Size category of the pet","uniqueKey":"size","typeLabel":"enum\u003cstring>"},"color":{"type":"string","description":"Primary color or coloring pattern","examples":["Orange Tabby","Black","Brown and White"],"uniqueKey":"color","typeLabel":"string"},"gender":{"type":"string","enum":["MALE","FEMALE","UNKNOWN"],"description":"The pet's gender","uniqueKey":"gender","typeLabel":"enum\u003cstring>"},"goodWithKids":{"type":"boolean","description":"Whether the pet is good with children","uniqueKey":"goodWithKids","typeLabel":"boolean"},"description":{"type":"string","description":"Detailed description of the pet's personality and traits","uniqueKey":"description","typeLabel":"string"},"photos":{"type":"array","items":{"type":"string","format":"uri","uniqueKey":"photos.items.[INDEX]","typeLabel":"string\u003curi>"},"description":"URLs of pet photos","minItems":0,"uniqueKey":"photos","typeLabel":"string\u003curi>[]"},"medicalInfo":{"type":"object","properties":{"spayedNeutered":{"type":"boolean","description":"Whether the pet has been spayed or neutered","uniqueKey":"medicalInfo.spayedNeutered","typeLabel":"boolean"},"vaccinated":{"type":"boolean","description":"Whether the pet is up to date on vaccinations","uniqueKey":"medicalInfo.vaccinated","typeLabel":"boolean"},"microchipped":{"type":"boolean","description":"Whether the pet has a microchip","uniqueKey":"medicalInfo.microchipped","typeLabel":"boolean"},"specialNeeds":{"type":"boolean","description":"Whether the pet has special medical needs","uniqueKey":"medicalInfo.specialNeeds","typeLabel":"boolean"},"healthNotes":{"type":"string","description":"Additional medical notes","uniqueKey":"medicalInfo.healthNotes","typeLabel":"string"}},"unevaluatedProperties":false,"uniqueKey":"medicalInfo","typeLabel":"object"}},"unevaluatedProperties":false,"uniqueKey":"","typeLabel":"object"},"example":{"name":"Max","species":"DOG","breed":"Golden Retriever","ageMonths":24,"size":"LARGE","color":"Golden","gender":"MALE","goodWithKids":true,"price":"250.00","currency":"USD","status":"AVAILABLE","description":"Friendly golden retriever looking for an active family","medicalInfo":{"vaccinated":true,"spayedNeutered":true,"microchipped":true,"specialNeeds":false,"healthNotes":"Up to date on all vaccinations"}},"examples":{"Example":{"title":"Example","value":{"name":"Max","species":"DOG","breed":"Golden Retriever","ageMonths":24,"size":"LARGE","color":"Golden","gender":"MALE","goodWithKids":true,"price":"250.00","currency":"USD","status":"AVAILABLE","description":"Friendly golden retriever looking for an active family","medicalInfo":{"vaccinated":true,"spayedNeutered":true,"microchipped":true,"specialNeeds":false,"healthNotes":"Up to date on all vaccinations"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"f39a29df-af4a-4382-b6d8-2805626c8618":{"description":"Pet created successfully","headers":{"RateLimit-Limit":{"description":"The maximum number of requests allowed in the current time window","schema":{"type":"integer"},"example":100},"RateLimit-Remaining":{"description":"The number of requests remaining in the current time window","schema":{"type":"integer"},"example":95},"RateLimit-Reset":{"description":"The time at which the current rate limit window resets (Unix timestamp)","schema":{"type":"integer"},"example":1702648800}},"content":{"application/json":{"schema":{"type":"object","description":"Animal information in the pet store available for adoption.","required":["id","name","species","ageMonths","price","currency","status","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the pet (UUID v7)","examples":["019b4132-70aa-764f-b315-e2803d882a24","019b4127-54d5-76d9-b626-0d4c7bfce5b6"],"isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"species":{"type":"string","enum":["DOG","CAT","RABBIT","BIRD","REPTILE","OTHER"],"description":"The species of the pet","isRequired":true,"uniqueKey":"species","typeLabel":"enum\u003cstring>"},"name":{"type":"string","minLength":1,"maxLength":50,"description":"The pet's name","examples":["Whiskers","Max","Luna"],"isRequired":true,"uniqueKey":"name","typeLabel":"string"},"ageMonths":{"type":"integer","minimum":0,"description":"Age of the pet in months","examples":[18,36,6],"isRequired":true,"uniqueKey":"ageMonths","typeLabel":"integer"},"price":{"type":"string","description":"Adoption fee amount","examples":["75.00","150.00","50.00"],"isRequired":true,"uniqueKey":"price","typeLabel":"string"},"currency":{"type":"string","description":"Currency code for the adoption fee (ISO 4217)","default":"USD","pattern":"^[A-Z]{3}$","examples":["USD","EUR","GBP"],"isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"status":{"type":"string","enum":["AVAILABLE","PENDING","ADOPTED","NOT_AVAILABLE"],"description":"Current adoption status","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the pet record was created (RFC 3339)","examples":["2025-12-21T13:56:23Z","2025-11-15T08:30:00Z"],"isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the pet record was last updated (RFC 3339)","examples":["2025-12-21T13:56:23Z","2025-12-21T15:30:45Z"],"isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"},"breed":{"type":"string","description":"The breed of the pet","examples":["Domestic Shorthair","Labrador Retriever","Holland Lop"],"uniqueKey":"breed","typeLabel":"string"},"size":{"type":"string","enum":["SMALL","MEDIUM","LARGE"],"description":"Size category of the pet","uniqueKey":"size","typeLabel":"enum\u003cstring>"},"color":{"type":"string","description":"Primary color or coloring pattern","examples":["Orange Tabby","Black","Brown and White"],"uniqueKey":"color","typeLabel":"string"},"gender":{"type":"string","enum":["MALE","FEMALE","UNKNOWN"],"description":"The pet's gender","uniqueKey":"gender","typeLabel":"enum\u003cstring>"},"goodWithKids":{"type":"boolean","description":"Whether the pet is good with children","uniqueKey":"goodWithKids","typeLabel":"boolean"},"description":{"type":"string","description":"Detailed description of the pet's personality and traits","uniqueKey":"description","typeLabel":"string"},"tenantId":{"oneOf":[{"type":"string","format":"uuid","readOnly":true,"description":"Optional tenant identifier for data isolation. When present, indicates this pet belongs to a specific tenant. Null or omitted means the pet is in the shared/public data pool.","examples":["550e8400-e29b-41d4-a716-446655440000","7c9e6679-7425-40de-944b-e07fc1f90ae7"],"uniqueKey":"tenantId.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","readOnly":true,"description":"Optional tenant identifier for data isolation. When present, indicates this pet belongs to a specific tenant. Null or omitted means the pet is in the shared/public data pool.","examples":["550e8400-e29b-41d4-a716-446655440000","7c9e6679-7425-40de-944b-e07fc1f90ae7"],"uniqueKey":"tenantId.oneOf.1","typeLabel":"null"}],"uniqueKey":"tenantId","typeLabel":"string\u003cuuid> | null"},"photos":{"type":"array","items":{"type":"string","format":"uri","uniqueKey":"photos.items.[INDEX]","typeLabel":"string\u003curi>"},"description":"URLs of pet photos","minItems":0,"uniqueKey":"photos","typeLabel":"string\u003curi>[]"},"medicalInfo":{"type":"object","properties":{"spayedNeutered":{"type":"boolean","description":"Whether the pet has been spayed or neutered","uniqueKey":"medicalInfo.spayedNeutered","typeLabel":"boolean"},"vaccinated":{"type":"boolean","description":"Whether the pet is up to date on vaccinations","uniqueKey":"medicalInfo.vaccinated","typeLabel":"boolean"},"microchipped":{"type":"boolean","description":"Whether the pet has a microchip","uniqueKey":"medicalInfo.microchipped","typeLabel":"boolean"},"specialNeeds":{"type":"boolean","description":"Whether the pet has special medical needs","uniqueKey":"medicalInfo.specialNeeds","typeLabel":"boolean"},"healthNotes":{"type":"string","description":"Additional medical notes","uniqueKey":"medicalInfo.healthNotes","typeLabel":"string"}},"unevaluatedProperties":false,"uniqueKey":"medicalInfo","typeLabel":"object"}},"unevaluatedProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"019b4132-70aa-764f-b315-e2803d882a24","species":"DOG","name":"Whiskers","ageMonths":18,"price":"75.00","currency":"USD","status":"AVAILABLE","createdAt":"2025-12-21T13:56:23Z","updatedAt":"2025-12-21T13:56:23Z","breed":"Domestic Shorthair","size":"SMALL","color":"Orange Tabby","gender":"MALE","goodWithKids":true,"description":"\u003cstring>","tenantId":"550e8400-e29b-41d4-a716-446655440000","photos":["\u003cstring>"],"medicalInfo":{"spayedNeutered":true,"vaccinated":true,"microchipped":true,"specialNeeds":true,"healthNotes":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"e545ad5c-6ec9-4b28-a3b7-59ba13d3f283":{"description":"Bad request - Invalid parameters","headers":{"RateLimit-Limit":{"description":"The maximum number of requests allowed in the current time window","schema":{"type":"integer"},"example":100},"RateLimit-Remaining":{"description":"The number of requests remaining in the current time window","schema":{"type":"integer"},"example":95},"RateLimit-Reset":{"description":"The time at which the current rate limit window resets (Unix timestamp)","schema":{"type":"integer"},"example":1702648800}},"content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details for HTTP APIs","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","description":"A URI reference that identifies the problem type","examples":["https://petstoreapi.com/errors/not-found","https://petstoreapi.com/errors/validation-error"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"A short, human-readable summary of the problem","examples":["Resource Not Found","Validation Error"],"isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code","examples":[404,400,422],"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence","examples":["The requested pet with ID '123' was not found"],"uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","format":"uri","description":"A URI reference that identifies the specific occurrence","examples":["/v1/pets/123"],"uniqueKey":"instance","typeLabel":"string\u003curi>"},"errors":{"type":"array","description":"Detailed validation errors (for 422 responses)","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string","description":"The field that failed validation","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","description":"Description of the validation error","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code","uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"}},"unevaluatedProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"unevaluatedProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"invalid-parameter":{"title":"invalid-parameter","value":{"type":"https://petstoreapi.com/errors/bad-request","title":"Bad Request","status":400,"detail":"Invalid value for parameter 'status'. Must be one of: available, pending, sold.","instance":"/pets"}}},"exampleType":"examples"}},"exampleType":"examples"},"8ac570a7-836b-430d-a5cc-d6ef1a91d52b":{"description":"Unauthorized - Authentication required","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details for HTTP APIs","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","description":"A URI reference that identifies the problem type","examples":["https://petstoreapi.com/errors/not-found","https://petstoreapi.com/errors/validation-error"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"A short, human-readable summary of the problem","examples":["Resource Not Found","Validation Error"],"isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code","examples":[404,400,422],"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence","examples":["The requested pet with ID '123' was not found"],"uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","format":"uri","description":"A URI reference that identifies the specific occurrence","examples":["/v1/pets/123"],"uniqueKey":"instance","typeLabel":"string\u003curi>"},"errors":{"type":"array","description":"Detailed validation errors (for 422 responses)","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string","description":"The field that failed validation","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","description":"Description of the validation error","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code","uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"}},"unevaluatedProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"unevaluatedProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"missing-token":{"title":"missing-token","value":{"type":"https://petstoreapi.com/errors/unauthorized","title":"Unauthorized","status":401,"detail":"Authentication is required to access this resource. Please provide a valid OAuth 2.0 token."}}},"exampleType":"examples"}},"exampleType":"examples"},"0a474419-16e1-46c6-953c-717582fcb7e0":{"description":"Unprocessable entity - Validation errors","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details for HTTP APIs","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","description":"A URI reference that identifies the problem type","examples":["https://petstoreapi.com/errors/not-found","https://petstoreapi.com/errors/validation-error"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"A short, human-readable summary of the problem","examples":["Resource Not Found","Validation Error"],"isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code","examples":[404,400,422],"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence","examples":["The requested pet with ID '123' was not found"],"uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","format":"uri","description":"A URI reference that identifies the specific occurrence","examples":["/v1/pets/123"],"uniqueKey":"instance","typeLabel":"string\u003curi>"},"errors":{"type":"array","description":"Detailed validation errors (for 422 responses)","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string","description":"The field that failed validation","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","description":"Description of the validation error","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code","uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"}},"unevaluatedProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"unevaluatedProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"validation-errors":{"title":"validation-errors","value":{"type":"https://petstoreapi.com/errors/validation-error","title":"Validation Error","status":422,"detail":"The request body contains validation errors.","instance":"/pets","errors":[{"field":"name","message":"Pet name is required","code":"required_field"},{"field":"status","message":"Invalid status value","code":"invalid_format"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"fc787f94-f126-40e0-b804-85ea660d507b":{"description":"Too many requests - Rate limit exceeded","headers":{"RateLimit-Limit":{"description":"The maximum number of requests allowed in the current time window","schema":{"type":"integer"},"example":100},"RateLimit-Remaining":{"schema":{"type":"integer"},"example":0},"RateLimit-Reset":{"description":"The time at which the current rate limit window resets (Unix timestamp)","schema":{"type":"integer"},"example":1702648800},"Retry-After":{"description":"Number of seconds to wait before retrying","schema":{"type":"integer"},"example":60}},"content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 Problem Details for HTTP APIs","required":["type","title","status"],"properties":{"type":{"type":"string","format":"uri","description":"A URI reference that identifies the problem type","examples":["https://petstoreapi.com/errors/not-found","https://petstoreapi.com/errors/validation-error"],"isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","description":"A short, human-readable summary of the problem","examples":["Resource Not Found","Validation Error"],"isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"The HTTP status code","examples":[404,400,422],"isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence","examples":["The requested pet with ID '123' was not found"],"uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","format":"uri","description":"A URI reference that identifies the specific occurrence","examples":["/v1/pets/123"],"uniqueKey":"instance","typeLabel":"string\u003curi>"},"errors":{"type":"array","description":"Detailed validation errors (for 422 responses)","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string","description":"The field that failed validation","isRequired":true,"uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","description":"Description of the validation error","isRequired":true,"uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"Machine-readable error code","uniqueKey":"errors.items.[INDEX].code","typeLabel":"string"}},"unevaluatedProperties":false,"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"unevaluatedProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"rate-limit-exceeded":{"title":"rate-limit-exceeded","value":{"type":"https://petstoreapi.com/errors/rate-limit-exceeded","title":"Too Many Requests","status":429,"detail":"Rate limit exceeded. Please wait 60 seconds before making another request."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"f9dd6912-f63b-41ad-adb7-4609718e2ac8":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication using JWT (JSON Web Token). Include the token in the Authorization header as: `Authorization: Bearer \u003ctoken>`","scopes":[]}},"6d02e73a-b15d-49a4-a54b-1cbe2fa5245d":{"oauth2":{"type":"oauth2","description":"OAuth 2.0 authorization with multiple flows including device authorization for IoT devices and smart TVs","flows":{"authorizationCode":{"authorizationUrl":"https://auth.petstoreapi.com/authorize","tokenUrl":"https://auth.petstoreapi.com/token","refreshUrl":"https://auth.petstoreapi.com/refresh","scopes":{"read:pets":"Read pet information","write:pets":"Create and update pets","read:orders":"Read order information","write:orders":"Create and manage orders","read:user":"Read user profile","write:user":"Update user profile","chat:write":"Access AI chat completions"}}},"scopes":["write:pets"]}}},"servers":{"24cc1bfc-2570-42c6-9ff0-a085d7467e2a":{"url":"https://api.petstoreapi.com/v1","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication using JWT (JSON Web Token). Include the token in the Authorization header as: `Authorization: Bearer \u003ctoken>`","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer token authentication using JWT (JSON Web Token). Include the token in the Authorization header as: `Authorization: Bearer \u003ctoken>`","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"},{"schemes":[{"scheme":{"type":"oauth2","description":"OAuth 2.0 authorization with multiple flows including device authorization for IoT devices and smart TVs","flows":{"authorizationCode":{"authorizationUrl":"https://auth.petstoreapi.com/authorize","tokenUrl":"https://auth.petstoreapi.com/token","refreshUrl":"https://auth.petstoreapi.com/refresh","scopes":{"read:pets":"Read pet information","write:pets":"Create and update pets","read:orders":"Read order information","write:orders":"Create and manage orders","read:user":"Read user profile","write:user":"Update user profile","chat:write":"Access AI chat completions"}}},"scopes":["write:pets"]},"schema":{"title":"OAuth2 Auth","type":"string","isRequired":true,"description":"OAuth 2.0 authorization with multiple flows including device authorization for IoT devices and smart TVs","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"oauth2","name":"Authorization"}],"title":"oauth2"}]},"originalFileLocation":"api-reference/modern-petstore-3.1.openapi.json"},"subdomain":"anakinlabs","siteName":"Modern PetstoreAPI Docs","title":"Create Pet - Modern PetstoreAPI Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T09:42:09.666Z","originalFileLocation":"api-reference/pet/create-pet.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Add a new pet to the store catalog, making it available for adoption. ## Pet Lifecycle Workflow When a new pet enters the system: 1. Intake: Staff creates a pet record with this endpoint (status: available) 2. Profile: Pet details include species, breed, age, medical info, photos, and adoption fee 3. Discovery: Pet appears in search results and listings 4. Adoption Application: Potential adopters can apply through the adoption endpoints 5. Adoption: Once approved, pet status changes to adopted 6. Post-Adoption: Pet record is retained for historical purposes Access: This operation requires staff permissions (write:pets scope or valid Bearer token). Only authenticated staff members can add pets to the system.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Modern PetstoreAPI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/png\" href=\"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Pet - Modern PetstoreAPI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add a new pet to the store catalog, making it available for adoption. ## Pet Lifecycle Workflow When a new pet enters the system: 1. Intake: Staff creates a pet record with this endpoint (status: available) 2. Profile: Pet details include species, breed, age, medical info, photos, and adoption fee 3. Discovery: Pet appears in search results and listings 4. Adoption Application: Potential adopters can apply through the adoption endpoints 5. Adoption: Once approved, pet status changes to adopted 6. Post-Adoption: Pet record is retained for historical purposes Access: This operation requires staff permissions (write:pets scope or valid Bearer token). Only authenticated staff members can add pets to the system.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Modern PetstoreAPI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs2.petstoreapi.com/api-reference/pet/create-pet\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://anakinlabs.mintlify.site/_mintlify/api/og/v2?division=Pet\u0026amp;title=Create+Pet\u0026amp;description=Add+a+new+pet+to+the+store+catalog%2C+making+it+available+for+adoption.%0A%0A%23%23+Pet+Lifecycle+Workflow%0A%0AWhen+a+new+pet+enters+the+system%3A%0A%0A1.+**Intake**%3A+Staff+create\u0026amp;theme=04240fbb63cd3deb54f01e13\u0026amp;signature=5fdd92d9e9e3e1e7637be91c2c3b3554145afa62fb0f66d9e8a1d6ce8eb42317\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Pet - Modern PetstoreAPI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add a new pet to the store catalog, making it available for adoption. ## Pet Lifecycle Workflow When a new pet enters the system: 1. Intake: Staff creates a pet record with this endpoint (status: available) 2. Profile: Pet details include species, breed, age, medical info, photos, and adoption fee 3. Discovery: Pet appears in search results and listings 4. Adoption Application: Potential adopters can apply through the adoption endpoints 5. Adoption: Once approved, pet status changes to adopted 6. Post-Adoption: Pet record is retained for historical purposes Access: This operation requires staff permissions (write:pets scope or valid Bearer token). Only authenticated staff members can add pets to the system.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://anakinlabs.mintlify.site/_mintlify/api/og/v2?division=Pet\u0026amp;title=Create+Pet\u0026amp;description=Add+a+new+pet+to+the+store+catalog%2C+making+it+available+for+adoption.%0A%0A%23%23+Pet+Lifecycle+Workflow%0A%0AWhen+a+new+pet+enters+the+system%3A%0A%0A1.+**Intake**%3A+Staff+create\u0026amp;theme=04240fbb63cd3deb54f01e13\u0026amp;signature=5fdd92d9e9e3e1e7637be91c2c3b3554145afa62fb0f66d9e8a1d6ce8eb42317\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/anakinlabs/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Modern PetstoreAPI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9333EA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs2.petstoreapi.com/api-reference/pet/create-pet\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/pet/create-pet.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs2.petstoreapi.com/#organization\",\"name\":\"Modern PetstoreAPI Docs\",\"url\":\"https://docs2.petstoreapi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets.apidog.com/app/project-icon/custom/20251217/66161baa-c10c-4c41-9146-fbaddf93bd86.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs2.petstoreapi.com#website\",\"name\":\"Modern PetstoreAPI Docs\",\"url\":\"https://docs2.petstoreapi.com\",\"publisher\":{\"@id\":\"https://docs2.petstoreapi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet#webpage\",\"url\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet\",\"name\":\"Create Pet\",\"description\":\"Add a new pet to the store catalog, making it available for adoption. ## Pet Lifecycle Workflow When a new pet enters the system: 1. Intake: Staff creates a pet record with this endpoint (status: available) 2. Profile: Pet details include species, breed, age, medical info, photos, and adoption fee 3. Discovery: Pet appears in search results and listings 4. Adoption Application: Potential adopters can apply through the adoption endpoints 5. Adoption: Once approved, pet status changes to adopted 6. Post-Adoption: Pet record is retained for historical purposes Access: This operation requires staff permissions (write:pets scope or valid Bearer token). Only authenticated staff members can add pets to the system.\",\"dateModified\":\"2026-01-06T09:42:09.666Z\",\"isPartOf\":{\"@id\":\"https://docs2.petstoreapi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Pet\",\"item\":\"https://docs2.petstoreapi.com/api-reference/pet/get-pet\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Pet\",\"item\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet#apireference\",\"headline\":\"Create Pet\",\"name\":\"Create Pet\",\"description\":\"Add a new pet to the store catalog, making it available for adoption. ## Pet Lifecycle Workflow When a new pet enters the system: 1. Intake: Staff creates a pet record with this endpoint (status: available) 2. Profile: Pet details include species, breed, age, medical info, photos, and adoption fee 3. Discovery: Pet appears in search results and listings 4. Adoption Application: Potential adopters can apply through the adoption endpoints 5. Adoption: Once approved, pet status changes to adopted 6. Post-Adoption: Pet record is retained for historical purposes Access: This operation requires staff permissions (write:pets scope or valid Bearer token). Only authenticated staff members can add pets to the system.\",\"url\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet\",\"mainEntityOfPage\":{\"@id\":\"https://docs2.petstoreapi.com/api-reference/pet/create-pet#webpage\"},\"dateModified\":\"2026-01-06T09:42:09.666Z\",\"publisher\":{\"@id\":\"https://docs2.petstoreapi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs2.petstoreapi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Modern PetstoreAPI Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Modern PetstoreAPI Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/pet/create-pet.md","siteName":"Modern PetstoreAPI Docs","nav":{"global":{"anchors":[{"anchor":"Home","icon":"book-open-cover","href":"https://petstoreapi.com/"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Modern PetstoreAPI","groups":[{"group":"Pet","pages":[{"title":"Get Pet","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json get /pets/{id}","href":"/api-reference/pet/get-pet"},{"title":"Update Pet","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json put /pets/{id}","href":"/api-reference/pet/update-pet"},{"title":"Delete Pet","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json delete /pets/{id}","href":"/api-reference/pet/delete-pet"},{"title":"List Pets","description":"Retrieve a paginated list of pets available for adoption with optional filtering.","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json get /pets","href":"/api-reference/pet/list-pets"},{"title":"Create Pet","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /pets","href":"/api-reference/pet/create-pet"},{"title":"Upload Pet Image","description":"Upload an image for the specified pet. Requires authentication and write:pets permission.","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /pets/{id}/images","href":"/api-reference/pet/upload-pet-image"}]},{"group":"Chat","pages":[{"title":"Create Chat Completion","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /chat/completions","href":"/api-reference/chat/create-chat-completion"}]},{"group":"Payments","pages":[{"title":"Pay Order","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /orders/{id}/payment","href":"/api-reference/payments/pay-order"}]},{"group":"Store","pages":[{"title":"List Inventory","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json get /inventories","href":"/api-reference/store/list-inventory"},{"title":"Create Order","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /orders","href":"/api-reference/store/create-order"},{"title":"Get Order","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json get /orders/{id}","href":"/api-reference/store/get-order"},{"title":"Callback Example","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /orders/{id}","href":"/api-reference/store/callback-example"},{"title":"Delete Order","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json delete /orders/{id}","href":"/api-reference/store/delete-order"}]},{"group":"User","pages":[{"title":"Create user.","deprecated":null,"version":null,"openapi":"api-reference/classic-petstore-3.0.openapi.json post /user","href":"/api-reference/user/create-user"},{"title":"Get User","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json get /users/{id}","href":"/api-reference/user/get-user"},{"title":"Update User","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json put /users/{id}","href":"/api-reference/user/update-user"},{"title":"Delete User","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json delete /users/{id}","href":"/api-reference/user/delete-user"},{"title":"Create Token (Login)","deprecated":false,"version":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json post /auth/tokens","href":"/api-reference/user/create-token-login"}]},{"group":"Webhooks","pages":[{"title":"Order status changed event","version":null,"deprecated":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json webhook orderStatusChanged","href":"/api-reference/webhooks/order-status-changed-event"},{"title":"Payment succeeded event","version":null,"deprecated":null,"openapi":"api-reference/modern-petstore-3.1.openapi.json webhook paymentSucceeded","href":"/api-reference/webhooks/payment-succeeded-event"}]}]},{"tab":"Classic PetstoreAPI","pages":[{"title":"Classic PetstoreAPI","href":"/api-reference/pet/update-an-existing-pet"}]}]},"basePath":"","title":"Create Pet - Modern PetstoreAPI Docs","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CDiBsYGW.js","utils-KF9rPlmF.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C26urKTX.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BdjmJAC1.js","snippetPresets-3IpDBjt3.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-D4x_2vvo.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BIWdc5Pa.js","shallow-LQqfiMNd.js","getApiPlaygroundDisplay-DryzlOZG.js","CodeSnippet-tcJujU4r.js","CodeSnippets-BHp0nVLL.js","Page-1CZdsdAn.js","getPastedJson-DU-1ayUv.js","icon-CZK2hPr4.js","MethodPill-DOaqmTFC.js","DuplicateIcon-B5-nUxxl.js","createIcon-CDP_U77G.js","DynamicMarkdown-GHvayGOn.js","SectionHeading-BYvpkmUD.js","axios-vUo_bRtp.js","Markdown-uxhlayGT.js","clsx-B35qUV0p.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BvrGG8gU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CAf0yVYe.js"]}