Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Unique identifier

Example:

"RiHO4e0Ju3DS"

Query Parameters

properties
enum<string>[]

Select the comment properties to return. Comments return only id and object unless other properties are requested. Request author.<property> (for example author.email) to include the author, and files.<property> (for example files.downloadUrl) to include the attached files; both nested objects always carry their id, object and url

Available options:
taskId,
body,
author.createdAt,
author.updatedAt,
author.firstName,
author.lastName,
author.avatar,
author.email,
author.name,
files.name,
files.thumbnail,
files.size,
files.downloadUrl,
files.expiresAt,
files.uploadStatus,
files.mimeType,
createdAt,
updatedAt

Body

application/json
body
string

Comment text as HTML rich text, the same format body is returned in. Supports paragraphs (<p>, <br>), <strong>/<b>, <em>/<i>, <u>, text color (style="color: …"), links and <ul>/<ol> lists. Other blocks such as tables and code are kept as plain paragraphs. Content outside a <p> (for example Asana's <body>One\nTwo</body> or plain text) is split into one paragraph per line, and blank lines are kept. Inside a <p>, newlines are ordinary whitespace. Required unless fileIds is provided

Maximum string length: 100000
Example:

"<p>Uploaded the <strong>signed</strong> contract</p><ul><li>Pages 1–3 initialed</li></ul>"

fileIds
string[]

IDs of files uploaded with Create a file to attach to the comment

Maximum array length: 5
userId
string

ID of the user to author the comment as. Takes precedence over userEmail

Example:

"RiHO4e0Ju3DS"

userEmail
string<email>

Email of the user to author the comment as. Creates a client user when no user has this email

Example:

"jane@acme.com"

Response

The created workspace plan task comment

data
object