v3 Ushahidi Platform REST API Documentation
  • V3
    • Overview
    • Login & Register
    • Posts
      • Sub Posts & Translation
    • Tags
    • Configuration
    • Data provider
    • Country Code
    • Tos
    • Permissons
    • Roles
    • Users
      • User Settings
    • Saved Search
    • Collections
      • Collections Page
    • Messages
    • Exports
    • Contacts
    • HXL
    • Media
    • Verifier
    • Migration
    • Notification
    • Layer
    • Webhooks
    • Api Keys
    • Forms
      • Form Attribute
      • Form Contacts
      • Form Role
      • Form Stages
    • CSV
    • Test
  • V5
    • Overview
    • Posts
    • Surveys
    • Categories
Powered by GitBook
On this page
  1. V5

Posts

PreviousOverviewNextSurveys

Get a post

get
Authorizations
Path parameters
idstringRequired
Query parameters
onlystringOptional

Data parameter determine which fields of the post will be returned

Example: id,title
haydratestringOptional

Data parameter determine which relations of the post will be returned

Example: translations
Responses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
get
GET /api/v5/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "results": [
    {
      "id": 1,
      "form_id": 1,
      "user_id": "text",
      "type": "text",
      "title": "text",
      "slug": "text",
      "content": "text",
      "author_email": "text",
      "author_realname": "text",
      "status": "text",
      "published_to": [
        "text"
      ],
      "locale": "text",
      "created": "text",
      "updated": "text",
      "post_date": "text",
      "categories": [
        {
          "id": 1,
          "parent_id": "text",
          "tag": "text",
          "slug": "text",
          "type": "text",
          "color": "text",
          "icon": "text",
          "role": "text",
          "priority": 1,
          "created": "text",
          "base_language": "text",
          "pivot": {
            "post_id": 1,
            "tag_id": 1
          }
        }
      ],
      "post_content": [
        {
          "id": 1,
          "form_id": 1,
          "label": "text",
          "priority": 1,
          "required": 1,
          "type": "text",
          "description": "text",
          "show_when_published": true,
          "task_is_internal_only": true,
          "fields": [
            {
              "id": 1,
              "key": "text",
              "label": "text",
              "instructions": "text",
              "input": "text",
              "type": "text",
              "required": 1,
              "default": "text",
              "priority": 1,
              "options": [
                {
                  "id": 1,
                  "parent_id": "text",
                  "tag": "text",
                  "slug": "text",
                  "type": "text",
                  "color": "text",
                  "icon": "text",
                  "description": "text",
                  "role": "text",
                  "priority": 1,
                  "children": [
                    {
                      "id": 1,
                      "parent_id": 1,
                      "tag": "text",
                      "slug": "text",
                      "type": "text",
                      "color": "text",
                      "icon": "text",
                      "description": "text",
                      "role": "text",
                      "priority": 1,
                      "children": [
                        "text"
                      ],
                      "parent": {
                        "id": 1,
                        "parent_id": "text",
                        "tag": "text",
                        "slug": "text",
                        "type": "text",
                        "color": "text",
                        "icon": "text",
                        "description": "text",
                        "role": "text",
                        "priority": 1,
                        "parent": "text",
                        "translations": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      },
                      "enabled_languages": {
                        "default": "text",
                        "available": [
                          "text"
                        ]
                      },
                      "translations": {
                        "es": {
                          "tag": "text"
                        },
                        "enabled_languages": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      }
                    }
                  ],
                  "parent": {
                    "id": 1,
                    "parent_id": "text",
                    "tag": "text",
                    "slug": "text",
                    "type": "text",
                    "color": "text",
                    "icon": "text",
                    "description": "text",
                    "role": "text",
                    "priority": 1,
                    "parent": "text",
                    "translations": {
                      "es": {
                        "tag": "text"
                      }
                    },
                    "enabled_languages": {
                      "default": "text",
                      "available": [
                        "text"
                      ]
                    }
                  }
                }
              ],
              "cardinality": 1,
              "config": [
                "text"
              ],
              "form_stage_id": 1,
              "response_private": 1,
              "description": "text",
              "translations": [
                "text"
              ],
              "value": {
                "id": 1,
                "post_id": 1,
                "form_attribute_id": 1,
                "value": {
                  "lon": "text",
                  "lat": "text"
                },
                "created": "text",
                "translations": [
                  "text"
                ]
              }
            }
          ],
          "translations": [
            "text"
          ]
        }
      ],
      "completed_stages": [
        {
          "form_stage_id": 1,
          "post_id": 1,
          "completed": 1
        }
      ],
      "translations": [
        "text"
      ],
      "enabled_languages": {
        "default": "text",
        "available": [
          "text"
        ]
      },
      "locks": [
        "text"
      ],
      "allowed_privileges": [
        "text"
      ],
      "message": {
        "id": 1,
        "url": "text"
      },
      "contact": {
        "id": 1,
        "url": "text"
      }
    }
  ],
  "count": 1,
  "links": {
    "first": "text",
    "last": "text",
    "prev": "text",
    "next": "text"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "text",
    "per_page": 1,
    "to": 1,
    "total": 1
  }
}

