v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Actions

Record action

Records a new action taken by a given partner or customer, and the number of times that action was performed.

post/v2/actions

Request body

created_atinteger

The created_at date of the action in epoch (ms).

external_keystring nullable

The external key of the action record in PartnerStack

target_keystring required

The identifier of the target specified in target_type. For a customer, this is the customer key. For a partnership, it is their partner key.

target_type'partnership' | 'customer' required

Whether to record an action under a partnership or customer

typestring required

The type of action the partner or customer performed

valueinteger required

The number of times the action was performed

Example request

{
  "created_at": 1717785600000,
  "external_key": "act_12345",
  "target_key": "bertramgilfoyle",
  "target_type": "customer",
  "type": "post_created",
  "value": 1
}

Response

Records a new action taken by a given partner or customer, and the number of times that action was performed.

messagestring required
statusinteger required

Example response

{
  "data": {
    "created_at": 1717785600000,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "external_key": "act_12345",
    "target_key": "bertramgilfoyle",
    "target_type": "customer",
    "type": "post_created",
    "value": 1
  }
}