Update a task
PUT /accounts/{account_id}/alerts/{alert_id}/mentions/{mention_id}/tasks/{task_id}
Updates a specific task, for instance if the task is done, if the nature of the task changed, or if the task's creator wants to add a comment.
Parameters
account_id
(string) - Id of the accountalert_id
(number) - Id of the alertmention_id
(number) - Id of the mentiontask_id
(number) - Id of the task
Minimal curl example
curl -ig 'https://api.mention.net/api/accounts/{account_id}/alerts/{alert_id}/mentions/{mention_id}/tasks/{task_id}' \
-X PUT \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: 1.19' \
-d '{"done":true}'
As you see in the curl example, there is no minimal requirement in the PUT request in terms of attributes sent. Therefore, you can modify only a single parameter if you wish to.
Available properties
Modifiable attributes are a subset of the POST attributes; they are those marked as "updatable".
Properties | _ | Definition | Example | Updatable |
---|---|---|---|---|
assigned_to_account_id | required | Account id of your team mate being assigned with this task | "12346_oiazuer..." |
NO |
type | optional | Type of assignment. | "reply" |
yes |
comment | optional | Comment of the creator of the task | "check this! deserves a reply this week." |
yes |
done | optional | Boolean indicating whether task was completed or not | false |
yes |
Assigned to account id
assigned_to_account_id
This indicates to whom you wish to assign the task. This is the user ID of that person.
Type
type
For a list of task types, you can fetch the app/data
Comment
comment
This is a plaintext comment of the task.
Done
done
Boolean value indicating if the task was completed or not.
Request example
- Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept-Version: 1.19
- Body
{
"type": "reply",
"comment": "changed it to a reply. done [11/01/2016]",
"done": true
}
Response example
If the request was successful, the response will return the full task data, just as if you did a GET request on that Task.
- Body
{ "task": {...task...} }
{
"id": "140676",
"assigned_to_account": {
"id": "YOUR_TEAMMATE_ACCOUNT_ID",
"name": "R\u00e9mi",
"email": "remi@nasa.com",
"language_code": "en",
"registration_country": "FR",
"inviter_id": "438404_163cnxte",
"created_at": "2015-08-05T14:50:38.0+00:00",
"updated_at": "2016-01-20T15:27:27.0+00:00",
"features": ["mention_feed_filter_unread", "twitter_dashboard", "listening_dashboard", "competitive_dashboard"],
"timezone": "Europe\/Berlin",
"hide_mark_all_read_mentions": false,
"redirector_enabled": false,
"grouped_email_notification": false,
"default_email_notification_frequency": "never",
"default_desktop_notification_frequency": "never",
"default_push_notification_frequency": "hourly",
"bucket": 0
},
"assigned_by_account": {
"id": "YOUR_ACCOUNT_ID",
"name": "John Doe",
"email": "j.doe@nasa.com",
"language_code": "en",
"inviter_id": "326521_3cgnk1be",
"created_at": "2014-09-30T10:03:54.0+00:00",
"updated_at": "2016-01-21T13:26:27.0+00:00",
"avatar_url": "https:\/\/d3gic6glhdnxm.cloudfront.net\/f6415b89f03f697eca5d0c7d464f1b82-089f3f993170d541.jpg",
"features": ["mention_geo_filtering", "stats_email", "alert_wizard_3", "email_grouping", "mention_feed_filter_unread", "twitter_dashboard", "listening_dashboard", "competitive_dashboard"],
"timezone": "Europe\/Berlin",
"hide_mark_all_read_mentions": false,
"redirector_enabled": false,
"grouped_email_notification": true,
"default_email_notification_frequency": "daily",
"default_desktop_notification_frequency": "hourly",
"default_push_notification_frequency": "hourly",
"bucket": 82,
"tester": true
},
"type": "read",
"done": false,
"permissions": {
"mark_done": true,
"delete": true
},
"created_at": "2016-01-21T13:26:27.0+00:00",
"updated_at": "2016-01-21T13:26:27.0+00:00"
}
Assigned to account
assigned_to_account
Information about the account to which the task was assigned.
Assigned by account
assigned_by_account
Information about the account from which the task was assigned.