Delete post

delete
Authorizations
Path parameters
idstringRequired
Responses
200
OK
application/json
403
Forbidden
application/json
delete
DELETE /api/v5/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "result": {
    "deleted": 96
  }
}
  • GETget posts
  • POSTAdd a post
  • GETGet a post
  • PUTEdit post
  • DELETEDelete post
  • PATCHPatch post
  • POSTAdd post in bulk

get posts

get
Authorizations
Query parameters
pagestringOptional

paging parameter

Example: {{random_page}}
onlystringOptional

Data parameter determine which fields of the post will be returned

Example: id,title
hydratestringOptional

Data parameter determine which relations of the post will be returned

Example: translation
Responses
200
OK
application/json
get
GET /api/v5/posts HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "status": 1,
  "message": "text"
}

Add a post

post
Authorizations
Body
all ofOptional
and
anyOptionalExample: {"title":"test title","content":"test description","description":"descrition","type":"report","form_id":1,"locale":"en_US","post_content":[{"id":1,"form_id":1,"label":"Main","priority":1,"required":false,"type":"post","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":7,"key":"last_location","label":"Last Location","input":"text","type":"varchar","required":false,"priority":5,"cardinality":1,"response_private":false,"form_stage_id":1,"translations":[],"value":{"value":"Nairobi"}},{"id":8,"key":"last_location_point","label":"Last Location (point)","input":"location","type":"point","required":false,"priority":5,"cardinality":0,"response_private":false,"form_stage_id":1,"translations":[],"value":{}},{"id":9,"key":"geometry_test","label":"Geometry test","input":"text","type":"geometry","required":false,"priority":5,"cardinality":1,"response_private":false,"form_stage_id":1,"translations":[],"value":{}}],"translations":[]},{"id":2,"form_id":1,"label":"2nd step","priority":2,"required":false,"":"task","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":13,"key":"person_status","label":"Person Status","input":"select","type":"varchar","required":false,"priority":5,"options":["information_sought","is_note_author","believed_alive","believed_missing","believed_dead"],"cardinality":0,"response_private":false,"form_stage_id":2,"translations":[],"value":{}}],"translations":[]}],"completed_stages":[],"published_to":[],"post_date":"2022-08-28T11:51:13","enabled_languages":{},"base_language":""}
Responses
201
Created
application/json
401
Unauthorized
application/json
422
Unprocessable Entity
application/json
500
Internal Server Error
application/json
post
POST /api/v5/posts HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1547

