---
title: "Update an existing petition"
method: PATCH
path: "/api/v2/petitions/{id}"
tags: ["Petitions"]
---

# Update an existing petition

`PATCH /api/v2/petitions/{id}`

## Request

- Base URL: `https://yournation.nationbuilder.com`
- URL: `https://yournation.nationbuilder.com/api/v2/petitions/{id}`
- Auth: HTTP bearer

Updates an existing petition

## Request body

- PetitionUpdateRequest: The JSON:API top-level document shape for update requests, whose data member identifies the resource by type and id and carries the changed attributes.
  - `data` object, required
    - `id` string, required: The ID of the resource being updated.
    - `type` 'petitions', required: The JSON:API resource type of the resource being updated.
    - `attributes` PetitionReadWriteAttributes: The attributes of a petition that can be both read and written.
      - `additional_signatures_count` integer, nullable: Number of offline signatures to add to the signature count total.
      - `auto_response_broadcaster_id` string, nullable: The broadcaster that sends the autoresponse.
      - `auto_response_content` string, nullable: The content of the autoresponse email.
      - `auto_response_subject` string, nullable: The subject in the autoresponse email.
      - `content` string, nullable: The content is rendered on the petition page.
      - `gather_volunteers` boolean, nullable: Ask for signers to volunteer.
      - `goal` integer, nullable: The number of signatures you want this petition to receive.
      - `intro` string, nullable: The intro is rendered on the petition page above the content.
      - `is_auto_response` boolean, nullable: Sends an autoresponse to a signup after signing the petition.
      - `page_id` string, nullable: ID of the page associated with the petition
      - `petition_form_address` 'required' | 'optional' | 'hidden' | 'null', nullable: Require or ask signers to include their address in the signature.
      - `petition_form_phone` 'required' | 'optional' | 'hidden' | 'null', nullable: Require or ask signers to include their phone number in the signature.
      - `signature_name` string, nullable: What you call a signature.

## Response `200`

The updated petition.

- PetitionShowResponse: The JSON:API top-level document shape for responses returning a single resource under the data member.
  - `data` object, required: A JSON:API resource identifier object, the type/id pair that uniquely identifies a single resource.
    - `id` string, required: Unique identifier of the resource.
    - `type` 'petitions', required: The JSON:API resource type.
    - `attributes` PetitionReadWriteAttributes: The attributes of a petition that can be both read and written.
      - `additional_signatures_count` integer, nullable: Number of offline signatures to add to the signature count total.
      - `auto_response_broadcaster_id` string, nullable: The broadcaster that sends the autoresponse.
      - `auto_response_content` string, nullable: The content of the autoresponse email.
      - `auto_response_subject` string, nullable: The subject in the autoresponse email.
      - `content` string, nullable: The content is rendered on the petition page.
      - `gather_volunteers` boolean, nullable: Ask for signers to volunteer.
      - `goal` integer, nullable: The number of signatures you want this petition to receive.
      - `intro` string, nullable: The intro is rendered on the petition page above the content.
      - `is_auto_response` boolean, nullable: Sends an autoresponse to a signup after signing the petition.
      - `page_id` string, nullable: ID of the page associated with the petition
      - `petition_form_address` 'required' | 'optional' | 'hidden' | 'null', nullable: Require or ask signers to include their address in the signature.
      - `petition_form_phone` 'required' | 'optional' | 'hidden' | 'null', nullable: Require or ask signers to include their phone number in the signature.
      - `signature_name` string, nullable: What you call a signature.
  - `included` Resource[]: Sideloaded resources requested via the include query parameter. Each entry is a full resource object whose shape is documented under its own resource type.
    - `id` string, required: Unique identifier of the resource.
    - `type` string, required: The JSON:API resource type.
    - `attributes` object: The attributes of the resource, as documented for its resource type.
    - `relationships` object: References from this resource to other resources in the document.
  - `meta` object: Non-standard information about the document. Empty unless the endpoint has metadata to convey.

## Other responses

- `400`: The request body or query parameters are invalid, such as an unknown attribute, filter, filter operator, sort field, or sideload.
- `401`: The access token is missing, expired, or not authorized to access this resource.
- `404`: No resource exists with the provided ID.
- `422`: Model validations failed for the resource being created or updated. Unlike this API's other errors, validation failures are returned as a JSON:API errors document locating each invalid field.
- `429`: The access token has exceeded its request quota for the current rate-limit window.

## Changes

- **2026-11-05** `d5c88ca497ac`: 4 breaking, 1 warning, 8 info
  - added `#/components/schemas/update_request_document, subschema #2` to the request body `allOf` list
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - removed the required property `data` from the response with the `200` status
  - …9 more
- **2026-02-14** `31995b0a1e61`: 1 breaking, 1 warning, 14 info
  - the `data/attributes` request property type changed from no type to `object`
  - removed `#/components/schemas/petition_read_write_attributes, #/components/schemas/petition_write_only_attributes` from the `data/attributes` request property `allOf` list
  - added the new optional request property `data/attributes/additional_signatures_count`
  - added the new optional request property `data/attributes/auto_response_broadcaster_id`
  - …12 more

[Operation history](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api/changes/api/v2/petitions/:id/patch.md)

---

[API](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api.md) - [All operations](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nationbuilder/apis/nationbuilder-v2-api/revisions/d5c88ca497ac?raw)
