Skip to main content

API V1 (v0.2)

Download OpenAPI specification:Download

A RestFull API for Decidim, to be able to CRUD resources from Decidim.

Authentication

Get a token from our /oauth/token routes, following OAuth specs on Credential Flows or Resource Owner Password Credentials Flow.

Permissions

A permission system is attached to the created OAuth application, that is designed in two levels:

  • scope: a broad permission to access a collection of endpoints
  • abilities: a fine grained permission system that allow actions.

The scopes and abilities are manageable in your System Admin Panel.

Multi-tenant

Decidim is multi-tenant, and this API supports it.

  • The system scope endpoints are available in any tenant
  • The tenant host attribute will be used to guess which tenant you are requesting. For example, given a tenant example.org and foobar.org, the endpoint
    • example.org/oauth/token will ask a token for the example.org organization
    • foobar.org/oauth/token for foobar.org.

OAuth

Use OAuth to get tokens and interact with the API. You can use machine-to-machine tokens, or user token directly with the API.

  • Machine-to-machine: Client Credential Flow
  • User: Resource Owner Password Credential Flow, with impersonation or login

Request a OAuth token throught ROPC

Create a oauth token for the given scopes

Request Body schema: application/json
required
One of
grant_type
required
string
Value: "client_credentials"

Client Credential Flow, for machine-to-machine

client_id
required
string

OAuth application Client Id

client_secret
required
string

OAuth application Client Secret

scope
required
string
Enum: "public" "spaces" "system" "proposals" "meetings" "debates" "pages" "blogs" "oauth"

Requested scopes

Responses

Request samples

Content type
application/json
Example
{
  • "grant_type": "client_credentials",
  • "client_id": "string",
  • "client_secret": "string",
  • "scope": "public"
}

Response samples

Content type
application/json
Example
{
  • "access_token": "8M25D5p6rWd-yVYNIEJtI-KKayBdnx4VomTwu7Bg09s",
  • "token_type": "Bearer",
  • "expires_in": 7200,
  • "scope": "public proposals",
  • "created_at": 1751351082
}

Introspect a OAuth token

Get given oauth token details

Authorizations:
credentialFlowBearerresourceOwnerFlowBearer
Request Body schema: application/json
required
token
required
string

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
Example
{
  • "active": true,
  • "scope": "public",
  • "client_id": "yy1zvAQtoW8EU_rTxLGKNcVaIMwsLS3oBSQyxMdpEak",
  • "token_type": "Bearer",
  • "exp": 3505380440,
  • "iat": 1751351020,
  • "sub": 3993,
  • "resource": {
    }
}

Organizations

Organization controls the main configuration of the platform. As you can host many Decidim in the same platform, organizations allows you to setup:

  • host: the domain name used by your decidim
  • secondary_hosts: other domain names, used for redirecting to the correct organizati

The current organization is guessed from the host of the request, you can thus query the API on different hosts to gather organization's related data.

Organization

Show organization

Authorizations:
credentialFlowBearer
path Parameters
id
required
string

The ID of the organization

query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update organization

This endpoint allows you to update an organization.

Update host

To update the host, send in your payload the host attribute. It will be saved as an unconfirmed_host extended data attribute. Once saved, a job will be enqueued to reverse DNS the unconfirmed host before actually updating the host. The host attribute must be unique across all organizations. More information on this update process is documented in the Safe host update page.

Update name

To update the name, send in your payload the name attribute. The name attribute must be unique across all organizations.

Authorizations:
credentialFlowBearer
path Parameters
id
required
string

The ID of the organization

Request Body schema: application/json
required
required
object (Organization Attributes)
required
object (Translated data)

Hash with translated data, key=locale value=translation

object (Translated data)

Hash with translated data, key=locale value=translation

reference_prefix
string

Prefix for the organization. Used to prefix uplodaded files and reference resources

host
required
string
send_welcome_notification
boolean

True if welcome email is sent to users

secondary_hosts
Array of strings
available_locales
required
Array of strings (Available locales)
Items Enum: "en" "fr"
default_locale
required
string

defaut locale for the organization

users_registration_mode
string
Enum: "enabled" "existing" "disabled"

Define user registration mode:

  • enabled: Enable users registration
  • existing: Existing users will be able to login. Registration will be disabled.
  • disabled: No registration enabled
force_users_to_authenticate_before_access_organization
boolean

