Skip to content
Public API
Esc
↑↓navigate↵open⌘Jpreview

Create a material

A material series is optional. A given materialSeriesId / materialSeriesName must match an existing, non-archived series (404 otherwise).

POST/material
Authorization
AuthorizationAPI key · headerrequired

The Incoming Secret value (<secretId>.<random>), with or without a Bearer prefix.

Request body
application/json
namestringrequired

Material name.

descriptionstringrequired

Description.

propertiesobjectrequired

Material properties.

machineGroupIdsinteger[]required

Machine groups the material is available on. Must be non-empty and all ids must exist.

customIdstring

Custom material id.

materialSeriesIdinteger | string

Id of an existing, non-archived material series (from GET /material-series). Takes precedence over materialSeriesName.

Show properties
One of:
integer
integer
string
string
materialSeriesNamestring

Exact name of an existing, non-archived material series. Used only when materialSeriesId is absent.

Responses
200

Created. Returns only the id — fetch the full Material with the corresponding GET.

idinteger | stringrequired

Id of the created Material.

Show properties
One of:
integer
integer
string
string
401

Authentication failed. All causes return this identical response.

codeinteger
messagestring
typestring
default

Downstream errors pass through verbatim; x-error-source names the failing service.

codeinteger
messagestring
typestring
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://next.amfg.ai/engine-service/public-api/v1/material' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string",
  "properties": {},
  "machineGroupIds": [
    0
  ],
  "customId": "string",
  "materialSeriesId": 0,
  "materialSeriesName": "string"
}'
Response
{
  "id": 0
}