Project-I
HomeAPI Test
HomeAPI Test
  1. API Test
  • Find pet by ID
    GET
  • Add a new pet to the store
    POST
  • Update an existing pet
    PUT
  • Deletes a pet
    DELETE
  • Finds Pets by status
    GET
  1. API Test

Add a new pet to the store

POST
/pet

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Body Params application/json

Examples

Responses

🟢201OK
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/1012399-0-default/pet' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": 0,
    "data": {
        "name": "string",
        "photoUrls": [
            "string"
        ],
        "id": 0,
        "category": {
            "id": 0,
            "name": "string"
        },
        "tags": [
            {
                "id": 0,
                "name": "string"
            }
        ],
        "status": "string"
    }
}'
Response Response Example
{
    "code": 0,
    "data": {
        "name": "Hello Kitty",
        "photoUrls": [
            "http://dummyimage.com/400x400"
        ],
        "id": 3,
        "category": {
            "id": 71,
            "name": "Cat"
        },
        "tags": [
            {
                "id": 22,
                "name": "Cat"
            }
        ],
        "status": "sold"
    }
}
Modified at 2025-07-23 06:56:40
Previous
Find pet by ID
Next
Update an existing pet
Built with