Force users to authenticate before accessing the organization (disabled if users_registration_mode is disabled)

badges_enabled
boolean

Enable badges for public views

enable_participatory_space_filters
boolean

Display areas and scopes filter in public views.

enable_machine_translations
boolean

Enable machine translations (must be configured, see Using machine translations)

user_groups_enabled
boolean

Enable user groups in public views

time_zone
string (Time Zone)
Enum: "Africa/Algiers" "Africa/Cairo" "Africa/Casablanca" "Africa/Harare" "Africa/Johannesburg" "Africa/Monrovia" "Africa/Nairobi" "America/Argentina/Buenos_Aires" "America/Bogota" "America/Caracas" "America/Chicago" "America/Chihuahua" "America/Denver" "America/Godthab" "America/Guatemala" "America/Guyana" "America/Halifax" "America/Indiana/Indianapolis" "America/Juneau" "America/La_Paz" "America/Lima" "America/Lima" "America/Los_Angeles" "America/Mazatlan" "America/Mexico_City" "America/Mexico_City" "America/Monterrey" "America/Montevideo" "America/New_York" "America/Phoenix" "America/Puerto_Rico" "America/Regina" "America/Santiago" "America/Sao_Paulo" "America/St_Johns" "America/Tijuana" "Asia/Almaty" "Asia/Baghdad" "Asia/Baku" "Asia/Bangkok" "Asia/Bangkok" "Asia/Chongqing" "Asia/Colombo" "Asia/Dhaka" "Asia/Dhaka" "Asia/Hong_Kong" "Asia/Irkutsk" "Asia/Jakarta" "Asia/Jerusalem" "Asia/Kabul" "Asia/Kamchatka" "Asia/Karachi" "Asia/Karachi" "Asia/Kathmandu" "Asia/Kolkata" "Asia/Kolkata" "Asia/Kolkata" "Asia/Kolkata" "Asia/Krasnoyarsk" "Asia/Kuala_Lumpur" "Asia/Kuwait" "Asia/Magadan" "Asia/Muscat" "Asia/Muscat" "Asia/Novosibirsk" "Asia/Rangoon" "Asia/Riyadh" "Asia/Seoul" "Asia/Shanghai" "Asia/Singapore" "Asia/Srednekolymsk" "Asia/Taipei" "Asia/Tashkent" "Asia/Tbilisi" "Asia/Tehran" "Asia/Tokyo" "Asia/Tokyo" "Asia/Tokyo" "Asia/Ulaanbaatar" "Asia/Urumqi" "Asia/Vladivostok" "Asia/Yakutsk" "Asia/Yekaterinburg" "Asia/Yerevan" "Atlantic/Azores" "Atlantic/Cape_Verde" "Atlantic/South_Georgia" "Australia/Adelaide" "Australia/Brisbane" "Australia/Darwin" "Australia/Hobart" "Australia/Melbourne" "Australia/Melbourne" "Australia/Perth" "Australia/Sydney" "Etc/GMT+12" "Etc/UTC" "Europe/Amsterdam" "Europe/Athens" "Europe/Belgrade" "Europe/Berlin" "Europe/Bratislava" "Europe/Brussels" "Europe/Bucharest" "Europe/Budapest" "Europe/Copenhagen" "Europe/Dublin" "Europe/Helsinki" "Europe/Istanbul" "Europe/Kaliningrad" "Europe/Kiev" "Europe/Lisbon" "Europe/Ljubljana" "Europe/London" "Europe/London" "Europe/Madrid" "Europe/Minsk" "Europe/Moscow" "Europe/Moscow" "Europe/Paris" "Europe/Prague" "Europe/Riga" "Europe/Rome" "Europe/Samara" "Europe/Sarajevo" "Europe/Skopje" "Europe/Sofia" "Europe/Stockholm" "Europe/Tallinn" "Europe/Vienna" "Europe/Vilnius" "Europe/Volgograd" "Europe/Warsaw" "Europe/Zagreb" "Europe/Zurich" "Europe/Zurich" "Pacific/Apia" "Pacific/Auckland" "Pacific/Auckland" "Pacific/Chatham" "Pacific/Fakaofo" "Pacific/Fiji" "Pacific/Guadalcanal" "Pacific/Guam" "Pacific/Honolulu" "Pacific/Majuro" "Pacific/Midway" "Pacific/Noumea" "Pacific/Pago_Pago" "Pacific/Port_Moresby" "Pacific/Tongatapu" "UTC"

