Create a pet profile
POST
/pet-profilesCreate a pet profile. The id returned on success is the pet_profile_id used by the detail, update, and delete endpoints, as well as by Smart Consultation and Image Recognition.
Prerequisite: get
breed_codefrom Breed library lookup first; do not invent it. When there is no standard breed, send thepet_varietytext only.
Request URL
text
POST https://open-api.habitaxx.com/v1/ms-ai-fast/pet-profiles?locale=zh-CNRequest headers
http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/jsonQuery parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
locale | string | No | Response display language, such as zh-CN or en-US. Affects the returned breed_display_name. When omitted, the default language is used. |
Request body
json
{
"name": "团子",
"pet_type": 2,
"gender": 1,
"birthday": "2023-06-01T00:00:00",
"pet_variety": "柴犬",
"breed_code": "dog.shiba-inu",
"weight": "10.10kg",
"is_neutered": 1,
"avatar": null
}Request fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Pet name, maximum 64 characters. |
avatar | string | null | No | Avatar URL, maximum 500 characters. |
birthday | string(date-time) | null | No | Date of birth, such as 2023-06-01T00:00:00. |
gender | integer | null | No | 1 male, 2 female; omit for unknown. |
pet_type | integer | null | No | 1 cat, 2 dog, 3 exotic pet; omit for unspecified. |
pet_variety | string | null | No | Breed text, maximum 100 characters. |
breed_code | string | null | No | Standard breed code, maximum 64 characters. Get values from Breed library lookup; the prefix must match pet_type (cat. / dog.). |
weight | string | null | No | Weight, a string with a unit, such as "10.10kg", maximum 20 characters. |
is_neutered | integer | null | No | 0 not neutered, 1 neutered; omit for unknown. |
Response example
json
{
"code": 200,
"message": "success",
"data": {
"id": 44,
"user_uuid": "<USER_UUID>",
"name": "团子",
"avatar": null,
"birthday": "2023-06-01T00:00:00",
"gender": 1,
"pet_type": 2,
"pet_variety": "柴犬",
"breed_code": "dog.shiba-inu",
"locale": "zh-CN",
"breed_display_name": "柴犬",
"weight": "10.10kg",
"is_neutered": 1,
"is_del": 0,
"created_at": "2026-08-27T11:20:31",
"updated_at": "2026-08-27T11:20:31"
}
}Response fields
| Field | Type | Description |
|---|---|---|
id | integer | Pet-profile ID. Later endpoints use this value as their pet_profile_id. |
name | string | Pet name. |
avatar | string | null | Avatar URL. |
birthday | string(date-time) | null | Date of birth. |
gender | integer | null | 1 male, 2 female, null unknown. |
pet_type | integer | null | 1 cat, 2 dog, 3 exotic pet, null unspecified. |
pet_variety | string | null | Breed text supplied by the caller. |
breed_code | string | null | Standard breed code. |
locale | string | Display language actually used for this response. |
breed_display_name | string | null | Standard breed display name returned according to locale. |
weight | string | null | Current weight (a string with a unit). |
is_neutered | integer | null | 0 not neutered, 1 neutered, null unknown. |
created_at / updated_at | string(date-time) | Creation and update time. |
user_uuid | string | Platform-internal user identifier. Do not pass it as a business parameter or expose it externally. |
is_del | integer | Platform soft-delete flag. Do not rely on this field to determine business state. |
Next steps
- Use
idto call Smart Consultation or Create an image-recognition session. - To make changes, call Update a pet profile.