{
  "title": "test title",
  "content": "test description",
  "description": "descrition",
  "type": "report",
  "form_id": 1,
  "locale": "en_US",
  "post_content": [
    {
      "id": 1,
      "form_id": 1,
      "label": "Main",
      "priority": 1,
      "required": false,
      "type": "post",
      "show_when_published": true,
      "task_is_internal_only": false,
      "fields": [
        {
          "id": 7,
          "key": "last_location",
          "label": "Last Location",
          "input": "text",
          "type": "varchar",
          "required": false,
          "priority": 5,
          "cardinality": 1,
          "response_private": false,
          "form_stage_id": 1,
          "translations": [],
          "value": {
            "value": "Nairobi"
          }
        },
        {
          "id": 8,
          "key": "last_location_point",
          "label": "Last Location (point)",
          "input": "location",
          "type": "point",
          "required": false,
          "priority": 5,
          "cardinality": 0,
          "response_private": false,
          "form_stage_id": 1,
          "translations": [],
          "value": {}
        },
        {
          "id": 9,
          "key": "geometry_test",
          "label": "Geometry test",
          "input": "text",
          "type": "geometry",
          "required": false,
          "priority": 5,
          "cardinality": 1,
          "response_private": false,
          "form_stage_id": 1,
          "translations": [],
          "value": {}
        }
      ],
      "translations": []
    },
    {
      "id": 2,
      "form_id": 1,
      "label": "2nd step",
      "priority": 2,
      "required": false,
      "": "task",
      "show_when_published": true,
      "task_is_internal_only": false,
      "fields": [
        {
          "id": 13,
          "key": "person_status",
          "label": "Person Status",
          "input": "select",
          "type": "varchar",
          "required": false,
          "priority": 5,
          "options": [
            "information_sought",
            "is_note_author",
            "believed_alive",
            "believed_missing",
            "believed_dead"
          ],
          "cardinality": 0,
          "response_private": false,
          "form_stage_id": 2,
          "translations": [],
          "value": {}
        }
      ],
      "translations": []
    }
  ],
  "completed_stages": [],
  "published_to": [],
  "post_date": "2022-08-28T11:51:13",
  "enabled_languages": {},
  "base_language": ""
}
{
  "results": [
    {
      "id": 1,
      "form_id": 1,
      "user_id": "text",
      "type": "text",
      "title": "text",
      "slug": "text",
      "content": "text",
      "author_email": "text",
      "author_realname": "text",
      "status": "text",
      "published_to": [
        "text"
      ],
      "locale": "text",
      "created": "text",
      "updated": "text",
      "post_date": "text",
      "categories": [
        {
          "id": 1,
          "parent_id": "text",
          "tag": "text",
          "slug": "text",
          "type": "text",
          "color": "text",
          "icon": "text",
          "role": "text",
          "priority": 1,
          "created": "text",
          "base_language": "text",
          "pivot": {
            "post_id": 1,
            "tag_id": 1
          }
        }
      ],
      "post_content": [
        {
          "id": 1,
          "form_id": 1,
          "label": "text",
          "priority": 1,
          "required": 1,
          "type": "text",
          "description": "text",
          "show_when_published": true,
          "task_is_internal_only": true,
          "fields": [
            {
              "id": 1,
              "key": "text",
              "label": "text",
              "instructions": "text",
              "input": "text",
              "type": "text",
              "required": 1,
              "default": "text",
              "priority": 1,
              "options": [
                {
                  "id": 1,
                  "parent_id": "text",
                  "tag": "text",
                  "slug": "text",
                  "type": "text",
                  "color": "text",
                  "icon": "text",
                  "description": "text",
                  "role": "text",
                  "priority": 1,
                  "children": [
                    {
                      "id": 1,
                      "parent_id": 1,
                      "tag": "text",
                      "slug": "text",
                      "type": "text",
                      "color": "text",
                      "icon": "text",
                      "description": "text",
                      "role": "text",
                      "priority": 1,
                      "children": [
                        "text"
                      ],
                      "parent": {
                        "id": 1,
                        "parent_id": "text",
                        "tag": "text",
                        "slug": "text",
                        "type": "text",
                        "color": "text",
                        "icon": "text",
                        "description": "text",
                        "role": "text",
                        "priority": 1,
                        "parent": "text",
                        "translations": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      },
                      "enabled_languages": {
                        "default": "text",
                        "available": [
                          "text"
                        ]
                      },
                      "translations": {
                        "es": {
                          "tag": "text"
                        },
                        "enabled_languages": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      }
                    }
                  ],
                  "parent": {
                    "id": 1,
                    "parent_id": "text",
                    "tag": "text",
                    "slug": "text",
                    "type": "text",
                    "color": "text",
                    "icon": "text",
                    "description": "text",
                    "role": "text",
                    "priority": 1,
                    "parent": "text",
                    "translations": {
                      "es": {
                        "tag": "text"
                      }
                    },
                    "enabled_languages": {
                      "default": "text",
                      "available": [
                        "text"
                      ]
                    }
                  }
                }
              ],
              "cardinality": 1,
              "config": [
                "text"
              ],
              "form_stage_id": 1,
              "response_private": 1,
              "description": "text",
              "translations": [
                "text"
              ],
              "value": {
                "id": 1,
                "post_id": 1,
                "form_attribute_id": 1,
                "value": {
                  "lon": "text",
                  "lat": "text"
                },
                "created": "text",
                "translations": [
                  "text"
                ]
              }
            }
          ],
          "translations": [
            "text"
          ]
        }
      ],
      "completed_stages": [
        {
          "form_stage_id": 1,
          "post_id": 1,
          "completed": 1
        }
      ],
      "translations": [
        "text"
      ],
      "enabled_languages": {
        "default": "text",
        "available": [
          "text"
        ]
      },
      "locks": [
        "text"
      ],
      "allowed_privileges": [
        "text"
      ],
      "message": {
        "id": 1,
        "url": "text"
      },
      "contact": {
        "id": 1,
        "url": "text"
      }
    }
  ],
  "count": 1,
  "links": {
    "first": "text",
    "last": "text",
    "prev": "text",
    "next": "text"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "text",
    "per_page": 1,
    "to": 1,
    "total": 1
  }
}