Time Zone identifier

comments_max_length
integer

Default maximum length of comments

rich_text_editor_in_public_views
boolean

Enable rich text editor in public views

created_at
string <date_time> (Creation date)

Creation date, in ISO8601 format.

updated_at
string <date_time> (Last Update Date)

Last update date, in ISO8601 format.

extended_data
object

Extended data for the organization

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Organizations

List available organizations

Authorizations:
credentialFlowBearer
query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
page
integer

Page number for pagination

per_page
integer

Number of items per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Organizations Extended Data

Metadata management for organizations.

Organization extended data

Fetch organization extended data

Authorizations:
credentialFlowBearer
path Parameters
id
required
integer

Id of the organization

query Parameters
object_path
required
string

object path, in dot style, like foo.bar

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update organization extended data

The extended_data feature allows you to update a hash with recursive merging. Use the body payload with these keys:

  1. data: The value or hash you want to update.
  2. object_path: The dot-style path to the key (e.g., access.this.key).

Root path
To update data from root of the hash, use object_path=".".

Example:

  body={"data": {"name": "Jane"}, "object_path": "personnal"}

This recursively merges data into the hash without removing existing keys.

Merge some data
Initial hash:

  {
    "personnal": {"birthday": "1989-05-18"}
  }

Patch payload:

  {
    "data": {
      "name": "Jane"
    },
    "object_path": "personnal"
  }

Result:

  {
    "personnal": {"birthday": "1989-05-18", "name": "Jane"}
  }

Create new Paths
Paths are created as needed. Exemple:

  body = {"data": {"external_user_id": 12}, "object_path": "data-store.my-app.foo"}

Result:

  {
    "personnal": {"birthday": "1989-05-18"},
    "data-store": {"my-app": {"foo": {"external_user_id": 12}}}
  }

Alternatively:

  body = {"data": 12, "object_path": "data-store.my-app.foo.external_user_id"}

Remove a key
Set a key to null or an empty value to remove it.

Example: Initial hash:

  {
    "personnal": {"birthday": "1989-05-18", "name": "Jane"}
  }

Patch:

  body = {"data": {"birthday": ""}, "object_path": "personnal"}

Result:

{
  "personnal": {"name": "Jane"}
}

Return Value
The update request returns the updated value at the specified path.

Authorizations:
credentialFlowBearer
path Parameters
id
required
integer

Id of the organization

Request Body schema: application/json
required
data
required
object (User Extended Data Data)

New value for the extended data at the given path

object_path
string

object path, in dot style, like foo.bar. use '.' to update the whole user data

Responses

Request samples

