Visitar URL original
Create Object Type | Klaviyo API ReferenceSkip to content

This page is available as Markdown at https://developers.klaviyo.com/en/reference/create_object_type.md. Its OpenAPI document is at https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_object_type.json. An index of every page is at https://developers.klaviyo.com/llms.txt.

KlaviyoKlaviyoDevelopers

POSThttps://a.klaviyo.com/api/object-types

Create an object type.

Revision header
revision: 2026-10-15required
Scopes
custom-objects:write
Rate limits
Burst: 3/sSteady: 60/m

Query parameters

  • fields[object-type]#string[]

    For more information please visit API overview

    Allowed values:
    • created_at
    • description
    • id
    • namespace
    • status
    • title
    • updated_at

Headers

  • revision#stringrequired

    API endpoint revision (format: YYYY-MM-DD[.suffix])

    2026-10-15

Request body

Content type: application/vnd.api+jsonrequired

  • data#objectrequired
    Show 2 fields
    • type#stringrequired
      Allowed values:
      • object-type
    • attributes#objectrequired
      Show 5 fields
      • title#stringrequired

        The title for this object type. Note that this title moves in lockstep with the associated object-schema title.

        Example: Pet Care Subscription

      • description#stringnullable

        The description of this object type. Note that this description moves in lockstep with the associated object-schema description.

        Default:

      • visibility#stringnullable

        The visibility of this object type

        Allowed values:
        • private
        • shared

        Default: private

        Example: private

      • namespace#stringnullable

        The namespace of this object type. Either custom-objects or applications/<application_id>, where <application_id> is the ULID of the OAuth application that owns the object type. Defaults to custom-objects.

        Default: custom-objects

        Example: custom-objects

      • object-schema#objectnullable

        The object schema to create with this object type

        Show 1 field
        • data#objectrequired
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • object-schema
          • attributes#objectrequired
            Show 4 fields
            • properties#object[]nullable

              Properties of the object schema

              Show 4 fields
              • id#integerrequired

                The ID of the schema property. Must be a postive integer.

                Example: 1

              • name#stringrequired

                The name of the schema property

                Example: service_plan

              • type#stringrequired

                The type of the schema property

                Allowed values:
                • boolean
                • float
                • int
                • list_str
                • string
                • timestamp
              • description#stringnullable

                The description of the schema property

                Default:

            • status#stringnullable

              The status of this object schema

              Allowed values:
              • active
              • draft

              Default: draft

              Example: draft

            • required#string[]nullable

              Properties that are required on the object schema

            • source-mapping#objectnullable

              The source mapping to create with this object schema

              Show 1 field
              • data#objectrequired
                Show 2 fields
                • type#stringrequired
                  Allowed values:
                  • source-mapping
                • attributes#objectrequired
                  Show 2 fields
                  • property_mappings#oneOf[]nullable

                    A mapping of source property IDs to source mappings

                    One of:

                    1. Option 1: ConstantPropertyMapping
                      • id#integerrequired

                        Property ID. Must be a positive integer.

                        Example: 1

                      • type#stringrequired

                        String literal for serialization

                        Allowed values:
                        • constant
                      • value#integer | number | string | booleanrequired

                        Constant value assigned to every record

                        Example: active

                    2. Option 2: SimplePropertyMapping
                      • id#integerrequired

                        Property ID

                        Example: 1

                      • type#stringrequired

                        String literal for serialization

                        Allowed values:
                        • simple
                      • source#objectrequired
                        Show 3 fields
                        • source_id#stringrequired

                          Data source ULID ID

                          Example: 01JXKX2HM7NV4QPTR5WE8BF6GY

                        • id_path#stringrequired

                          JSONPath ID selector

                          Example: $['object_record']['subscription_id']

                        • data_path#stringrequired

                          JSONPath data selector

                          Example: $['object_record']['service_plan']

                  • relationship_mappings#object[]nullable

                    A mapping of source relationship IDs to source mappings

                    Show 3 fields
                    • relationship_id#stringrequired

                      Object schema relationship ULID ID

                      Example: 01K97SE7GH4TE57FVNQY310QAK

                    • type#stringrequired

                      String literal for serialization

                      Allowed values:
                      • simple

                      Example: simple

                    • source#oneOfrequired

                      Data source mapping

                      One of:

                      1. Option 1: CustomObjectRelationshipSource
                        • source_id#stringrequired

                          Data source ULID ID

                          Example: 01JXKX2HM7NV4QPTR5WE8BF6GY

                        • type#stringrequired

                          String literal for serialization

                          Allowed values:
                          • custom-object
                        • id_path#stringrequired

                          JSONPath data selector to owning ID

                          Example: $['object_record']['subscription_id']

                        • related_id_path#stringrequired

                          JSONPath data selector to related ID

                          Example: $['object_record']['pet_id']

                        • update_strategy#stringnullable

                          Strategy for updating relationships with each new RawDataRecord ingestion

                          Allowed values:
                          • additive
                          • replace_from_origin

                          Default: replace_from_origin

                          Example: replace_from_origin

                      2. Option 2: ProfileRelationshipSource
                        • source_id#stringrequired

                          Data source ULID ID

                          Example: 01JXKX2HM7NV4QPTR5WE8BF6GY

                        • type#stringrequired

                          String literal for serialization

                          Allowed values:
                          • profile
                        • id_path#stringrequired

                          JSONPath data selector to owning ID

                          Example: $['relationships']['owners'][*]['id']

                        • related_id_paths#object[]required

                          List of profile identifier mappings to JSONPath data selectors

                          Show 2 fields
                          • identifier_type#stringrequired

                            Profile identifier type

                            Allowed values:
                            • anonymous
                            • email
                            • external-id
                            • klaviyo-id
                            • phone
                          • path#stringrequired

                            JSONPath data selector to related ID

                            Example: $['relationships']['owners'][*]['email']

                        • update_strategy#stringnullable

                          Strategy for updating relationships with each new RawDataRecord ingestion

                          Allowed values:
                          • additive
                          • replace_from_origin

                          Default: replace_from_origin

                          Example: replace_from_origin

