---
title: "Create Published Attribute Values"
method: POST
path: "/published-attributes/{published-attribute-token}/values"
tags: ["Published Attributes"]
---

# Create Published Attribute Values

`POST /published-attributes/{published-attribute-token}/values`

## Request body

- union[]
  - union
    - object
      - `value` union, required — The published attribute's value must be one of the following types: * Option 1: string * Option 2: number * Option 3: boolean
        - string
        - number
        - boolean
      - `entity_token` string — Alloy-generated identifier for the entity that you want to set this published attribute's value for. Required for published attributes with `object_type` of `entity` (along with `external_entity_id` as an alternative).
      - `transaction_token` string — Alloy-generated identifier for the transaction that you want to set this published attribute's value for. Required for published attributes with `object_type` of `transaction`.
      - `timestamp` string, date-time — ISO 8601 date. Used to determine the most recent value of the published attribute, which will be used in the evaluation. If not provided, defaults to the current date time.
      - `expires_at` string, date-time, nullable — The date and time the published attribute value expires
      - `created_at` string, date-time — The date and time the published attribute value was created.
    - object
      - `value` union, required — The published attribute's value must be one of the following types: * Option 1: string * Option 2: number * Option 3: boolean
        - string
        - number
        - boolean
      - `entity_token` string, required — Alloy-generated identifier for the entity that you want to set this published attribute's value for. Required for published attributes with `object_type` of `entity` (along with `external_entity_id` as an alternative).
      - `transaction_token` string — Alloy-generated identifier for the transaction that you want to set this published attribute's value for. Required for published attributes with `object_type` of `transaction`.
      - `timestamp` string, date-time — ISO 8601 date. Used to determine the most recent value of the published attribute, which will be used in the evaluation. If not provided, defaults to the current date time.
      - `expires_at` string, date-time, nullable — The date and time the published attribute value expires
      - `created_at` string, date-time — The date and time the published attribute value was created.
    - object — For transaction-type published attributes (`object_type: "transaction"`)
      - `value` union, required — The published attribute's value must be one of the following types: * Option 1: string * Option 2: number * Option 3: boolean
        - string
        - number
        - boolean
      - `entity_token` string — Alloy-generated identifier for the entity that you want to set this published attribute's value for. Required for published attributes with `object_type` of `entity` (along with `external_entity_id` as an alternative).
      - `transaction_token` string, required — Alloy-generated identifier for the transaction that you want to set this published attribute's value for. Required for published attributes with `object_type` of `transaction`.
      - `timestamp` string, date-time — ISO 8601 date. Used to determine the most recent value of the published attribute, which will be used in the evaluation. If not provided, defaults to the current date time.
      - `expires_at` string, date-time, nullable — The date and time the published attribute value expires
      - `created_at` string, date-time — The date and time the published attribute value was created.

## Response `201`

Created published attribute values for the entity.

- 0[] — unresolved $ref

## Other responses

- `206` — Partially created published attribute values for the entity.
- `404` — Unable to find published attribute with specified token

---

[API](https://skmtc.dev/alloy/apis/alloy-api.md) · [All operations](https://skmtc.dev/alloy/apis/alloy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/alloy/alloy-api/revisions/405799de4d2a/schema)