Content type
application/json
{
  • "data": { },
  • "object_path": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Spaces

Search and vizualize spaces (eg. Assemblies, Participatory Processes)

Search Participatory Spaces

List or search spaces of the organization. Can be processes, assemblies, or any other registred participatory space.

Authorizations:
resourceOwnerFlowBearer
query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
page
integer

Page number for pagination

per_page
integer

Number of items per page

filter[manifest_name_not_in][]
Array of strings (manifest_name not IN filter)
Items Enum: "participatory_processes" "assemblies"

match none of manifest_name's values in array

filter[manifest_name_in][]
Array of strings (manifest_name IN filter)
Items Enum: "participatory_processes" "assemblies"

match one of manifest_name's values in array

filter[manifest_name_start]
string (manifest_name starts With filter)
Example: filter[manifest_name_start]=some_string

manifest_name starts with

filter[manifest_name_eq]
string (manifest_name equal filter)
Enum: "participatory_processes" "assemblies"

manifest_name is equal to

filter[manifest_name_not_eq]
string (manifest_name not equal filter)
Enum: "participatory_processes" "assemblies"

manifest_name is NOT equal to

filter[manifest_name_matches]
string (manifest_name like filter)
Example: filter[manifest_name_matches]=%some_string

matches manifest_name with LIKE

filter[manifest_name_blank]
boolean (manifest_name blank filter)

manifest_name is null or empty

filter[id_in][]
Array of integers (id IN filter)

match one of id's values in array

filter[id_eq]
integer (id equal filter)

id is equal to

filter[id_lt]
integer (id less than filter)

id is less than

filter[id_gt]
integer (id greater than filter)

id is greater than

filter[id_present]
boolean (id present filter)

id is not null and not empty

filter[id_blank]
boolean (id blank filter)

id is null or empty

filter[title_not_in][]
Array of strings (title not IN filter)

match none of title's values in array

filter[title_in][]
Array of strings (title IN filter)

match one of title's values in array

filter[title_start]
string (title starts With filter)
Example: filter[title_start]=some_string

title starts with

filter[title_eq]
string (title equal filter)

title is equal to

filter[title_not_eq]
string (title not equal filter)

title is NOT equal to

filter[title_matches]
string (title like filter)
Example: filter[title_matches]=%some_string

matches title with LIKE

filter[title_blank]
boolean (title blank filter)

title is null or empty

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Assemblies Details

Get detail of a Assemblies given its id

Authorizations:
resourceOwnerFlowBearer
path Parameters
id
required
integer

Id of the space

query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Participatory Processes Details

Get detail of a Participatory Processes given its id

Authorizations:
resourceOwnerFlowBearer
path Parameters
id
required
integer

Id of the space

query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Components

Search and vizualize components

Blog Components

List or search blog components of the organization

Authorizations:
credentialFlowBearer
query Parameters
page
integer

Page number for pagination

per_page
integer

Number of items per page

locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
filter[participatory_space_id_in][]
Array of strings (participatory_space_id IN filter)

match one of participatory_space_id's values in array

filter[participatory_space_id_eq]
string (participatory_space_id equal filter)

participatory_space_id is equal to

filter[participatory_space_id_lt]
string (participatory_space_id less than filter)

participatory_space_id is less than

filter[participatory_space_id_gt]
string (participatory_space_id greater than filter)

participatory_space_id is greater than

filter[participatory_space_id_present]
boolean (participatory_space_id present filter)

participatory_space_id is not null and not empty

filter[participatory_space_id_blank]
boolean (participatory_space_id blank filter)

participatory_space_id is null or empty

filter[participatory_space_type_not_in][]
Array of strings (participatory_space_type not IN filter)
Example: filter[participatory_space_type_not_in][]=Decidim::Assembly

match none of participatory_space_type's values in array

filter[participatory_space_type_in][]
Array of strings (participatory_space_type IN filter)
Example: filter[participatory_space_type_in][]=Decidim::Assembly

match one of participatory_space_type's values in array

filter[participatory_space_type_start]
string (participatory_space_type starts With filter)
Example: filter[participatory_space_type_start]=some_string

participatory_space_type starts with

filter[participatory_space_type_eq]
string (participatory_space_type equal filter)
Example: filter[participatory_space_type_eq]=Decidim::Assembly

participatory_space_type is equal to

filter[participatory_space_type_not_eq]
string (participatory_space_type not equal filter)
Example: filter[participatory_space_type_not_eq]=Decidim::Assembly

participatory_space_type is NOT equal to

filter[participatory_space_type_matches]
string (participatory_space_type like filter)
Example: filter[participatory_space_type_matches]=%some_string

matches participatory_space_type with LIKE

filter[participatory_space_type_blank]
boolean (participatory_space_type blank filter)

participatory_space_type is null or empty

filter[name_not_in][]
Array of strings (name not IN filter)

match none of name's values in array

filter[name_in][]
Array of strings (name IN filter)

match one of name's values in array

filter[name_start]
string (name starts With filter)
Example: filter[name_start]=some_string

name starts with

filter[name_eq]
string (name equal filter)

name is equal to

filter[name_not_eq]
string (name not equal filter)

name is NOT equal to

filter[name_matches]
string (name like filter)
Example: filter[name_matches]=%some_string

matches name with LIKE

filter[name_blank]
boolean (name blank filter)

name is null or empty

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Proposal Component Details

Find on proposal

Authorizations:
credentialFlowBearer
path Parameters
id
required
integer
query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
page
integer

Page number for pagination

per_page
integer

Number of items per page

filter[id_in][]
Array of integers (id IN filter)

match one of id's values in array

filter[id_eq]
integer (id equal filter)

id is equal to

filter[id_lt]
integer (id less than filter)

id is less than

filter[id_gt]
integer (id greater than filter)

id is greater than

filter[id_present]
boolean (id present filter)

id is not null and not empty

filter[id_blank]
boolean (id blank filter)

id is null or empty

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Proposal Components

List or search proposal components of the organization

Authorizations:
credentialFlowBearer
query Parameters
filter[name_not_in][]
Array of strings (name not IN filter)

match none of name's values in array

filter[name_in][]
Array of strings (name IN filter)

match one of name's values in array

filter[name_start]
string (name starts With filter)
Example: filter[name_start]=some_string

name starts with

filter[name_eq]
string (name equal filter)

name is equal to

filter[name_not_eq]
string (name not equal filter)

name is NOT equal to

filter[name_matches]
string (name like filter)
Example: filter[name_matches]=%some_string

matches name with LIKE

filter[name_blank]
boolean (name blank filter)

name is null or empty

filter[participatory_space_type_not_in][]
Array of strings (participatory_space_type not IN filter)
Example: filter[participatory_space_type_not_in][]=Decidim::Assembly

match none of participatory_space_type's values in array

filter[participatory_space_type_in][]
Array of strings (participatory_space_type IN filter)
Example: filter[participatory_space_type_in][]=Decidim::Assembly

match one of participatory_space_type's values in array

filter[participatory_space_type_start]
string (participatory_space_type starts With filter)
Example: filter[participatory_space_type_start]=some_string

participatory_space_type starts with

filter[participatory_space_type_eq]
string (participatory_space_type equal filter)
Example: filter[participatory_space_type_eq]=Decidim::Assembly

participatory_space_type is equal to

filter[participatory_space_type_not_eq]
string (participatory_space_type not equal filter)
Example: filter[participatory_space_type_not_eq]=Decidim::Assembly

participatory_space_type is NOT equal to

filter[participatory_space_type_matches]
string (participatory_space_type like filter)
Example: filter[participatory_space_type_matches]=%some_string

matches participatory_space_type with LIKE

filter[participatory_space_type_blank]
boolean (participatory_space_type blank filter)

participatory_space_type is null or empty

filter[participatory_space_id_in][]
Array of strings (participatory_space_id IN filter)

match one of participatory_space_id's values in array

filter[participatory_space_id_eq]
string (participatory_space_id equal filter)

participatory_space_id is equal to

filter[participatory_space_id_lt]
string (participatory_space_id less than filter)

participatory_space_id is less than

filter[participatory_space_id_gt]
string (participatory_space_id greater than filter)

participatory_space_id is greater than

filter[participatory_space_id_present]
boolean (participatory_space_id present filter)

participatory_space_id is not null and not empty

filter[participatory_space_id_blank]
boolean (participatory_space_id blank filter)

participatory_space_id is null or empty

page
integer

Page number for pagination

per_page
integer

Number of items per page

locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Blog Component Details

Blog component details

Authorizations:
credentialFlowBearer
path Parameters
id
required
integer
query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
component_id
integer

Component Id

space_manifest
string
Enum: "participatory_processes" "assemblies"

Space type

space_id
integer

Space Id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Search components

List or search components of the organization

Authorizations:
credentialFlowBearer
query Parameters
page
integer

Page number for pagination

per_page
integer

Number of items per page

locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
filter[manifest_name_not_in][]
Array of strings (manifest_name not IN filter)
Items Enum: "pages" "proposals" "meetings" "budgets" "surveys" "accountability" "debates" "sortitions" "blogs" "awesome_map" "awesome_iframe"

match none of manifest_name's values in array

filter[manifest_name_in][]
Array of strings (manifest_name IN filter)
Items Enum: "pages" "proposals" "meetings" "budgets" "surveys" "accountability" "debates" "sortitions" "blogs" "awesome_map" "awesome_iframe"

match one of manifest_name's values in array

filter[manifest_name_start]
string (manifest_name starts With filter)
Example: filter[manifest_name_start]=some_string

manifest_name starts with

filter[manifest_name_eq]
string (Component Manifest)
Enum: "pages" "proposals" "meetings" "budgets" "surveys" "accountability" "debates" "sortitions" "blogs" "awesome_map" "awesome_iframe"
filter[manifest_name_not_eq]
string (Component Manifest)
Enum: "pages" "proposals" "meetings" "budgets" "surveys" "accountability" "debates" "sortitions" "blogs" "awesome_map" "awesome_iframe"
filter[manifest_name_matches]
string (manifest_name like filter)
Example: filter[manifest_name_matches]=%some_string

matches manifest_name with LIKE

filter[manifest_name_blank]
boolean (manifest_name blank filter)

manifest_name is null or empty

filter[id_in][]
Array of integers (id IN filter)

match one of id's values in array

filter[id_eq]
integer (id equal filter)

id is equal to

filter[id_lt]
integer (id less than filter)

id is less than

filter[id_gt]
integer (id greater than filter)

id is greater than

filter[id_present]
boolean (id present filter)

id is not null and not empty

filter[id_blank]
boolean (id blank filter)

id is null or empty

filter[participatory_space_id_in][]
Array of strings (participatory_space_id IN filter)

match one of participatory_space_id's values in array

filter[participatory_space_id_eq]
string (participatory_space_id equal filter)

participatory_space_id is equal to

filter[participatory_space_id_lt]
string (participatory_space_id less than filter)

participatory_space_id is less than

filter[participatory_space_id_gt]
string (participatory_space_id greater than filter)

participatory_space_id is greater than

filter[participatory_space_id_present]
boolean (participatory_space_id present filter)

participatory_space_id is not null and not empty

filter[participatory_space_id_blank]
boolean (participatory_space_id blank filter)

participatory_space_id is null or empty

filter[participatory_space_type_not_in][]
Array of strings (participatory_space_type not IN filter)
Items Enum: "participatory_processes" "assemblies"

match none of participatory_space_type's values in array

filter[participatory_space_type_in][]
Array of strings (participatory_space_type IN filter)
Items Enum: "participatory_processes" "assemblies"

match one of participatory_space_type's values in array

filter[participatory_space_type_start]
string (participatory_space_type starts With filter)
Example: filter[participatory_space_type_start]=some_string

participatory_space_type starts with

filter[participatory_space_type_eq]
string (space_type)
Enum: "participatory_processes" "assemblies"
filter[participatory_space_type_not_eq]
string (space_type)
Enum: "participatory_processes" "assemblies"
filter[participatory_space_type_matches]
string (participatory_space_type like filter)
Example: filter[participatory_space_type_matches]=%some_string

matches participatory_space_type with LIKE

filter[participatory_space_type_blank]
boolean (participatory_space_type blank filter)

participatory_space_type is null or empty

filter[name_not_in][]
Array of strings (name not IN filter)

match none of name's values in array

filter[name_in][]
Array of strings (name IN filter)

match one of name's values in array

filter[name_start]
string (name starts With filter)
Example: filter[name_start]=some_string

name starts with

filter[name_eq]
string (name equal filter)

name is equal to

filter[name_not_eq]
string (name not equal filter)

name is NOT equal to

filter[name_matches]
string (name like filter)
Example: filter[name_matches]=%some_string

matches name with LIKE

filter[name_blank]
boolean (name blank filter)

name is null or empty

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Users

Get information about participants, and manage own data.

List available Users

List or search users of the organization

Authorizations:
credentialFlowBearer
query Parameters
page
integer

Page number for pagination

per_page
integer

Number of items per page

filter[nickname_not_in][]
Array of strings (nickname not IN filter)

match none of nickname's values in array

filter[nickname_in][]
Array of strings (nickname IN filter)

match one of nickname's values in array

filter[nickname_start]
string (nickname starts With filter)
Example: filter[nickname_start]=some_string

nickname starts with

filter[nickname_eq]
string (nickname equal filter)

nickname is equal to

filter[nickname_not_eq]
string (nickname not equal filter)

nickname is NOT equal to

filter[nickname_matches]
string (nickname like filter)
Example: filter[nickname_matches]=%some_string

matches nickname with LIKE

filter[nickname_blank]
boolean (nickname blank filter)

nickname is null or empty

filter[id_in][]
Array of integers (id IN filter)

match one of id's values in array

filter[id_eq]
integer (id equal filter)

id is equal to

filter[id_lt]
integer (id less than filter)

id is less than

filter[id_gt]
integer (id greater than filter)

id is greater than

filter[id_present]
boolean (id present filter)

id is not null and not empty

filter[id_blank]
boolean (id blank filter)

id is null or empty

filter[extended_data_cont]
string
Example: filter[extended_data_cont]="foo": "bar"

Search on user extended_data. use the format: "<key>":<space>"<value>"

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Update user extended data

The extended_data feature allows you to update a hash with recursive merging. Use the body payload with these keys:

  1. data: The value or hash you want to update.
  2. object_path: The dot-style path to the key (e.g., access.this.key).

Root path
To update data from root of the hash, use object_path=".".

Example:

  body={"data": {"name": "Jane"}, "object_path": "personnal"}

This recursively merges data into the hash without removing existing keys.

Merge some data
Initial hash:

  {
    "personnal": {"birthday": "1989-05-18"}
  }

Patch payload:

  {
    "data": {
      "name": "Jane"
    },
    "object_path": "personnal"
  }

Result:

  {
    "personnal": {"birthday": "1989-05-18", "name": "Jane"}
  }

Create new Paths
Paths are created as needed. Exemple:

  body = {"data": {"external_user_id": 12}, "object_path": "data-store.my-app.foo"}

Result:

  {
    "personnal": {"birthday": "1989-05-18"},
    "data-store": {"my-app": {"foo": {"external_user_id": 12}}}
  }

Alternatively:

  body = {"data": 12, "object_path": "data-store.my-app.foo.external_user_id"}

Remove a key
Set a key to null or an empty value to remove it.

Example: Initial hash:

  {
    "personnal": {"birthday": "1989-05-18", "name": "Jane"}
  }

Patch:

  body = {"data": {"birthday": ""}, "object_path": "personnal"}

Result:

{
  "personnal": {"name": "Jane"}
}

Return Value
The update request returns the updated value at the specified path.

Authorizations:
resourceOwnerFlowBearer
Request Body schema: application/json
required
data
required
object (User Extended Data Data)

New value for the extended data at the given path

object_path
string

object path, in dot style, like foo.bar. use '.' to update the whole user data

Responses

Request samples

Content type
application/json
{
  • "data": { },
  • "object_path": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get user extended data

Fetch user extended data

Authorizations:
resourceOwnerFlowBearer
query Parameters
object_path
required
string

object path, in dot style, like foo.bar

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Use a magic-lick

Challenge given token, open and a session and redirect. Publically accessible by HTTP.

path Parameters
magic_token
required
string

A token received for magic link

Responses

Response samples

Content type
application/json
{ }

Blogs

Get informations about blog posts

Show a blog detail

Get blog post details

Authorizations:
credentialFlowBearer
path Parameters
id
required
integer

Blog Post Id

query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
component_id
integer

Component Id

Responses

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Blog Post Lists

Get blog post list

Authorizations:
credentialFlowBearer
query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
page
integer

Page number for pagination

per_page
integer

Number of items per page

space_manifest
string
Enum: "participatory_processes" "assemblies"

Space type

space_id
integer

Space Id

component_id
integer

Component Id

order
string

Order by

order_direction
string
Enum: "asc" "desc"

Order direction

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Proposals

Manipulate proposals and drafts

Proposals

Search proposals

Authorizations:
resourceOwnerFlowBearer
query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
page
integer

Page number for pagination

per_page
integer

Number of items per page

space_manifest
string
Enum: "participatory_processes" "assemblies"

Space type

space_id
integer

Space Id

component_id
integer

Component Id

order
string
Enum: "published_at" "rand"

Order by

order_direction
string
Enum: "asc" "desc"

Order direction

filter[voted_weight_in][]
Array of strings (voted_weight IN filter)

match one of voted_weight's values in array. Only available with [:impersonationFlow] flow

filter[voted_weight_eq]
string (voted_weight equal filter)

voted_weight is equal to. Only available with [:impersonationFlow] flow

filter[voted_weight_lt]
string (voted_weight less than filter)

voted_weight is less than. Only available with [:impersonationFlow] flow

filter[voted_weight_gt]
string (voted_weight greater than filter)

voted_weight is greater than. Only available with [:impersonationFlow] flow

filter[voted_weight_present]
boolean (voted_weight present filter)

voted_weight is not null and not empty. Only available with [:impersonationFlow] flow

filter[voted_weight_blank]
boolean (voted_weight blank filter)

voted_weight is null or empty. Only available with [:impersonationFlow] flow

filter[state_not_in][]
Array of strings (state not IN filter)

match none of state's values in array

filter[state_in][]
Array of strings (state IN filter)

match one of state's values in array

filter[state_start]
string (state starts With filter)
Example: filter[state_start]=some_string

state starts with

filter[state_eq]
string (state equal filter)

state is equal to

filter[state_not_eq]
string (state not equal filter)

state is NOT equal to

filter[state_matches]
string (state like filter)
Example: filter[state_matches]=%some_string

matches state with LIKE

filter[state_blank]
boolean (state blank filter)

state is null or empty

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ]
}