Edit post

put
Authorizations
Path parameters
idstringRequired
Body
all ofOptional
and
anyOptionalExample: {"title":"test title 2","content":"test description","description":"descrition","type":"report","form_id":1,"locale":"en_US","post_content":[{"id":1,"form_id":1,"label":"Main","priority":1,"required":false,"type":"post","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":8,"key":"last_location_point","label":"Last Location (point)","input":"location","type":"point","required":false,"priority":5,"cardinality":0,"response_private":false,"form_stage_id":1,"translations":[],"value":{}},{"id":9,"key":"geometry_test","label":"Geometry test","input":"text","type":"geometry","required":false,"priority":5,"cardinality":1,"response_private":false,"form_stage_id":1,"translations":[],"value":{}}],"translations":[]},{"id":2,"form_id":1,"label":"2nd step","priority":2,"required":false,"":"task","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":13,"key":"person_status","label":"Person Status","input":"select","type":"varchar","required":false,"priority":5,"options":["information_sought","is_note_author","believed_alive","believed_missing","believed_dead"],"cardinality":0,"response_private":false,"form_stage_id":2,"translations":[],"value":{}}],"translations":[]}],"completed_stages":[],"published_to":[],"post_date":"2022-12-28T11:51:13","enabled_languages":{},"base_language":""}
Responses
200
OK
application/json
500
Internal Server Error
application/json
put
PUT /api/v5/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1327

