Create a Status
This endpoint creates a status
info
This operation requires authentication.
HTTP Request
POST /api/v2/status/
Parameters
info
By passing a category id that has parents defined, the system will automatically ascend the category graph based on the parents and will also automatically add the parents category ids to the status.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| » action | body | string¦null | true | The action of the status |
| » text | body | string | false | The content of the status in html format, it can contain some mentions |
| » categories | body | list(integer) | true | List of Category ids |
| » medias | body | list(integer) | false | List of Media (only one media of type share is allowed) ids |
| » location | body | object¦null | false | The Location object to associate with the status |
| »» location | body | string¦null | true | Location name |
| »» lat | body | number¦null | true | Location latitude |
| »» lng | body | number¦null | true | Location longitude |
| » addressing | body | list(integer) | false | List of Tag ids |
Example Body Parameters
- JSON
{
"action": "string",
"text": "string",
"categories": ["integer"],
"medias": ["integer"],
"location": {
"location": "string",
"lat": "integer",
"lng": "integer"
},
"addressing": ["integer"],
"tags": ["integer"]
}
Example Request
- JavaScript
- Bash
const inputBody = '{
"action": "string",
"text": "string",
"categories": ["integer"],
"medias": ["integer"],
"location": {
"location": "string",
"lat": "integer",
"lng": "integer"
},
"addressing": ["integer"],
"tags": ["integer"]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/status/',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X POST /api/v2/status/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
--data-raw '{
"action": "string",
"text": "string",
"categories": ["integer"],
"medias": ["integer"],
"location": {
"location": "string",
"lat": "integer",
"lng": "integer"
},
"addressing": ["integer"],
"tags": ["integer"]
}'
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Response status code | Status |
Example responses
- 200
{
"id": "integer",
"type": "string",
"last_activity_at": "string",
"author": {User},
"added_at": "string",
"last_edited_at": "string",
"html": "string",
"summary": "string",
"deleted": "boolean",
"collapsed": "boolean",
"comment_count": "integer",
"view_count": "integer",
"vote_count": "integer",
"reactions_count": [{Reaction}],
"voted": "boolean",
"reaction": {Reaction},
"follower_count": "integer",
"followed": "boolean",
"suspended": "boolean",
"flag_count": "integer",
"share_count": "integer",
"slug": "string",
"categories": [{Category}],
"medias": [{Media}],
"location": {Location},
"addressing": ["integer"],
"tags": ["integer"]
}