Skip to main content
POST
/
v2
/
entities
Create Entity
curl --request POST \
  --url https://public.api.serval.com/v2/entities \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamId": "<string>",
  "entityTypeId": "<string>",
  "key": "<string>",
  "name": "<string>",
  "fieldValues": [
    {
      "boolValue": true,
      "entityRefValue": "<string>",
      "enumValue": "<string>",
      "numberValue": 123,
      "textValue": "<string>",
      "timestampValue": "2023-11-07T05:31:56Z",
      "userRefValue": "<string>"
    }
  ]
}
'
{
  "data": {
    "id": "<string>",
    "teamId": "<string>",
    "entityTypeId": "<string>",
    "key": "<string>",
    "name": "<string>",
    "number": 123,
    "createdByUserId": "<string>",
    "updatedByUserId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "document": "<string>",
    "entityTypeKey": "<string>",
    "entitySchemaKey": "<string>",
    "entitySchemaId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamId
string

The ID of the team.

entityTypeId
string

The ID of the entity type.

key
string

The unique key for the entity.

name
string

The name of the entity.

fieldValues
EntityFieldValue · object[]

The field values for the entity.

Response

Success

data
data · object

The created entity.