Petitions

Update an existing petition

Changed on

Updates an existing petition

patch/api/v2/petitions/{id}

Request

  • Base URL
    https://yournation.nationbuilder.com
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "id": "1",
    "type": "petitions",
    "attributes": {
      "additional_signatures_count": 10,
      "auto_response_broadcaster_id": "1",
      "auto_response_content": "Auto response content",
      "auto_response_subject": "Auto response subject",
      "content": "Petition content",
      "goal": 5,
      "intro": "Petition intro",
      "page_id": "1",
      "petition_form_address": "required",
      "petition_form_phone": "optional",
      "signature_name": "endorsement"
    }
  }
}

Response

The updated petition.

metaobject

Non-standard information about the document. Empty unless the endpoint has metadata to convey.

Example response

{
  "data": {
    "id": "1",
    "type": "petitions",
    "attributes": {
      "additional_signatures_count": 10,
      "auto_response_broadcaster_id": "1",
      "auto_response_content": "Auto response content",
      "auto_response_subject": "Auto response subject",
      "content": "Petition content",
      "goal": 5,
      "intro": "Petition intro",
      "page_id": "1",
      "petition_form_address": "required",
      "petition_form_phone": "optional",
      "signature_name": "endorsement"
    }
  },
  "included": [
    {
      "id": "1"
    }
  ]
}

Changes

    • breaking

      added subschema #2 to the request body allOf list

    • breaking

      the request's body type changed from object to no type

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • info

      added the media type application/vnd.api+json to the request body

    • info

      added subschema #2 to the response body allOf list for the response status

    • info

      media type application/json was changed to a more specific media type application/vnd.api+json for the response status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • breaking

      the / request property type changed from no type to object

    • warning

      removed from the / request property allOf list

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the optional property // to the response with the status