{
  "title": "test title 2",
  "content": "test description",
  "description": "descrition",
  "type": "report",
  "form_id": 1,
  "locale": "en_US",
  "post_content": [
    {
      "id": 1,
      "form_id": 1,
      "label": "Main",
      "priority": 1,
      "required": false,
      "type": "post",
      "show_when_published": true,
      "task_is_internal_only": false,
      "fields": [
        {
          "id": 8,
          "key": "last_location_point",
          "label": "Last Location (point)",
          "input": "location",
          "type": "point",
          "required": false,
          "priority": 5,
          "cardinality": 0,
          "response_private": false,
          "form_stage_id": 1,
          "translations": [],
          "value": {}
        },
        {
          "id": 9,
          "key": "geometry_test",
          "label": "Geometry test",
          "input": "text",
          "type": "geometry",
          "required": false,
          "priority": 5,
          "cardinality": 1,
          "response_private": false,
          "form_stage_id": 1,
          "translations": [],
          "value": {}
        }
      ],
      "translations": []
    },
    {
      "id": 2,
      "form_id": 1,
      "label": "2nd step",
      "priority": 2,
      "required": false,
      "": "task",
      "show_when_published": true,
      "task_is_internal_only": false,
      "fields": [
        {
          "id": 13,
          "key": "person_status",
          "label": "Person Status",
          "input": "select",
          "type": "varchar",
          "required": false,
          "priority": 5,
          "options": [
            "information_sought",
            "is_note_author",
            "believed_alive",
            "believed_missing",
            "believed_dead"
          ],
          "cardinality": 0,
          "response_private": false,
          "form_stage_id": 2,
          "translations": [],
          "value": {}
        }
      ],
      "translations": []
    }
  ],
  "completed_stages": [],
  "published_to": [],
  "post_date": "2022-12-28T11:51:13",
  "enabled_languages": {},
  "base_language": ""
}
{
  "results": [
    {
      "id": 1,
      "form_id": 1,
      "user_id": "text",
      "type": "text",
      "title": "text",
      "slug": "text",
      "content": "text",
      "author_email": "text",
      "author_realname": "text",
      "status": "text",
      "published_to": [
        "text"
      ],
      "locale": "text",
      "created": "text",
      "updated": "text",
      "post_date": "text",
      "categories": [
        {
          "id": 1,
          "parent_id": "text",
          "tag": "text",
          "slug": "text",
          "type": "text",
          "color": "text",
          "icon": "text",
          "role": "text",
          "priority": 1,
          "created": "text",
          "base_language": "text",
          "pivot": {
            "post_id": 1,
            "tag_id": 1
          }
        }
      ],
      "post_content": [
        {
          "id": 1,
          "form_id": 1,
          "label": "text",
          "priority": 1,
          "required": 1,
          "type": "text",
          "description": "text",
          "show_when_published": true,
          "task_is_internal_only": true,
          "fields": [
            {
              "id": 1,
              "key": "text",
              "label": "text",
              "instructions": "text",
              "input": "text",
              "type": "text",
              "required": 1,
              "default": "text",
              "priority": 1,
              "options": [
                {
                  "id": 1,
                  "parent_id": "text",
                  "tag": "text",
                  "slug": "text",
                  "type": "text",
                  "color": "text",
                  "icon": "text",
                  "description": "text",
                  "role": "text",
                  "priority": 1,
                  "children": [
                    {
                      "id": 1,
                      "parent_id": 1,
                      "tag": "text",
                      "slug": "text",
                      "type": "text",
                      "color": "text",
                      "icon": "text",
                      "description": "text",
                      "role": "text",
                      "priority": 1,
                      "children": [
                        "text"
                      ],
                      "parent": {
                        "id": 1,
                        "parent_id": "text",
                        "tag": "text",
                        "slug": "text",
                        "type": "text",
                        "color": "text",
                        "icon": "text",
                        "description": "text",
                        "role": "text",
                        "priority": 1,
                        "parent": "text",
                        "translations": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      },
                      "enabled_languages": {
                        "default": "text",
                        "available": [
                          "text"
                        ]
                      },
                      "translations": {
                        "es": {
                          "tag": "text"
                        },
                        "enabled_languages": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      }
                    }
                  ],
                  "parent": {
                    "id": 1,
                    "parent_id": "text",
                    "tag": "text",
                    "slug": "text",
                    "type": "text",
                    "color": "text",
                    "icon": "text",
                    "description": "text",
                    "role": "text",
                    "priority": 1,
                    "parent": "text",
                    "translations": {
                      "es": {
                        "tag": "text"
                      }
                    },
                    "enabled_languages": {
                      "default": "text",
                      "available": [
                        "text"
                      ]
                    }
                  }
                }
              ],
              "cardinality": 1,
              "config": [
                "text"
              ],
              "form_stage_id": 1,
              "response_private": 1,
              "description": "text",
              "translations": [
                "text"
              ],
              "value": {
                "id": 1,
                "post_id": 1,
                "form_attribute_id": 1,
                "value": {
                  "lon": "text",
                  "lat": "text"
                },
                "created": "text",
                "translations": [
                  "text"
                ]
              }
            }
          ],
          "translations": [
            "text"
          ]
        }
      ],
      "completed_stages": [
        {
          "form_stage_id": 1,
          "post_id": 1,
          "completed": 1
        }
      ],
      "translations": [
        "text"
      ],
      "enabled_languages": {
        "default": "text",
        "available": [
          "text"
        ]
      },
      "locks": [
        "text"
      ],
      "allowed_privileges": [
        "text"
      ],
      "message": {
        "id": 1,
        "url": "text"
      },
      "contact": {
        "id": 1,
        "url": "text"
      }
    }
  ],
  "count": 1,
  "links": {
    "first": "text",
    "last": "text",
    "prev": "text",
    "next": "text"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "text",
    "per_page": 1,
    "to": 1,
    "total": 1
  }
}

