Writing to Decidim through the API with machine users: what the integration does
A participation team or an upstream system often needs to create or update content in Decidim without a staff member logging in each time, for example to import proposals from a city app or to file answers from a case system. The integration does this through Decidim's GraphQL API under a machine identity, either an API credential or an OAuth application acting on its own behalf. Every write is bounded in two places: the scopes granted to that identity, which decide what kinds of mutations it may call at all, and the component permissions inside each participatory space, which decide whether it may act on a given proposal, meeting or process. A machine user with broad scopes can still be refused in a space where its role does not allow the action, so both layers need to be designed together.
Not every component supports every write. Some components may accept creation, others only updates, and answering content is a separate operation that many teams assume exists when it does not. Confirm which components support create, update and answer operations in the API documentation of the exact Decidim version you run, because the schema changes between minor releases and the current supported lines are listed in the Decidim releases page. Ask your implementation partner or internal platform team to capture that check in writing, along with the scope names and the test space used to prove each mutation works.
Before building, decide who owns the machine identity, which spaces it may touch, and how its activity is reviewed. Write down which actions it must perform and which it must never perform, then test each one against a staging instance with the same version and component settings as production. Plan for credential rotation and for revoking access when the upstream system is retired, since a long-lived write credential is one of the most likely routes to unwanted changes on a public platform. These decisions shape the effort far more than the request code itself.
What you need before the first write
Writes through the API change live participation data, so the instance, the people and the test environment need to be settled before any credential is created. The five cards below cover what to confirm first, in the order you will need it.
A supported Decidim version
Confirm the instance runs a minor version that still receives security updates. Until version 1.0, Decidim supports only the last two minor versions, currently 0.32.x and 0.31.x, and 0.30.x and earlier are no longer supported. Check your running version before you plan API work, because an unpatched instance makes every machine credential a liability. If you are behind, upgrade first, one minor version at a time.
Security support policyAdmin access to create credentials
Creating API credentials or OAuth applications requires an administrator account on the instance. Confirm which person or team holds that access and whether it is tied to named accounts rather than a shared login. Ask who can revoke a credential if the calling system is compromised, and confirm that this revocation path is tested before go-live.
An HTTPS endpoint the caller can reach
The calling system must reach the Decidim instance over HTTPS from its own network. Confirm the public or internal hostname, certificate validity, and any egress rules, proxies or web application firewall rules that could block mutation requests. If the caller runs in another cloud account or data center, test the route from that environment, not from a laptop.
A staging instance matching production
Run the first writes against a staging instance with the same Decidim version, enabled components and participatory space structure as production. Component IDs, permissions and authorization rules differ between setups, so a request that works in an empty test instance can fail or write to the wrong space in production. Keep staging data separate so test proposals and answers never reach participants.
A named owner for the machine identity
Assign one accountable person or team to each machine user or OAuth application. This owner decides which scopes the identity needs, approves rotation, and receives alerts when writes fail or behave unexpectedly. Record the owner, the calling system, and the components the identity may change in a register that your security team can review.
Choosing between API credentials and OAuth applications
A machine identity suits a server-side job, such as a scheduled import or a sync from another system, that should act as one service account inside one organization. The job authenticates with credentials created for that account, so every write is recorded against the account and not against a named person.
- Audit trail: Changes show the service account as the actor. The audit log can confirm that a system made the change but not which staff member requested it, so record the requester in your own job logs.
- Token lifetime: Confirm in the instance docs whether the credential is long-lived and how it is rotated. A long-lived secret in a job runner needs a documented rotation procedure before go-live.
- Revocation: Revoking the credential stops every process that uses it at once. Keep one credential per integration so that revoking one does not interrupt the others.
- Scopes: Grant only the scopes the job needs for its mutations, and review them whenever the job changes.
- Approval: Confirm who can create service accounts and assign their scopes. The security owner should approve the scope list before the credential is issued.
Before you build, check in the instance documentation how machine credentials are created, which scopes they can hold and which organization they belong to.
An OAuth application suits a case where a participant or staff member authorizes another application to act on their behalf. The calling app receives a token after the user approves it, and its writes are attributed to that user. The user's own roles and permissions limit what the app can change.
- Audit trail: Changes show the authorizing user as the actor, which keeps the attribution the organization expects for human action. Record the application identifier as well, so you can tell which app made the change.
- Token lifetime: Tokens are issued per authorization. Confirm in the instance docs how long access tokens and refresh tokens last and whether refresh is supported.
- Revocation: Access can be withdrawn per user or per application, and removing the application or the user's authorization ends the calls it makes. Test this path before relying on it.
- Scopes: The application requests scopes during authorization. Ask the user and the administrator to review them, because a broad scope gives the app more reach than the user's own task requires.
- Approval: Two parties approve the access: the administrator who registers the application and the user who grants consent.
Confirm in the instance documentation how OAuth applications are registered, which scopes exist for mutations and how the authorization screen presents them.
Single-page and mobile apps cannot keep a client secret, because anyone can extract a secret from code running in a browser or on a device. PKCE (Proof Key for Code Exchange) addresses this by binding the authorization code to a value that only the app instance knows. The app creates a random verifier, sends a derived challenge with the authorization request and presents the verifier when it exchanges the code for a token.
- No embedded secret: The app registers as a public client and holds no client secret, so the build artifact contains nothing that grants access on its own.
- Exact redirect URIs: Register the redirect URIs precisely. A loosely matched redirect is a common route for stolen authorization codes.
- Token storage: Browser and device storage become the main exposure point. Keep tokens short-lived where the docs allow it and clear them on sign-out.
- User attribution: Writes still appear under the signed-in user, so PKCE changes how the app proves its identity but not the audit model.
- Method support: Confirm in the instance docs that PKCE is supported for the Decidim OAuth flow and which challenge method it accepts.
Before you choose a public client design, verify PKCE support and the redirect rules on the target instance, since a server-side proxy can sometimes avoid exposing tokens to the browser.
The right model depends on who should appear as the actor, how long the process runs and whether the calling code can keep a secret. Teams often start with the machine identity because it looks simpler, then discover that the audit trail must name the staff member who requested each change. Work through the questions below before you request credentials.
- Actor: If changes must be attributed to a person, use an OAuth application. If the change is system-initiated, a machine identity fits.
- Interaction: A scheduled job with no user present usually points to a machine identity. A flow where a person clicks approve in another app points to OAuth.
- Client secret: If the caller cannot keep a secret, use the public client pattern with PKCE.
- Revocation owner: Decide who can revoke access during an incident, and test that person's path to do so.
- Approval chain: Record who approves the scopes and the organization each credential belongs to.
Before committing to either model, confirm in the instance documentation how each credential type is created, scoped and revoked, and have your security and platform owners sign off on the answers.
How to set up machine-user writes step by step
This sequence takes an integration from a planned list of writes to a verified, least-privilege credential that can create, update or answer content in Decidim. Each step ends with a check, so a misconfiguration shows up on staging before any production content is touched. The result is a documented identity that your team can review, rotate and revoke.
Map each write to its space
The integration owner lists every operation the system must perform, such as creating a proposal, updating a meeting or answering a question. For each one, record the process, assembly or initiative and the component that holds it. Confirm in your instance's API documentation that the component supports the operation, since support varies by component. Done when every operation has a named space and component and someone from the participation team has reviewed the list.
Create a dedicated machine identity
A Decidim administrator creates one dedicated account for the integration, or registers an OAuth application in the admin panel if the integration will act through a delegated flow. Use a name that identifies the integration and its owner, and do not reuse a staff member's personal login. Done when the account or application appears in the admin panel and its owner is recorded in your change log.
Grant only the required scopes
Using the scope list in your instance's API documentation, select only the scopes needed for the write operations mapped in the first step, and leave out any scope the integration does not call. Record the scope set beside the mapping so reviewers can match each scope to a specific operation. Done when every granted scope traces to a named operation and the security reviewer has signed off on the set.
Confirm roles in each target space
The token's scopes limit what it may request, but the account's role in each space still determines whether an action succeeds. Assign the account the role each target component requires, then check that the role allows the specific action in that space. Done when a space administrator confirms the role in the admin panel for every space on the list.
Obtain a token with the right grant
Request an access token using the grant type your instance supports for this identity, and confirm the exact flow in the API documentation before you build the client. If the client is a public application, such as a single-page or mobile app, use PKCE so the code exchange is bound to the client that started it. Store the token in a secrets manager, not in source code or configuration files committed to a repository. Done when the token response contains only the scopes approved in the previous step.
Prove identity with a read-only query
Send one read-only query that returns a space the identity should see, including its title and component list. Compare the result with the space recorded in the first step. Then query a space the account should not be able to reach and confirm that access is refused. Done when the expected space returns and the restricted space is refused, which shows the identity and its roles behave as planned.
Test a write on staging
On a staging instance with the same configuration, run one mutation against a test component, such as creating a proposal, then read it back and confirm the content matches. Remove the test record using the platform's own removal function or the admin panel, and confirm it no longer appears publicly. Ask your Decidim administrator to confirm whether removal is a hard delete or a hide before you rely on it. Done when the write, read-back and removal all succeed on staging.
Which components support create, update and answer operations
Can I create proposals through the Decidim API?
Proposals are the component most often written to from outside Decidim, but whether a create mutation exists depends on your installed release and how the proposals component is configured. A create call would submit a new contribution on behalf of a machine user or OAuth user, so it also has to pass the component's own rules, such as whether the participant is verified, whether creation is open in the current phase, and whether the space allows it. Before building, open the GraphQL schema and documentation shipped with your exact Decidim version and confirm the mutation name, its input fields and the scopes it requires. Test it on a staging instance first, because a successful call creates public content that is difficult to retract cleanly.
Can an API client edit a proposal after it is published?
Editing an existing proposal is a different operation from creating one, and it is usually the more restricted of the two. An update would change the title, body or other fields of a contribution that may already have votes, comments or an official answer attached. Whether an update mutation exists, and which fields it accepts, varies by component and version, so confirm it against the schema of the installed release rather than against older examples or community code. Also confirm who is allowed to edit: the original author, an admin, or no one after a deadline. Your integration should respect those rules and record every change it makes.
Can I post an official answer to a proposal from another system?
An official answer is a write that publishes the organization's response to a contribution, and it normally carries more weight than a participant comment. Support for answering through the API is not uniform across components, so check whether your release exposes an answer mutation for proposals and what scope and permissions it demands. Treat answers as a governance action: decide which role the machine user holds, who approves the wording, and how the answer is logged. Confirm the behavior in your own environment, because answer workflows can depend on the space phase and on how your organization configured its components.
Which write operations exist for meetings in Decidim?
Meetings are a participatory component where external systems often create entries, such as importing sessions from a calendar or a venue booking system. Whether the API can create, update or answer meetings, and which fields those operations accept, depends on the installed release and on the meetings component settings. Some meeting data, such as registrations and attendee details, is personal and may have separate access rules from the meeting itself. Check the schema for your version, map each field to the business owner who maintains it, and test with dummy meetings before connecting a live calendar.
Can surveys and participatory budgets be changed through the API?
Surveys and participatory budgets carry structured configuration and, in the case of budgets, voting results, so write access to them should be assumed limited until you have checked it. A mutation that changes a survey question or a budget project can alter what participants see or how votes are counted, which makes it a high-impact action. Verify in the schema of your exact release whether any create, update or answer operation exists for these components, and what scope it needs. If it exists, restrict the machine user to the specific space, and keep a documented procedure for changes that participants may already have acted on.
Does accountability tracking support writes from other systems?
Accountability tracking lets an organization publish the status of commitments, which makes it a natural target for syncing from a project management or reporting tool. Whether the API supports create, update or answer operations on accountability content depends on the component and the installed release, so confirm each mutation against that version's schema and documentation before building. Status updates should come from a named owner in the source system, and the integration should log which value it sent and when. Do not assume that a read-only query for this component implies a write operation exists.
How do I verify which mutations my Decidim version supports?
The reliable source is the GraphQL schema and documentation generated for the exact Decidim release you run, not the main branch or third-party tutorials. Compare your planned mutations against the schema of your installed version, then repeat the check after each upgrade, because the API surface can change between minor releases. Record the release, the mutation names and the scopes required in your integration design, and rerun the checks in staging before every version change. The upgrade guide also warns that some releases change database structures, so plan API tests into each upgrade window.
Can DeployOpen verify and test these API write paths for us?
DeployOpen can plan, implement and test Decidim integrations inside your own infrastructure, including checking which mutations your installed release exposes and whether each one matches the write rules you need. Work is usually fixed-scope, so the component list, the machine user design, the test cases and the deliverables are agreed in writing before the build starts, and a quote follows from that scope. Ongoing verification after each upgrade can be covered by a retainer. Ask for a written list of each operation tested, the release it was tested against, and the evidence of staging runs.
Mapping source fields and permissions to Decidim objects
This table maps the fields a source system sends, such as requester, category, title, body, status and official answer, to the Decidim objects, authors, identifiers and permissions that receive them. Read each row as a design decision to settle before the first write, and confirm every field name and required input against the schema of the Decidim version you run.
| Source field or concern | Decidim object or setting | Design notes |
|---|---|---|
| Requester | Author of the proposal or contribution, or a mapped internal user | Decide whether the machine user writes on behalf of a named participant or records the requester only as text in the body. Attribution to a real account usually needs a verified or mapped user, so confirm how the installed version handles authorship. |
| Category | Scope or category on the target component | Map each upstream category to a Decidim scope or category ID in advance. Unmapped values should go to a review queue instead of being created silently. |
| Title | Title field of the created resource | Check the maximum length and whether the field is translatable in your installed version. Keep the upstream title unchanged so later syncs can match it. |
| Body | Body field of the created resource | Sanitize incoming HTML and expect Decidim to store rich text. Confirm which fields accept markup and which are plain text in the schema. |
| Status | Published, hidden or withdrawn state on the component | Only some states can be set through the API. Confirm which transitions the machine user may perform and keep moderation decisions with staff. |
| Official answer | Answer record linked to the proposal or resource | Answers are a separate operation from create and update in many components. Confirm the answer mutation, its required inputs, and whether answers are published immediately or held for review. |
| Space and component identifiers | Participatory space and component IDs | Store the target space and component IDs in configuration, not in code. Verify them against the instance after each upgrade because identifiers can differ between environments. |
| Machine identity roles and scopes | API credentials or OAuth application with mutation scopes | Grant only the scopes needed for the chosen operations. Read-only access, create access and answer access should be separate credentials where possible, and each should be tied to a named owner for audit. |
| Upstream ID storage | External reference stored alongside the Decidim object | Record the source system ID and the Decidim ID together before or at creation. Check for an existing mapping before every create so retries do not produce duplicate proposals or answers. |
Security controls for automated writes
A machine user that can create or change Decidim content is a privileged identity with a direct path into a public participation platform. The controls below cover how the credential is scoped, stored, rotated, routed, logged and reviewed, so that a leaked token or a faulty integration has a small blast radius.
Grant least-privilege scopes
Request only the scopes that the integration needs for each mutation, and split read and write work across separate applications or credentials where you can. A sync that only creates proposals should not hold a scope that can answer or update other components. Review the granted scopes in the admin panel each time the integration changes, because a scope added for testing often stays in production. Ask the implementation team to document which operation needs which scope, so the review has a reference point.
Store secrets in a secrets manager
Keep client secrets, API tokens and PKCE-related values in a dedicated secrets manager, such as OpenBao or the store your cloud provider runs, and inject them at runtime. Do not place them in repository files, container images, CI logs or shared spreadsheets. Confirm that the manager's own access policy limits which workloads can read each secret, and that reads are logged.
Rotate and revoke credentials
Set a rotation schedule for every machine credential and record the owner who performs it. When a system is retired, revoke its OAuth application or API credential in the Decidim admin panel the same day, then confirm that existing tokens no longer work. Rotation is recurring work, so include it in the operations runbook and in any retainer or internal on-call scope rather than treating it as a one-time setup step.
Restrict the calling system's network path
Allow outbound write traffic only from the integration host or service account to the Decidim instance's API endpoint. Place the calling service in a segment with an egress policy and block arbitrary destinations. If the instance is reached through a reverse proxy or gateway, apply rate limits and IP or identity-based rules there, and confirm with the implementation team how the GraphQL endpoint is exposed.
Log every mutation with request IDs
Record each write the integration makes, including the time, the calling identity, the target component, the object identifier and the upstream request ID returned by the platform. Match these entries against the Decidim-side audit records when investigating a disputed change. Ask the implementation team which request identifiers the instance returns and where your logs will store them, and confirm that log retention matches your policy.
Protect redirect URIs and PKCE verifiers
For OAuth clients, register exact redirect URIs with no wildcards, and use PKCE for any public client such as a desktop or mobile tool that cannot keep a secret. Generate the code verifier per authorization request, keep it out of logs and URLs, and discard it after the exchange. Treat a redirect URI that accepts an attacker-controlled host as a credential exposure.
Review the instance and report findings
Before the integration goes live, have the Decidim instance and its API surface security tested, including write paths, permission checks and token handling. Any vulnerability found during testing should be reported through the project's security policy, which sends reports to security@decidim.org or through GitHub Security Advisories, and which sets disclosure grace periods of 2 months for standard vulnerabilities and 4 months for critical ones. Keep the instance on a supported minor version so fixes arrive in time.
Decidim security policyHow a machine-user write moves from the upstream system to Decidim
The flow starts in the upstream job or app, which holds either an API credential or an OAuth access token. A public client obtains that token through an authorization step that uses PKCE. Every request crosses the trust boundary into the Decidim instance, where the GraphQL endpoint first checks that the token carries the scope the mutation needs, then checks that the user behind it can act on the target component. Only a permitted mutation is applied, and the result, including the audit entry, returns to the upstream system. Verify token scopes and component permissions before go-live, because a failure at either step rejects the write.
Trust boundary between the upstream system and the Decidim instance during a machine-user write.
How to test writes before they reach participants
Run every write test on a staging instance of the same Decidim version you will run in production, with the same organization settings, enabled components and moderation configuration. A write that succeeds on a different version or with different component settings tells you little about production. Start with negative tests: call each mutation with a credential that lacks the required scope, then with a narrower one, and confirm that Decidim refuses each call with the expected error. Keep a written list of which scope each operation needs, so a refusal you did not expect is caught before a job runs unattended. Confirm the same for components where your machine user should not have write access at all, such as a component that only participants or admins may edit.
Next, run a positive test for each mutation your integration will perform, whether that is creating a proposal, updating its body, or posting an answer on a component that supports it. Check the resulting record field by field against your source data, including the author, the associated component and any translated text. Then test idempotency by replaying the same job twice, simulating a timeout and retry, and confirming that the second run does not create a duplicate proposal. Decidim does not turn your job's retry logic into deduplication for you, so the external system must store the Decidim identifier of each record it created and check it before writing again. Review what appears publicly after each write: the proposal page, listings, search results, notifications sent to followers, and any open data export that picks up the record. Participants may see a test record within minutes, so the staging review should confirm which fields and notifications are visible.
Clean up test records once the checks pass, using the admin interface or the moderation tools your team has configured, and record which identifiers were removed so nothing is left behind on staging that could be mistaken for real content. Then hold a sign-off step with the participation team. They should confirm the wording, the attribution shown for the machine user, the component and space chosen, and the answers posted under their name or the organization's. Only after that written approval should the credential be created or moved to production, with the same scopes the negative tests confirmed. Confirm the exact scope names and any API restrictions against the version's documentation in the Decidim GitHub repository before you rely on them.
Common failures when writing to Decidim through the API
This table lists the failures teams most often hit when a machine user or OAuth client creates, updates or answers records in Decidim, with the likely cause and a check to run for each. Read it top to bottom when a write is rejected, duplicated or missing, starting with the token and scope checks because they account for most rejections.
| Failure | Likely cause | Fix to check |
|---|---|---|
| Mutation rejected as unauthorized | The token lacks the write scope the mutation needs, so it authenticates but cannot perform the action. | Decode or inspect the token's granted scopes, then compare them with the scopes the mutation requires in your instance's API documentation. Reissue the token with the missing scope. |
| Write refused in a specific space | The machine user has no role or permission in the target process, assembly or component, even though the token is valid. | Log in as the machine user in the admin panel and confirm it holds the needed role in that space. Test the same mutation against a space where the role is known to be granted. |
| Requests start failing after working | The access token expired or was revoked, for example after the OAuth application was edited or the user's session was reset. | Check the token's expiry time and whether the OAuth application still exists in the admin panel. Build a refresh or reissue step into the job and alert on 401 responses. |
| Authorization code exchange fails | The PKCE code verifier sent at token exchange does not match the code challenge sent at authorization, often because the client regenerated the verifier between steps. | Store the verifier with the authorization attempt, not per request, and hash it with the method the challenge declares. Log the challenge and verifier lengths to confirm they travel together. |
| Redirect step returns an error page | The redirect URI in the request differs from the one registered for the OAuth application, including scheme, host, port or trailing slash. | Compare the registered URI and the request value character by character. Register each environment's exact callback URL separately. |
| Duplicate proposals, meetings or answers | A job retried after a timeout re-sent a create mutation whose first call had already succeeded. | Before creating, query for a record with your external reference, or store the returned Decidim ID against your source record. Make create calls idempotent at your end and check for duplicates after each retry. |
| Mutation not found in the schema | The installed Decidim version does not include that mutation, or it was renamed in a later release. | Introspect the running instance's GraphQL schema and confirm the mutation name and arguments exist. Match your client to the installed version, which is listed in your instance's release notes. |
| Component does not accept the operation | The component type supports create but not update or answer, so the mutation exists only for some actions. | Check the component's documented operations in the instance API docs before building the job. Test one create, update and answer call per component type in a staging instance. |
Questions teams ask before automating writes to Decidim
How much effort does a Decidim write integration take?
Effort depends mostly on how many mutations the integration sends, how many component types it touches, which credential model it uses and how deep the testing goes. Each mutation needs its input mapped to the component's fields, the right permission scopes granted, and error handling for rejected input, such as missing required fields or a space that is closed to new content. Adding a second component type usually repeats much of that work with new field mappings and new tests. Credential choice also changes the work: a machine credential with a narrow scope is simpler to reason about than an OAuth flow that a public client must run correctly. Testing is the largest variable, because each write needs checks in staging that confirm the record appears where participants expect it and that a retry does not create duplicates. Ask any partner for a quote built from a written list of mutations, components and test cases, since that list sets the effort.
Can an internal developer build this without outside help?
Yes, if the developer can read the API documentation for the exact Decidim version your instance runs, work with GraphQL and OAuth, and manage a staging instance. The harder parts are usually not the request code. They are knowing which scopes a token needs, how a component's permissions and the state of its participatory space affect writes, and how to recover when part of a batch fails. Teams without a Decidim developer often pair an internal engineer with an experienced reviewer for the first integration, then run later ones on their own. Check three things before deciding: whether anyone has run Decidim's upgrade process before, who will own the integration when the platform moves to a new minor version, and whether the team can keep staging in step with production. If any of those is missing, a fixed-scope engagement can cover the build while your engineer learns the codebase.
What does the Decidim admin team need to provide?
The admin team controls the settings that decide whether an automated write succeeds, so its input is needed early. Typical items include the organization and space identifiers the integration will target, the component settings that allow creation or answers, the roles and permissions of any machine user, and whether the space is open to the type of content being added. The team also needs to agree on who approves new credentials and who can revoke them. Confirm which authorization rules apply to participants whose content the integration creates or answers, because some components restrict actions to verified users. For staging, the admin team should provide a test organization that mirrors the production configuration. Write these requirements into the scope so a missing setting is found during planning, not during the first live write.
How long does staging validation take for a given scope?
No duration is fixed for this work, so the answer comes from the scope. Validation time grows with the number of mutations, the number of component types, the number of permission combinations and the number of failure cases you want to exercise. A narrow integration that creates one kind of record in one space needs a short cycle of setup, test runs and review. A broader integration that updates existing records, posts answers and handles retries needs repeated runs against a staging copy that resembles production data, plus a review by the admin team of what appears on the public site. Plan for at least one full rehearsal of the production cutover, because scheduling and credential issues tend to show up there. Ask any partner to state the validation steps, the environments involved and the sign-off criteria in the written scope, then compare their timeline against those steps.
What does a fixed-scope DeployOpen engagement cover?
A DeployOpen engagement for this work is fixed in scope, which means the mutations, components, environments, deliverables and timeline are agreed in writing before work starts. Typical coverage includes reviewing the Decidim version and its API documentation, designing credentials and scopes, building the integration, testing it in staging, documenting how it runs and handing it over. DeployOpen also runs security testing, so the write path can be tested for input handling and credential exposure if that is part of the agreed scope. Ongoing support, upgrades and continuous testing are available as retainers, which is the place to cover changes after a Decidim minor version upgrade. DeployOpen does not publish a price list. A quote follows from the written scope, so review which components are covered, what happens if the Decidim version changes mid-project, and what is excluded.
Which Decidim components support create, update and answer operations?
Support differs by component and by Decidim version, so the list must come from the API documentation for the version you run. Check each component you plan to automate and record three things: whether it allows creation through the API, whether existing records can be updated, and whether a machine user can post answers or replies. Also check which fields are writable, because a mutation can succeed for some fields and fail for others in the same request. Keep the result in your scope document as a table listing the version, the component and the operation. When a component lacks an operation you need, decide early whether to design around it, handle that step in the admin panel, or change the process. Confirm each point in the vendor documentation and in a staging test before committing to a design.
Should machine access use API credentials or an OAuth application?
Choose the credential model that matches who is acting and where the code runs. An integration that runs on your own server and acts as one service account needs a credential you can scope, rotate and revoke without affecting individual people. An OAuth application fits when a public client or a user-delegated flow must act for individual participants, and then PKCE is the protection to confirm for public clients, because it binds the authorization code to the client that requested it. Grant the smallest set of scopes that covers the mutations in scope, and review those scopes whenever the integration changes. Store secrets in your secret manager, log which token performed each write, and test revocation in staging so you know the integration fails safely. Confirm the exact scope names, token lifetimes and PKCE behavior in the documentation for your Decidim version before the design is final.
How DeployOpen scopes, builds and supports Decidim API integrations
DeployOpen treats writing to Decidim through the API as a scoped integration project, not a one-off script. We agree the components, operations and credential model in writing first, then build, test, document and support the integration inside your own infrastructure.
How we scope
- We list each write operation your system needs, such as creating proposals or answering comments, and map it to the component that supports it.
- We confirm which credential model fits each machine user, either API credentials or an OAuth application with PKCE for public clients.
- We agree the scopes, deliverables and timelines in writing before work starts, since most engagements are fixed-scope.
How we build
- We build the client that calls the mutations, with scopes limited to the operations confirmed in the written scope.
- We test create, update and answer paths against a staging Decidim instance, including permission denials and rejected inputs.
- We check that machine user accounts, tokens and secrets are stored and rotated in line with your own security controls.
How we hand over
- We document the credential setup, the scope list, the mutations in use and the component permissions each machine user needs.
- We record the configuration steps for each Decidim environment so your team can repeat them for staging and production.
- We walk your engineers through the code, runbooks and test cases so they can extend the integration without us.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, covering changes to the integration after each Decidim release.
- Upgrade work follows the one-minor-version-at-a-time path, and we retest the write paths after each step.
- Confirm with us during scoping which support hours, response channels and retest cycles the retainer includes.

