From baa45cb4585c46609df3b1e851f4976c323efe83 Mon Sep 17 00:00:00 2001 From: Owens Ehimen Date: Mon, 26 Jan 2026 10:40:52 -0500 Subject: [PATCH 1/2] List Signatures API --- .../authenticated_api/_signatures.md.erb | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/source/includes/authenticated_api/_signatures.md.erb b/source/includes/authenticated_api/_signatures.md.erb index 73340957ff5..4fc05fb41d3 100644 --- a/source/includes/authenticated_api/_signatures.md.erb +++ b/source/includes/authenticated_api/_signatures.md.erb @@ -354,6 +354,100 @@ signatures | an array of signature results
+### List by Facebook ID + +> GET response body for List by Facebook ID + +```json +{ + "signatures": [ + { + "bucket": "", + "country_without_fallback": "US", + "from_embed": null, + "last_signed_at": "2020-02-01T10:00:00Z", + "user_agent": null, + "deleted_at": null, + "additional_fields": {}, + "id": 123, + "country": "US", + "created_at": "2020-02-01T10:00:00Z", + "updated_at": "2020-02-01T10:00:00Z", + "unsubscribe_at": null, + "email": "foo@bar.com", + "confirmed_at": null, + "confirmed_reason": null, + "first_name": "Foo", + "join_organisation": true, + "last_name": "Bar", + "phone_number": "555-555-5555", + "postcode": "10010", + "source": "", + "token": "abcDEFghi123456789jklMNO", + "user_ip": "123.123.123.123", + "utm_campaign": null, + "utm_content": null, + "utm_medium": null, + "utm_source": null, + "utm_term": null, + "eu_data_processing_consent": false, + "consent_content_version": null, + "data_processing_consent_type": "explicit", + "partnership_opt_ins": [], + "email_opt_in_type": { + "context": "web_form", + "kind": "radio_sure", + "mailable": true, + "external_id": null, + "active": true + }, + "member": { + "id": 111222333, + "created_at": "2020-02-01T10:00:00Z" + }, + "message_to_target": { + "admin_reason": null, + "admin_status": "approved", + "administered_at": "2020-02-01T10:00:19Z", + "subject": "King George, Don't Tax our Tea!", + "text": "We don't want taxation without representation." + }, + "petition": { + "url": "https://your-organisation.controlshiftlabs.com/petitions/no-taxes-on-tea", + "slug": "no-taxes-on-tea" + } + } + ], + "meta": { + "current_page": 1, + "total_pages": 1, + "previous_page": null, + "next_page": null + } +} +``` + +List signatures within your organisation by Facebook ID. This endpoint allows you to find all signatures across all petitions (or optionally a specific petition) made by a member with a particular Facebook ID. + +<%= partial "includes/shared/pagination.md" %> + +Hash | Description +--------- | ------- +meta | pagination information +signatures | an array of signature results + +`GET /api/v1/signatures?facebook_id=1234567890` + +`GET /api/v1/signatures?facebook_id=1234567890&petition_slug=no-taxes-on-tea` + +Query Parameter | Description | Required? +--------- | ------- | --------- +facebook_id | The Facebook ID of the member whose signatures you want to retrieve | Yes +petition_slug | Optional. If provided, will only return signatures for the specified petition | No +page | Page number for pagination | No + + +
### Unsubscribe From 9b14a033a7c24174b90190da1ab045a4f5f800b2 Mon Sep 17 00:00:00 2001 From: Owens Ehimen Date: Mon, 26 Jan 2026 12:33:31 -0500 Subject: [PATCH 2/2] Address PR comments --- source/includes/authenticated_api/_signatures.md.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/includes/authenticated_api/_signatures.md.erb b/source/includes/authenticated_api/_signatures.md.erb index 4fc05fb41d3..10e69b19c78 100644 --- a/source/includes/authenticated_api/_signatures.md.erb +++ b/source/includes/authenticated_api/_signatures.md.erb @@ -427,7 +427,11 @@ signatures | an array of signature results } ``` -List signatures within your organisation by Facebook ID. This endpoint allows you to find all signatures across all petitions (or optionally a specific petition) made by a member with a particular Facebook ID. +List signatures within your organisation that were created via the Sign With Facebook feature from a particular Facebook account. This endpoint searches for signatures based on the Facebook ID that was recorded when someone signed a petition using the old Sign With Facebook authentication method. + +This is not a general member lookup - it specifically finds signatures created through Facebook authentication, not all signatures from a member who happens to have a Facebook account linked. + +This endpoint is primarily useful for responding to data deletion requests from Facebook, where you need to identify and potentially remove all signatures associated with a specific Facebook account. <%= partial "includes/shared/pagination.md" %>