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": [
    {
      "fieldId": "<string>",
      "fieldKey": "<string>",
      "value": 123,
      "pinned": true
    }
  ]
}
'
{
  "data": {
    "id": "<string>",
    "key": "<string>",
    "name": "<string>",
    "number": 123,
    "teamId": "<string>",
    "entityTypeId": "<string>",
    "entityTypeKey": "<string>",
    "createdByUserId": "<string>",
    "updatedByUserId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z",
    "fieldValues": [
      {
        "id": "<string>",
        "entityId": "<string>",
        "fieldId": "<string>",
        "fieldKey": "<string>",
        "fieldName": "<string>",
        "dataType": "DATA_TYPE_UNSPECIFIED",
        "value": 123,
        "setByUserId": "<string>",
        "setByAppInstanceId": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "deletedAt": "2023-11-07T05:31:56Z",
        "pinned": true
      }
    ],
    "sourceAppInstanceIds": [
      "<string>"
    ],
    "sharedMetadata": {
      "sourceTeamId": "<string>",
      "sourceTeamName": "<string>"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.serval.com/llms.txt

Use this file to discover all available pages before exploring further.

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 entity key. Sets the value of the entity type's key field (is_key_field). Ignored if field_values already contains a value for the key field.

name
string

The entity name. Sets the value of the entity type's name field (is_name_field). Ignored if field_values already contains a value for the name field.

fieldValues
EntityFieldValueInput · object[]

The field values for the entity. Must include the key field and name field values (unless using the key/name convenience fields above).

Response

Success

data
data · object

The created entity.