Proposal Details

Proposal detail

Authorizations:
resourceOwnerFlowBearer
path Parameters
id
required
integer

Proposal Id

query Parameters
locales[]
Array of strings (Available locales)
Items Enum: "en" "fr"
space_manifest
string
Enum: "participatory_processes" "assemblies"

Space type

space_id
integer

Space Id

component_id
integer

Component Id

filter[voted_weight_not_in][]
Array of strings (voted_weight not IN filter)

match none of voted_weight's values in array

filter[voted_weight_in][]
Array of strings (voted_weight IN filter)

match one of voted_weight's values in array

filter[voted_weight_start]
string (voted_weight starts With filter)
Example: filter[voted_weight_start]=some_string

voted_weight starts with

filter[voted_weight_eq]
string (voted_weight equal filter)

voted_weight is equal to

filter[voted_weight_not_eq]
string (voted_weight not equal filter)

voted_weight is NOT equal to

filter[voted_weight_matches]
string (voted_weight like filter)
Example: filter[voted_weight_matches]=%some_string

matches voted_weight with LIKE

filter[voted_weight_blank]
boolean (voted_weight blank filter)

voted_weight is null or empty

filter[state_not_in][]
Array of strings (state not IN filter)

match none of state's values in array

filter[state_in][]
Array of strings (state IN filter)