Patch post

patch
Authorizations
Path parameters
idstringRequired
Body
all ofOptional
and
anyOptionalExample: {"status":"draft"}
Responses
200
OK
application/json
422
Unprocessable Entity
application/json
patch
PATCH /api/v5/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "status": "draft"
}
{
  "results": [
    {
      "id": 1,
      "form_id": 1,
      "user_id": "text",
      "type": "text",
      "title": "text",
      "slug": "text",
      "content": "text",
      "author_email": "text",
      "author_realname": "text",
      "status": "text",
      "published_to": [
        "text"
      ],
      "locale": "text",
      "created": "text",
      "updated": "text",
      "post_date": "text",
      "categories": [
        {
          "id": 1,
          "parent_id": "text",
          "tag": "text",
          "slug": "text",
          "type": "text",
          "color": "text",
          "icon": "text",
          "role": "text",
          "priority": 1,
          "created": "text",
          "base_language": "text",
          "pivot": {
            "post_id": 1,
            "tag_id": 1
          }
        }
      ],
      "post_content": [
        {
          "id": 1,
          "form_id": 1,
          "label": "text",
          "priority": 1,
          "required": 1,
          "type": "text",
          "description": "text",
          "show_when_published": true,
          "task_is_internal_only": true,
          "fields": [
            {
              "id": 1,
              "key": "text",
              "label": "text",
              "instructions": "text",
              "input": "text",
              "type": "text",
              "required": 1,
              "default": "text",
              "priority": 1,
              "options": [
                {
                  "id": 1,
                  "parent_id": "text",
                  "tag": "text",
                  "slug": "text",
                  "type": "text",
                  "color": "text",
                  "icon": "text",
                  "description": "text",
                  "role": "text",
                  "priority": 1,
                  "children": [
                    {
                      "id": 1,
                      "parent_id": 1,
                      "tag": "text",
                      "slug": "text",
                      "type": "text",
                      "color": "text",
                      "icon": "text",
                      "description": "text",
                      "role": "text",
                      "priority": 1,
                      "children": [
                        "text"
                      ],
                      "parent": {
                        "id": 1,
                        "parent_id": "text",
                        "tag": "text",
                        "slug": "text",
                        "type": "text",
                        "color": "text",
                        "icon": "text",
                        "description": "text",
                        "role": "text",
                        "priority": 1,
                        "parent": "text",
                        "translations": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      },
                      "enabled_languages": {
                        "default": "text",
                        "available": [
                          "text"
                        ]
                      },
                      "translations": {
                        "es": {
                          "tag": "text"
                        },
                        "enabled_languages": {
                          "es": {
                            "tag": "text"
                          }
                        }
                      }
                    }
                  ],
                  "parent": {
                    "id": 1,
                    "parent_id": "text",
                    "tag": "text",
                    "slug": "text",
                    "type": "text",
                    "color": "text",
                    "icon": "text",
                    "description": "text",
                    "role": "text",
                    "priority": 1,
                    "parent": "text",
                    "translations": {
                      "es": {
                        "tag": "text"
                      }
                    },
                    "enabled_languages": {
                      "default": "text",
                      "available": [
                        "text"
                      ]
                    }
                  }
                }
              ],
              "cardinality": 1,
              "config": [
                "text"
              ],
              "form_stage_id": 1,
              "response_private": 1,
              "description": "text",
              "translations": [
                "text"
              ],
              "value": {
                "id": 1,
                "post_id": 1,
                "form_attribute_id": 1,
                "value": {
                  "lon": "text",
                  "lat": "text"
                },
                "created": "text",
                "translations": [
                  "text"
                ]
              }
            }
          ],
          "translations": [
            "text"
          ]
        }
      ],
      "completed_stages": [
        {
          "form_stage_id": 1,
          "post_id": 1,
          "completed": 1
        }
      ],
      "translations": [
        "text"
      ],
      "enabled_languages": {
        "default": "text",
        "available": [
          "text"
        ]
      },
      "locks": [
        "text"
      ],
      "allowed_privileges": [
        "text"
      ],
      "message": {
        "id": 1,
        "url": "text"
      },
      "contact": {
        "id": 1,
        "url": "text"
      }
    }
  ],
  "count": 1,
  "links": {
    "first": "text",
    "last": "text",
    "prev": "text",
    "next": "text"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "text",
    "per_page": 1,
    "to": 1,
    "total": 1
  }
}

