Create a new entity for a team.
cURL
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>" } }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The ID of the team.
The ID of the entity type.
The unique key for the entity.
The name of the entity.
The field values for the entity.
Show child attributes
Option: bool_value
Option: entity_ref_value
Option: enum_value
Option: number_value
Option: text_value
Option: timestamp_value
Option: user_ref_value
Success
The created entity.
The ID of the entity.
The ID of the team that the entity belongs to.
The unique key for the entity within its type.
The sequential number for the entity within the team.
The ID of the user who created the entity.
The ID of the user who last updated the entity.
The timestamp when the entity was created.
The timestamp when the entity was last updated.
The entity's document data as a JSON string.
The key of the entity type.
The key of the entity schema.
The ID of the entity schema.
Was this page helpful?