Create a task
POST /accounts/{account_id}/alerts/{alert_id}/mentions/{mention_id}/tasks
Creates a new task for a given mention.
parameters
account_id
(string) - id of the accountalert_id
(number) - id of the alertmention_id
(number) - id of the mention
Page content
Minimal curl example
curl -ig 'https://api.mention.net/api/accounts/{account_id}/alerts/{alert_id}/mentions/{mention_id}/tasks' \
-X POST \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: 1.19' \
-d '{
"type": "read",
"assigned_to_account_id": "YOUR_TEAMMATE_ACCOUNT_ID"
}'
Available properties
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": "read",
"assigned_to_account_id": 12345_almkrej3LJ4KJlkdk93713Kfkkskfh88,
"comment": "should be read by everyone in the team",
"done": false
}
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... } }
Task
{...task...}
It is a json object of the following form:
{
"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.