match one of state's values in array

filter[state_start]
string (state starts With filter)
Example: filter[state_start]=some_string

state starts with

filter[state_eq]
string (state equal filter)

state is equal to

filter[state_not_eq]
string (state not equal filter)

state is NOT equal to

filter[state_matches]
string (state like filter)
Example: filter[state_matches]=%some_string

matches state with LIKE

filter[state_blank]
boolean (state blank filter)

state is null or empty

Responses

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Metrics

Metrics of the organization

Health

Health metrics

Responses

Response samples

Content type
application/json
{
  • "message": "OK"
}

Proposals Vote

Vote

Vote on a proposal

Authorizations:
resourceOwnerFlowBearer
Request Body schema: application/json
required
proposal_id
required
integer

Proposal Id

required
object (Vote A Proposal Data)

Payload to send your vote

Responses

Request samples

Content type
application/json
{
  • "proposal_id": 0,
  • "data": {
    }
}

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Draft Proposals

Create draft proposal

Create a draft

Authorizations:
resourceOwnerFlowBearer
Request Body schema: application/json
required
required
object (Draft Proposal Data)

Payload to update in the proposal

component_id
required
integer

Component ID

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Withdrawn a draft proposal

Withdrawn a draft proposal. This action cannot be undone.

Authorizations:
resourceOwnerFlowBearer
path Parameters
id
required
integer

