Presets

Create a preset

Creates a new instruction preset for the authenticated user. The instruction_data should be a valid instruction object for the given type.

POST
/preset

Authorization

token_auth
AuthorizationBearer <token>

Token-based authentication using access tokens.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://v2.api.piktid.com/preset" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "flat_2_model",    "instruction_data": {}  }'
{
  "preset_code": "string",
  "name": "string",
  "description": "string",
  "type": "flat_2_model",
  "visibility": "shared",
  "groups": [
    "string"
  ],
  "categories": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "thumbnail_url": "string",
      "visibility": "shared",
      "created_by": "string",
      "created_at": "string",
      "preset_count": 0,
      "groups": [
        "string"
      ]
    }
  ],
  "instruction_data": {},
  "created_by": "string",
  "created_at": "string",
  "updated_at": "string"
}
{
  "error": "Invalid request",
  "detail": [
    {
      "field": null,
      "message": "string",
      "position": "query"
    }
  ]
}
Empty
Empty