Responses

201Success

Content type: application/vnd.api+json

  • data#objectrequired
    Show 5 fields
    • type#stringrequired
      Allowed values:
      • object-type
    • id#stringrequired

      The ULID ID of the object type

      Example: 01JXKYCN9A5M3QPVR8T2WE4BLD

    • attributes#objectrequired
      Show 6 fields
      • title#stringrequired

        The title for this object type

        Example: Pet Care Subscription

      • description#stringrequired

        The description of this object type

      • status#stringrequired

        The status of the schema associated with this object type

        Allowed values:
        • active
        • draft
        • publishing
        • undefined
      • namespace#stringrequired

        The namespace of this object type. Either custom-objects or applications/<application_id>, where <application_id> is the ULID of the OAuth application that owns the object type.

      • created_at#string<date-time>required

        The date and time when this object type was created

        Example: 2022-11-08T00:00:00+00:00

      • updated_at#string<date-time>required

        The date and time when this object type was last updated

        Example: 2022-11-08T00:00:00+00:00

    • relationships#object
      Show 5 fields
      • current-schema#object
        Show 2 fields
        • data#object
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • object-schema
          • id#stringrequired

            The current active schema for this object type

      • draft-schema#object
        Show 2 fields
        • data#object
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • object-schema
          • id#stringrequired

            The draft schema for this object type, if one exists

      • schema-versions#object
        Show 2 fields
        • data#object[]
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • object-schema
          • id#stringrequired

            All schema versions for this object type

      • object-types#object
        Show 2 fields
        • data#object[]
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • object-type
          • id#stringrequired

            The object type relationships for this object type

      • profile-object-types#object
        Show 2 fields
        • data#object[]
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • profile-object-type
          • id#stringrequired

            The profile object type relationships for this object type

  • meta#object

    Response-level metadata

    Show 1 field
    • agent_hints#object

      Optional hints emitted by the API for agent callers

      Show 1 field
      • next_steps#string[]

        Suggested follow-up actions for agents to take after this response

4XXClient Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string

5XXServer Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string