POST
/
company-traits
curl --request POST \
  --url https://api.schematichq.com/company-traits \
  --header 'Content-Type: application/json' \
  --header 'X-Schematic-Api-Key: <api-key>' \
  --data '{
  "incr": 123,
  "keys": {},
  "set": "<string>",
  "trait": "<string>",
  "update_only": true
}'
{
  "data": {
    "created_at": "2023-11-07T05:31:56Z",
    "entity_traits": [
      {
        "created_at": "2023-11-07T05:31:56Z",
        "definition": {
          "created_at": "2023-11-07T05:31:56Z",
          "display_name": "<string>",
          "entity_type": "<string>",
          "hierarchy": [
            "<string>"
          ],
          "id": "<string>",
          "trait_type": "<string>",
          "updated_at": "2023-11-07T05:31:56Z"
        },
        "definition_id": "<string>",
        "environment_id": "<string>",
        "id": "<string>",
        "updated_at": "2023-11-07T05:31:56Z",
        "value": "<string>"
      }
    ],
    "environment_id": "<string>",
    "id": "<string>",
    "keys": [
      {
        "created_at": "2023-11-07T05:31:56Z",
        "definition": {
          "created_at": "2023-11-07T05:31:56Z",
          "entity_type": "<string>",
          "id": "<string>",
          "key": "<string>",
          "updated_at": "2023-11-07T05:31:56Z"
        },
        "definition_id": "<string>",
        "entity_id": "<string>",
        "entity_type": "<string>",
        "environment_id": "<string>",
        "id": "<string>",
        "key": "<string>",
        "updated_at": "2023-11-07T05:31:56Z",
        "value": "<string>"
      }
    ],
    "last_seen_at": "2023-11-07T05:31:56Z",
    "logo_url": "<string>",
    "name": "<string>",
    "plans": [
      {
        "id": "<string>",
        "image_url": "<string>",
        "name": "<string>"
      }
    ],
    "traits": {},
    "updated_at": "2023-11-07T05:31:56Z",
    "user_count": 123
  },
  "params": {}
}

Authorizations

X-Schematic-Api-Key
string
headerrequired

Body

application/json
incr
integer | null

Amount to increment the trait by (positive or negative)

keys
object
required

Key/value pairs too identify a company or user

set
string | null

Value to set the trait to

trait
string
required

Name of the trait to update

update_only
boolean | null

Unless this is set, the company or user will be created if it does not already exist

Response

200 - application/json
data
object
required
params
object
required

Input parameters