# Collections Page

{% openapi src="/files/DFxnj85ZsASPYXzkPAko" path="/api/v3/collections/1/posts" method="get" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}

## add collection post

<mark style="color:green;">`POST`</mark> `https://ushahididocs.api.ushahidi.io/api/v3/collections/2/posts`

#### Request Body

| Name              | Type    | Description                                                                  |
| ----------------- | ------- | ---------------------------------------------------------------------------- |
| form\_id          | String  | Form unique identifier                                                       |
| slug              | String  | Post slug                                                                    |
| type              | String  | Post type                                                                    |
| message           | String  | Additiong message for post                                                   |
| url               | String  | Post URL                                                                     |
| author\_email     | String  | Email address of source                                                      |
| title             | String  | Title of the new post                                                        |
| content           | String  | Post content                                                                 |
| user\_id          | Integer | The user's unique Identifier                                                 |
| author\_realname  | String  | The full name of the Post source                                             |
| status            | String  | The status of post                                                           |
| locale            | String  | Post local language                                                          |
| color             | String  | Post color                                                                   |
| id                | String  | Unique identifier for new post                                               |
| parent\_id        | Integer | Parent ID for new post                                                       |
| values            | Object  | This is an array containing two items, one for the title and the description |
| completed\_stages | Array   | Contains an array of post-completed stage                                    |
| published\_to     | Array   | This contains an array of where the post was published                       |
| source            | String  | Source of post                                                               |
| sets              | Array   | An array of set id's                                                         |
| tags              | Array   | Contains an object of tag Id's                                               |
| contact           | String  | Post contact                                                                 |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "id": 1,
    "url": "http://localhost:8000/api/v3/posts/1",
    "parent_id": null,
    "form": {
        "id": 1,
        "url": "http://localhost:8000/api/v3/forms/1"
    },
    "user_id": null,
    "message": null,
    "color": null,
    "type": "report",
    "title": "Test post",
    "slug": null,
    "content": "Testing post",
    "author_email": null,
    "author_realname": null,
    "status": "published",
    "created": "2013-03-23T03:39:13+00:00",
    "updated": null,
    "locale": "en_us",
    "values": {
        "geometry_test": [
            "MULTIPOLYGON(((40 40,20 45,45 30,40 40)),((20 35,45 20,30 5,10 10,10 30,20 35),(30 20,20 25,20 15,30 20)))"
        ],
        "last_location_point": [
            {
                "lon": 12.123,
                "lat": 21.213
            },
            {
                "lon": 12.223,
                "lat": 21.313
            }
        ],
        "missing_status": [
            "believed_missing"
        ],
        "links": [
            "http://google.com",
            "http://ushahidi.com"
        ],
        "tags1": [
            "3",
            "4"
        ]
    },
    "post_date": "2013-03-22T20:39:13+00:00",
    "tags": [
        {
            "id": 3,
            "url": "http://localhost:8000/api/v3/tags/3"
        },
        {
            "id": 4,
            "url": "http://localhost:8000/api/v3/tags/4"
        }
    ],
    "published_to": [],
    "completed_stages": [],
    "sets": [
        "1"
    ],
    "lock": null,
    "source": null,
    "contact": null,
    "data_source_message_id": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "change_status",
        "read_full"
    ]
}
```

{% endtab %}
{% endtabs %}

{% openapi src="/files/DFxnj85ZsASPYXzkPAko" path="/api/v3/collections/1/posts/9999" method="get" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}

{% openapi src="/files/DFxnj85ZsASPYXzkPAko" path="/api/v3/collections/1/posts/9999" method="delete" %}
[UshahidiV3.json](https://content.gitbook.com/content/tXIYKGMTeHub5C8O9fER/blobs/TC8KXqdBoVrA1ZGmo9Kk/UshahidiV3.json)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ushahidi.com/v3-ushahidi-platform-rest-api-documentation/v3/collections/collections-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