Add post in bulk

post
Authorizations
Body
all ofOptional
and
anyOptionalExample: {"operation":"patch","items":[{"id":10006,"user_id":2,"form_id":1,"type":"report","author_email":"admin@ushahidi.com","author_realname":"Admin","status":"published","created":"2022-09-02T11:52:01+00:00","locale":"en_us","values":{"test_point":[{"lon":28.410584460421,"lat":7.2229816056086}],"last_location":["Nairobi"]},"post_date":"2022-09-02T11:51:13+00:00","tags":[],"published_to":[],"completed_stages":[],"sets":["1"]},{"id":10005,"user_id":2,"form_id":1,"type":"report","author_email":"admin@ushahidi.com","author_realname":"Admin","status":"published","created":"2022-09-02T11:52:01+00:00","locale":"en_us","values":{"test_point":[{"lon":28.410584460421,"lat":7.2229816056086}],"last_location":["Nairobi"]},"post_date":"2022-09-02T11:51:13+00:00","tags":[],"published_to":[],"completed_stages":[],"sets":["1"]}]}
Responses
200
OK
application/json
422
Unprocessable Entity
application/json
post
POST /api/v5/posts/bulk HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 819

{
  "operation": "patch",
  "items": [
    {
      "id": 10006,
      "user_id": 2,
      "form_id": 1,
      "type": "report",
      "author_email": "admin@ushahidi.com",
      "author_realname": "Admin",
      "status": "published",
      "created": "2022-09-02T11:52:01+00:00",
      "locale": "en_us",
      "values": {
        "test_point": [
          {
            "lon": 28.410584460421,
            "lat": 7.2229816056086
          }
        ],
        "last_location": [
          "Nairobi"
        ]
      },
      "post_date": "2022-09-02T11:51:13+00:00",
      "tags": [],
      "published_to": [],
      "completed_stages": [],
      "sets": [
        "1"
      ]
    },
    {
      "id": 10005,
      "user_id": 2,
      "form_id": 1,
      "type": "report",
      "author_email": "admin@ushahidi.com",
      "author_realname": "Admin",
      "status": "published",
      "created": "2022-09-02T11:52:01+00:00",
      "locale": "en_us",
      "values": {
        "test_point": [
          {
            "lon": 28.410584460421,
            "lat": 7.2229816056086
          }
        ],
        "last_location": [
          "Nairobi"
        ]
      },
      "post_date": "2022-09-02T11:51:13+00:00",
      "tags": [],
      "published_to": [],
      "completed_stages": [],
      "sets": [
        "1"
      ]
    }
  ]
}
{
  "status": "completed"
}