Asana: Users schemas
11 Asana schemas with complete fields and constraints.
← Users operations · All schemas
Get a user in a workspace or organization — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
opt_pretty | boolean | Optional | |
opt_fields | array | Optional | |
opt_fields[] | string | Each item | One of: custom_fields, custom_fields.date_value, custom_fields.date_value.date, custom_fields.date_value.date_time, custom_fields.display_value, custom_fields.enabled, custom_fields.enum_options, custom_fields.enum_options.color, custom_fields.enum_options.enabled, custom_fields.enum_options.name, custom_fields.enum_value, custom_fields.enum_value.color, custom_fields.enum_value.enabled, custom_fields.enum_value.name, custom_fields.id_prefix, custom_fields.input_restrictions, custom_fields.is_formula_field, custom_fields.is_lookup_field, custom_fields.multi_enum_values, custom_fields.multi_enum_values.color, custom_fields.multi_enum_values.enabled, custom_fields.multi_enum_values.name, custom_fields.name, custom_fields.number_value, custom_fields.representation_type, custom_fields.text_value, custom_fields.type, email, name, photo, photo.image_1024x1024, photo.image_128x128, photo.image_21x21, photo.image_27x27, photo.image_36x36, photo.image_60x60, workspaces, workspaces.name |
Get a user — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
opt_pretty | boolean | Optional | |
workspace | string | Optional | |
opt_fields | array | Optional | |
opt_fields[] | string | Each item | One of: custom_fields, custom_fields.date_value, custom_fields.date_value.date, custom_fields.date_value.date_time, custom_fields.display_value, custom_fields.enabled, custom_fields.enum_options, custom_fields.enum_options.color, custom_fields.enum_options.enabled, custom_fields.enum_options.name, custom_fields.enum_value, custom_fields.enum_value.color, custom_fields.enum_value.enabled, custom_fields.enum_value.name, custom_fields.id_prefix, custom_fields.input_restrictions, custom_fields.is_formula_field, custom_fields.is_lookup_field, custom_fields.multi_enum_values, custom_fields.multi_enum_values.color, custom_fields.multi_enum_values.enabled, custom_fields.multi_enum_values.name, custom_fields.name, custom_fields.number_value, custom_fields.representation_type, custom_fields.text_value, custom_fields.type, email, name, photo, photo.image_1024x1024, photo.image_128x128, photo.image_21x21, photo.image_27x27, photo.image_36x36, photo.image_60x60, workspaces, workspaces.name |
Get a user — response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Get a user — response body — data data — sdk__User Response |
Referenced models: Get a user — response body — data data — sdk__User Response
Get a user — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A map of the user's profile photo in various sizes, or null if no photo is set. Sizes provided are 21, 27, 36, 60, 128, and 1024. All images are in PNG format, except for 1024 (which is in JPEG format). Read only: true |
image_21x21 | string | Optional | PNG image of the user at 21x21 pixels. Format: uri |
image_27x27 | string | Optional | PNG image of the user at 27x27 pixels. Format: uri |
image_36x36 | string | Optional | PNG image of the user at 36x36 pixels. Format: uri |
image_60x60 | string | Optional | PNG image of the user at 60x60 pixels. Format: uri |
image_128x128 | string | Optional | PNG image of the user at 128x128 pixels. Format: uri |
image_1024x1024 | string | Optional | JPEG image of the user at 1024x1024 pixels. Format: uri |
Get a user — response body — data data — User Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Add a user to a workspace or organization — response body — data data — User Base Response |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).workspaces | array | Optional | Workspaces and organizations this user may access. Note\: The API will only return workspaces and organizations that also contain the authenticated user. Read only: true |
$ (allOf 2).workspaces[] | Model | Each item | Expand Update a workspace — request body — body data |
$ (allOf 2).custom_fields | array | Optional | Array of Custom Fields. |
$ (allOf 2).custom_fields[] | Model | Each item | Expand Get a membership — response body — data / data / access_level: admin, editor, user parent |
Referenced models: Get a membership — response body — data / data / access_level: admin, editor, user parent, Add a user to a workspace or organization — response body — data data — User Base Response, Update a workspace — request body — body data
Get a user — response body — data data — sdk__User Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
name | string | Optional | *Read-only except when same user as requester*. The user's name. |
email | string | Optional | The user's email address. Format: email Read only: true |
photo | JSON | Optional | |
photo (anyOf 1) | Model | Alternative | Expand Get a user — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60 |
photo (anyOf 2) | null | Alternative | |
workspaces | array | Optional | Workspaces and organizations this user may access. Note\: The API will only return workspaces and organizations that also contain the authenticated user. Read only: true |
workspaces[] | Model | Each item | Expand Get a tag — response body — data data workspace |
custom_fields | array | Optional | Array of Custom Fields. |
custom_fields[] | Model | Each item | Expand Get a goal — response body — data data custom fields item |
Referenced models: Get a goal — response body — data data custom fields item, Get a user — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60, Get a tag — response body — data data workspace
Get a user's favorites — response body — data, next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Get objects via typeahead — response body — data data item |
next_page | Model | Optional | Expand Get goals — response body — data, next page next page |
Referenced models: Get objects via typeahead — response body — data data item, Get goals — response body — data, next page next page
Get multiple users — response body — data, next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Get a user — response body — data data — sdk__User Response |
next_page | Model | Optional | Expand Get goals — response body — data, next page next page |
Referenced models: Get goals — response body — data, next page next page, Get a user — response body — data data — sdk__User Response
Get users in a team — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
opt_pretty | boolean | Optional | |
offset | string | Optional | |
opt_fields | array | Optional | |
opt_fields[] | string | Each item | One of: custom_fields, custom_fields.date_value, custom_fields.date_value.date, custom_fields.date_value.date_time, custom_fields.display_value, custom_fields.enabled, custom_fields.enum_options, custom_fields.enum_options.color, custom_fields.enum_options.enabled, custom_fields.enum_options.name, custom_fields.enum_value, custom_fields.enum_value.color, custom_fields.enum_value.enabled, custom_fields.enum_value.name, custom_fields.id_prefix, custom_fields.input_restrictions, custom_fields.is_formula_field, custom_fields.is_lookup_field, custom_fields.multi_enum_values, custom_fields.multi_enum_values.color, custom_fields.multi_enum_values.enabled, custom_fields.multi_enum_values.name, custom_fields.name, custom_fields.number_value, custom_fields.representation_type, custom_fields.text_value, custom_fields.type, email, name, photo, photo.image_1024x1024, photo.image_128x128, photo.image_21x21, photo.image_27x27, photo.image_36x36, photo.image_60x60, workspaces, workspaces.name |
Get users in a team — response body — data data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
name | string | Optional | *Read-only except when same user as requester*. The user's name. |
Update a user — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get users in a team — response body — data data item |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).custom_fields | object | Optional | An object where each key is the GID of a custom field and its corresponding value is either an enum GID, string, number, or object (depending on the custom field type). See the [custom fields guide](/docs/custom-fields-guide) for details on creating and updating custom field values. Additional keys: see wildcard field |
$ (allOf 2).custom_fields.* | string | Additional keys | "{custom_field_gid}" => Value (can be text, enum GID, a number, etc.). For date, use format "YYYY-MM-DD" (e.g., 2019-09-15). For date-time, use ISO 8601 date string in UTC (e.g., 2019-09-15T02:06:58.147Z). |
$ (allOf 2).html_custom_fields | object | Optional | An object where each key is the GID of a text custom field and the corresponding value is a rich text HTML string. Only text-type custom fields support this parameter. Values must be wrapped in <body></body> tags. See the [custom fields guide](/docs/custom-fields-guide) and [rich text](/docs/rich-text) for details on supported formatting. Additional keys: see wildcard field |
$ (allOf 2).html_custom_fields.* | string | Additional keys | "{custom_field_gid}" => HTML string (e.g., "<body>Text content</body>") |
Referenced models: Get users in a team — response body — data data item