cURL
curl --request POST \ --url https://api.g2cplatform.com/v2/categories \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "name": "<string>", "description": "<string>", "metadata": {} } '
{ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "status": "active", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "description": "<string>", "metadata": {}, "statistics": { "subcategoryCount": 123, "objectCount": 123 }, "subcategories": [ { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "status": "active", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "description": "<string>", "metadata": {}, "statistics": { "objectCount": 123 } } ] }
Create a new category for organizing digital objects
API key for authenticating requests. Include in X-API-Key header.
Category name
2 - 100
Category description
500
Additional metadata as key-value pairs
Show child attributes
Category created successfully
active
inactive
archived
List of subcategories within this category