> 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/models.md). Agents can also search and read this documentation through its [MCP server](https://docs.userlane.com/~gitbook/mcp).

# Models

## The BulkAttributeDefinitionDTO object

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"components":{"schemas":{"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"}}}}
```

## The BulkUploadAttributesDTO object

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"components":{"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"}}}}
```

## The BulkUploadAttributesRO object

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"components":{"schemas":{"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"}}}}
```

## The BulkUploadErrorRO object

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"components":{"schemas":{"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"}}}}
```

## The BulkUserProfileDTO object

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"components":{"schemas":{"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"}}}}
```

## The EndUserRO object

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"components":{"schemas":{"EndUserRO":{"title":"EndUserRO","description":"End User Response Object","properties":{"id":{"description":"ID","type":"string"},"userlaneId":{"description":"Userlane public ID","type":"string"},"timeCreated":{"description":"Creation timestamp","type":"string","format":"date-time"},"firstSeenAt":{"description":"First seen timestamp","type":"string","format":"date-time"},"lastSeenAt":{"description":"Last seen timestamp","type":"string","format":"date-time"},"applicationAttributes":{"description":"Application specific attributes","type":"object","additionalProperties":true},"companyAttributes":{"description":"Company specific attributes","type":"object","additionalProperties":true}},"type":"object"}}}}
```

## The UserProfileDTO object

```json
{"openapi":"3.0.0","info":{"title":"Mothership API","version":"2.0"},"components":{"schemas":{"UserProfileDTO":{"title":"UserProfileDTO","description":"User Profile DTO","properties":{"attributes":{"description":"$attributes","type":"object"}},"type":"object"}}}}
```


---

# 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/models.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.