Draft Id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Display a draft proposal

Detail a draft proposal. Raise HTTP 404 error if no draft is created for now.

Authorizations:
resourceOwnerFlowBearer
path Parameters
id
required
integer

Draft Id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update draft proposal

This endpoint allows you to update a draft proposal associated with your application ID. Drafts updated via this API are not visible in the Decidim front-end, and drafts created from the Decidim application are not editable through the API. Therefore, any draft you create here is new and tied to your application's credentials.

Example Request

PUT /public/assemblies/12/2319/proposals/draft
Content-Type: application/json
Authorization: Bearer YOUR_bearer_token

{
  "title": "My valid title"
}

Access Requirements

  • Authentication: This endpoint requires an impersonation token. You must create drafts on behalf of a participant; drafts cannot be created using a service token (credential_token).

Error Handling

  • Field Errors: Only errors related to the fields you're updating will be returned.
  • Publishable Status: To determine if the draft is publishable, check the data.meta.publishable field in the response.

Example response

{
  "data": {
    "id": "12345",
    "type": "proposal",
    "attributes": {
      "title": "My valid title",
      "body": null
    },
    "meta": {
      "publishable": false
    }
  }
}

In this example, the title is valid, so the server returns a 200 OK status. However, since the body is blank, meta.publishable is false, indicating that the draft is not yet ready for publication.

Authorizations:
resourceOwnerFlowBearer
path Parameters
id
required
integer

Draft Id

Request Body schema: application/json
required
required
object (Update Draft Proposal Payload Data)

Payload to update in the proposal

title
string

Title of the draft

body
string

Content of the draft

locale
string
Enum: "en" "fr"

Locale of the draft. default to user locale

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
Example
{
  • "data": {
    }
}

Publish a draft proposal

Publish a draft proposal

Authorizations:
resourceOwnerFlowBearer
path Parameters
id
required
integer

Draft Id

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}