> For the complete documentation index, see [llms.txt](https://docs.userlane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.userlane.com/developers/core-api/attributes/bulk-upload-property-scoped-attribute-definitions-and-per-user-values.md). Agents can also search and read this documentation through its [MCP server](https://docs.userlane.com/~gitbook/mcp).

# Bulk upload property-scoped attribute definitions and per-user values.

Users are resolved by (parentCompany, publicId): any user in the property's parent company is a valid target, even if they have never been seen on this specific property. Attribute keys are still filtered by property scope, so cross-scope writes cannot happen.

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"tags":[{"name":"Attributes","description":"Attributes"}],"servers":[{"url":"https://api.userlane.com"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BulkUploadAttributesDTO":{"description":"Bulk upload request: attribute definitions and per-user values.","properties":{"attributes":{"description":"Attribute definitions to upsert. May be empty. Hard-capped at 1000 rows per request.","type":"array","items":{"$ref":"#/components/schemas/BulkAttributeDefinitionDTO"}},"userProfiles":{"description":"Per-user attribute value rows. May be empty. Hard-capped at 1000 rows per request.","type":"array","items":{"$ref":"#/components/schemas/BulkUserProfileDTO"}},"idempotent":{"description":"When true, attribute values not present in this upload are removed from each targeted user (per scope). When the company has a source order, a company-scoped value from a higher-priority source is kept. Defaults to false (additive merge).","type":"boolean","default":false}},"type":"object"},"BulkAttributeDefinitionDTO":{"description":"Attribute definition row in a bulk upload payload.","properties":{"key":{"description":"Attribute key, unique within the scope.","type":"string","maxLength":255},"type":{"description":"Attribute value type.","type":"string","enum":["string","number","boolean","array","datetime"]},"displayName":{"description":"Display name shown in the UI. Defaults to the key on create. Omit (null) to leave an existing attribute's display name unchanged.","type":"string","maxLength":255,"nullable":true},"description":{"description":"Optional free-form description. Omit (null) to leave an existing attribute's description unchanged.","type":"string","maxLength":255,"nullable":true},"archived":{"description":"Whether the attribute is archived (hidden from UI). Defaults to false on create. Omit (null) to leave an existing attribute's archived state unchanged.","type":"boolean","nullable":true}},"type":"object"},"BulkUserProfileDTO":{"description":"User profile row in a bulk upload payload.","properties":{"publicId":{"description":"Customer-supplied user identifier (publicId).","type":"string","maxLength":255},"profile":{"$ref":"#/components/schemas/UserProfileDTO"}},"type":"object"},"UserProfileDTO":{"title":"UserProfileDTO","description":"User Profile DTO","properties":{"attributes":{"description":"$attributes","type":"object"}},"type":"object"},"BulkUploadAttributesRO":{"description":"Aggregate result of a bulk attributes upload.","properties":{"attributesCreated":{"description":"Number of attribute definitions newly created.","type":"integer"},"attributesUpdated":{"description":"Number of attribute definitions updated.","type":"integer"},"usersUpdated":{"description":"Number of distinct users for whom at least one attribute value was actually written this request. Pure-prune operations (idempotent removals with no new values) do not count.","type":"integer"},"valuesApplied":{"description":"Number of attribute values successfully applied.","type":"integer"},"valuesSkippedDueToLowerPriority":{"description":"Number of attribute values not written because the stored value came from a higher-priority source, whether or not the two values differ. Values kept from an idempotent delete are not counted. Not an error.","type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/BulkUploadErrorRO"}}},"type":"object"},"BulkUploadErrorRO":{"description":"A single rejected row from a bulk upload.","properties":{"section":{"description":"Section of the payload: \"attributes\" or \"userProfiles\".","type":"string","enum":["attributes","userProfiles"]},"index":{"description":"Zero-based index of the offending row within its section.","type":"integer"},"publicId":{"description":"publicId of the user row, if applicable.","type":"string","nullable":true},"attributeKey":{"description":"Attribute key, if applicable.","type":"string","nullable":true},"reason":{"description":"Human-readable reason this row was rejected.","type":"string"}},"type":"object"}}},"paths":{"/v3/properties/{property_id}/attributes/bulk-upload":{"post":{"tags":["Attributes"],"summary":"Bulk upload property-scoped attribute definitions and per-user values.","description":"Users are resolved by (parentCompany, publicId): any user in the property's parent company is a valid target, even if they have never been seen on this specific property. Attribute keys are still filtered by property scope, so cross-scope writes cannot happen.","operationId":"BulkUploadPropertyAttributes","parameters":[{"name":"property_id","in":"path","description":"The property's public ID.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadAttributesDTO"}}}},"responses":{"200":{"description":"All rows applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadAttributesRO"}}}},"207":{"description":"Partial success — some rows rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUploadAttributesRO"}}}},"401":{"description":"Missing or invalid API token"},"403":{"description":"Token's manager is not company admin"},"404":{"description":"Unknown property"},"422":{"description":"Validation failure"},"429":{"description":"Rate limit exceeded — bulk-upload allows 5 requests per minute per client IP, shared across the company and property endpoints, with short bursts up to 10 tolerated. Space batches about 12 seconds apart, or wait a few seconds and retry."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.userlane.com/developers/core-api/attributes/bulk-upload-property-scoped-attribute-definitions-and-per-user-values.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
