TestingAPIs is still being built, so some things may not work yet. If something breaks, email support@testingapis.com or use the contact page.
Create a product
POSThttps://api.testingapis.com/api/Products
Request body
Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: Product. The new product. Any client-supplied ID is replaced.
Example body
{"title":"Wireless Noise-Cancelling Headphones","price":249.99,"description":"Over-ear headphones with 30hr battery life and active noise cancellation.","category":"electronics","image":"https://picsum.photos/seed/prod1/400/400","rating":{"rate":4.3,"count":127},"inStock":true,"createdAt":"2025-06-12T10:30:00Z"}
Responses
200
OK
201
Created; returns { message, data } with the generated ID.
400
title is missing.
500
Unexpected server error.
Example
Request
curl-XPOST"https://api.testingapis.com/api/Products"\-H"Content-Type: application/json"\-d'{"title": "Wireless Noise-Cancelling Headphones", "price": 249.99, "description": "Over-ear headphones with 30hr battery life and active noise cancellation.", "category": "electronics", "image": "https://picsum.photos/seed/prod1/400/400", "rating": {"rate": 4.3, "count": 127}, "inStock": true, "createdAt": "2025-06-12T10:30:00Z"}'
Response201 Created
{"message":"Product created successfully","data":{"id":24,"title":"Wireless Noise-Cancelling Headphones","price":249.99,"description":"Over-ear headphones with 30hr battery life and active noise cancellation.","category":"electronics","image":"https://picsum.photos/seed/prod1/400/400","rating":{"rate":4.3,"count":127},"inStock":true,"createdAt":"2025-06-12T10:30:00Z"}}