{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Create an object type.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`\n\n**Scopes:**\n`custom-objects:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_object_type.json)","properties":{"query":{"type":"object","properties":{"fields[object-type]":{"type":"array","items":{"type":"string","enum":["created_at","description","id","namespace","status","title","updated_at"]},"description":"For more information please visit https://developers.klaviyo.com/en/v2026-10-15/reference/api-overview#sparse-fieldsets"}},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"revision":{"type":"string","default":"2026-10-15","enum":["2026-10-15"],"description":"API endpoint revision (format: YYYY-MM-DD[.suffix])"}},"required":["revision"],"additionalProperties":false},"body":{"$ref":"#/definitions/ObjectTypeCreateQuery"}},"required":["headers","body"],"additionalProperties":false,"definitions":{"ObjectTypeCreateQuery":{"type":"object","properties":{"data":{"$ref":"#/definitions/ObjectTypeCreateQueryResourceObject"}},"required":["data"]},"ObjectTypeCreateQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/ObjectTypeEnum"},"attributes":{"type":"object","properties":{"title":{"description":"The title for this object type. Note that this title moves in lockstep with the associated object-schema title.","type":"string","examples":["Pet Care Subscription"]},"description":{"description":"The description of this object type. Note that this description moves in lockstep with the associated object-schema description.","type":["string","null"],"default":""},"visibility":{"description":"The visibility of this object type","type":["string","null"],"default":"private","enum":["private","shared"],"examples":["private"]},"namespace":{"description":"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`.","type":["string","null"],"default":"custom-objects","examples":["custom-objects"]},"object-schema":{"description":"The object schema to create with this object type","type":["object","null"],"properties":{"data":{"$ref":"#/definitions/EmbeddedObjectSchemaResourceObject"}},"required":["data"]}},"required":["title"]}},"required":["type","attributes"]},"ObjectTypeEnum":{"type":"string","enum":["object-type"]},"EmbeddedObjectSchemaResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/ObjectSchemaEnum"},"attributes":{"type":"object","properties":{"properties":{"description":"Properties of the object schema","type":["array","null"],"items":{"$ref":"#/definitions/APISchemaProperty"}},"status":{"description":"The status of this object schema","type":["string","null"],"default":"draft","enum":["active","draft"],"examples":["draft"]},"required":{"description":"Properties that are required on the object schema","type":["array","null"],"items":{"type":"string"}},"source-mapping":{"description":"The source mapping to create with this object schema","type":["object","null"],"properties":{"data":{"$ref":"#/definitions/SourceMappingCreateQueryResourceObject"}},"required":["data"]}}}},"required":["type","attributes"]},"ObjectSchemaEnum":{"type":"string","enum":["object-schema"]},"APISchemaProperty":{"type":"object","properties":{"id":{"description":"The ID of the schema property. Must be a postive integer.","type":"integer","examples":[1]},"name":{"description":"The name of the schema property","type":"string","examples":["service_plan"]},"type":{"description":"The type of the schema property","type":"string","enum":["boolean","float","int","list_str","string","timestamp"]},"description":{"description":"The description of the schema property","type":["string","null"],"default":""}},"required":["id","name","type"]},"SourceMappingCreateQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/SourceMappingEnum"},"attributes":{"type":"object","properties":{"property_mappings":{"description":"A mapping of source property IDs to source mappings","type":["array","null"],"items":{"oneOf":[{"$ref":"#/definitions/ConstantPropertyMapping"},{"$ref":"#/definitions/SimplePropertyMapping"}]}},"relationship_mappings":{"description":"A mapping of source relationship IDs to source mappings","type":["array","null"],"items":{"$ref":"#/definitions/SimpleRelationshipMapping"}}}}},"required":["type","attributes"]},"SourceMappingEnum":{"type":"string","enum":["source-mapping"]},"ConstantPropertyMapping":{"type":"object","properties":{"id":{"description":"Property ID. Must be a positive integer.","type":"integer","examples":[1]},"type":{"description":"String literal for serialization","type":"string","enum":["constant"]},"value":{"description":"Constant value assigned to every record","oneOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"boolean"}],"examples":["active"]}},"required":["id","type","value"]},"SimplePropertyMapping":{"type":"object","properties":{"id":{"description":"Property ID","type":"integer","examples":[1]},"type":{"description":"String literal for serialization","type":"string","enum":["simple"]},"source":{"$ref":"#/definitions/PropertySource"}},"required":["id","type","source"]},"SimpleRelationshipMapping":{"type":"object","properties":{"relationship_id":{"description":"Object schema relationship ULID ID","type":"string","examples":["01K97SE7GH4TE57FVNQY310QAK"]},"type":{"description":"String literal for serialization","type":"string","enum":["simple"],"examples":["simple"]},"source":{"description":"Data source mapping","oneOf":[{"$ref":"#/definitions/CustomObjectRelationshipSource"},{"$ref":"#/definitions/ProfileRelationshipSource"}]}},"required":["relationship_id","type","source"]},"PropertySource":{"type":"object","properties":{"source_id":{"description":"Data source ULID ID","type":"string","examples":["01JXKX2HM7NV4QPTR5WE8BF6GY"]},"id_path":{"description":"JSONPath ID selector","type":"string","examples":["$['object_record']['subscription_id']"]},"data_path":{"description":"JSONPath data selector","type":"string","examples":["$['object_record']['service_plan']"]}},"required":["source_id","id_path","data_path"]},"CustomObjectRelationshipSource":{"type":"object","properties":{"source_id":{"description":"Data source ULID ID","type":"string","examples":["01JXKX2HM7NV4QPTR5WE8BF6GY"]},"type":{"description":"String literal for serialization","type":"string","enum":["custom-object"]},"id_path":{"description":"JSONPath data selector to owning ID","type":"string","examples":["$['object_record']['subscription_id']"]},"related_id_path":{"description":"JSONPath data selector to related ID","type":"string","examples":["$['object_record']['pet_id']"]},"update_strategy":{"description":"Strategy for updating relationships with each new RawDataRecord ingestion","type":["string","null"],"default":"replace_from_origin","enum":["additive","replace_from_origin"],"examples":["replace_from_origin"]}},"required":["source_id","type","id_path","related_id_path"]},"ProfileRelationshipSource":{"type":"object","properties":{"source_id":{"description":"Data source ULID ID","type":"string","examples":["01JXKX2HM7NV4QPTR5WE8BF6GY"]},"type":{"description":"String literal for serialization","type":"string","enum":["profile"]},"id_path":{"description":"JSONPath data selector to owning ID","type":"string","examples":["$['relationships']['owners'][*]['id']"]},"related_id_paths":{"description":"List of profile identifier mappings to JSONPath data selectors","type":"array","items":{"$ref":"#/definitions/RelatedIdPath"},"examples":[[{"identifier_type":"email","path":"$['relationships']['owners'][*]['email']"},{"identifier_type":"phone","path":"$['relationships']['owners'][*]['phone']"}]]},"update_strategy":{"description":"Strategy for updating relationships with each new RawDataRecord ingestion","type":["string","null"],"default":"replace_from_origin","enum":["additive","replace_from_origin"],"examples":["replace_from_origin"]}},"required":["source_id","type","id_path","related_id_paths"]},"RelatedIdPath":{"type":"object","properties":{"identifier_type":{"description":"Profile identifier type","type":"string","enum":["anonymous","email","external-id","klaviyo-id","phone"]},"path":{"description":"JSONPath data selector to related ID","type":"string","examples":["$['relationships']['owners'][*]['email']"]}},"required":["identifier_type","path"]}}},"name":"Create Object Type","id":"klaviyo.create_object_type","example":{"headers":{"revision":"2026-10-15"},"body":{"data":{"type":"object-type","attributes":{"title":"Pet Care Subscription"}}}},"maxRequests":1,"summary":false}}