GraphQL API Schema
Table of Contents
Query (RootQueryType)
Field | Argument | Type | Description |
---|
campaigns | [Campaign!]! | Returns a public list of campaigns, filtered by title. Can be used to implement a campaign search box on a website. |
title | String | Filter campaigns by title using LIKE format (% means any sequence of characters) |
name | String | DEPRECATED: use campaign() to get one campaign. Filter campaigns by name (exact match). If found, returns list of 1 campaign, otherwise an empty list |
id | Int | DEPRECATED: use campaign() to get one campaign. Select by id, Returns list of 1 result |
campaign | Campaign | Get one campaign. If you have access to the campaign, as lead orpartner, you will get a private view of the campaign, otherwise, a publicview. |
id | Int | Get by id |
name | String | Get by name |
actionPage | ActionPage! | Get action page.Depending on your access (page owner, lead, instance admin),you will get private or public view of the page. |
id | Int | Get action page by id. |
name | String | Get action page by name the widget is displayed on |
url | String | Get action page by url the widget is displayed on (DEPRECATED, use name) |
exportActions | [Action]! | Export actions collected by org, optionally filtered by campaign |
orgName | String! | Organization name |
campaignName | String | Limit results to campaign name |
campaignId | Int | Limit results to campaign id |
start | Int | return only actions with id starting from this argument (inclusive) |
after | DateTime | return only actions created at date time from this argument (inclusive) |
limit | Int | Limit the number of returned actions |
onlyOptIn | Boolean | Only download opted in contacts and actions (default true) |
onlyDoubleOptIn | Boolean | Only download double opted in contacts |
includeTesting | Boolean | Also include testing actions |
currentUser | User! | Get the current user, as determined by Authorization header |
users | [User!]! | Select users from this instnace. Requires a manage users admin permission. |
select | SelectUser | Filter users |
org | PrivateOrg! | Organization api (authenticated) |
name | String! | Name of organisation |
Mutation (RootMutationType)
Field | Argument | Type | Description |
---|
upsertCampaign | Campaign! | Upserts a campaign.Creates or appends campaign and it's action pages. In case of append, itwill change the campaign with the matching name, and action pages withmatching names. It will create new action pages if you pass new names. NoAction Pages will be removed (principle of not removing signature data). |
orgName | String! | Org name |
input | CampaignInput! | Campaign content to be upserted |
updateCampaign | Campaign! | Updates an existing campaign. |
id | Int | Id of campaign to update |
name | String | Name of campaign to update (alterantive to id) |
input | CampaignInput! | Campaign content to be updated |
addCampaign | Campaign! | Add a new campaign |
orgName | String! | Org that is lead of this campaign |
input | CampaignInput! | Campaign content to be added |
deleteCampaign | Status! | Delete a campaign.Deletion will be blocked if there are action pages with personal data (we never remove personal data unless via GDPR). |
id | Int | by id |
name | String | by name |
externalId | Int | by external_id |
updateActionPage | ActionPage! | Update an Action Page |
id | Int | id of page to update |
name | String | name of page to update |
input | ActionPageInput! | content of page to be update |
copyActionPage | ActionPage! | Adds a new Action Page based on another Action Page. Intended to be used tocreate a partner action page based off lead's one. Copies: campaign, locale, config, delivery flag |
orgName | String! | Org owner of new Action Page |
name | String! | New Action Page name |
fromName | String! | Name of Action Page this one is cloned from |
copyCampaignActionPage | ActionPage! | Adds a new Action Page based on latest Action Page from campaign. Intended to be used tocreate a partner action page based off lead's one. Copies: campaign, locale, config, delivery flag |
orgName | String! | Org owner of new Action Page |
name | String! | New Action Page name |
fromCampaignName | String! | Name of Campaign from which the page is copied |
addActionPage | ActionPage! | |
orgName | String! | Org owner of new Action Page |
campaignName | String! | Name of campaign where page is created |
input | ActionPageInput! | Action Page attributes |
launchActionPage | LaunchActionPageResult! | Sends a request to lead to set the page to live=true |
name | String! | Action Page name |
message | String | Optional message for approver |
deleteActionPage | Status! | Delete an action page |
id | Int | Action Page id |
name | String | Action Page name |
addAction | ContactReference! | Adds an action referencing contact data via contactRef |
actionPageId | Int! | |
action | ActionInput! | Action data |
contactRef | ID! | Contact reference |
tracking | TrackingInput | Tracking codes (UTM_*) |
addActionContact | ContactReference! | Adds an action with contact data |
actionPageId | Int! | |
action | ActionInput! | Action data |
contact | ContactInput! | GDPR communication opt |
privacy | ConsentInput! | Signature action data |
tracking | TrackingInput | Tracking codes (UTM_*) |
contactRef | ID | Links previous actions with just reference to this supporter data |
linkActions | ContactReference! | Link actions with refs to contact with contact reference |
actionPageId | Int! | Action Page id |
contactRef | ID! | Contact reference |
linkRefs | [String!] | Link actions with these references (if unlinked to supporter) |
requeueActions | RequeueResult! | Requeue actions into one of processing destinations |
orgName | String! | Organization name |
ids | [Int!] | Action Ids |
queue | Queue! | Destination queue |
addOrgUser | ChangeUserStatus! | Add user to org by email |
orgName | String! | Org name |
input | OrgUserInput! | User content |
inviteOrgUser | Confirm! | Invite an user to org by email (can be not yet user!) |
orgName | String! | org name to invite to |
input | OrgUserInput! | user membership data |
message | String | Optional message for invited user |
updateOrgUser | ChangeUserStatus! | |
orgName | String! | update user membership data |
input | OrgUserInput! | user membership data |
deleteOrgUser | DeleteUserResult | |
orgName | String! | delete user from this org |
email | String! | users email |
updateUser | User! | Update (current) user details |
input | UserDetailsInput! | Input values to update in user |
id | Int | Admin can use user id to specify user to update |
email | String | Admin can use user email to specify user to update |
resetApiToken | String! | |
addOrg | Org! | Add an org. Calling user will become it's owner. |
input | OrgInput! | Contet of the org to be added |
deleteOrg | Status! | Delete an org |
name | String! | Name of organisation to be deleted |
updateOrg | PrivateOrg! | Update an org |
name | String! | Name of organisation, used for lookup, can't be used to change org name |
input | OrgInput! | Content of org to be updated |
updateOrgProcessing | PrivateOrg! | Update org processing settings |
name | String! | Name of the org (to rename it) |
emailBackend | ServiceName | Use a particular owned service type for sending emails |
emailFrom | String | Envelope FROM email when sending emails |
supporterConfirm | Boolean | Is the supporter required to double opt in their action (and associated personal data)? |
supporterConfirmTemplate | String | The email template name that will be used to send the action DOI request |
doiThankYou | Boolean | Should the thank you email be only send when email consent doi is required (and contain it) |
customSupporterConfirm | Boolean | Should proca put action in a custom queue, so an external service can do this? |
customActionConfirm | Boolean | Should proca put action in a custom queue, so an external service can do this? |
customActionDeliver | Boolean | Should proca put action in custom delivery queue, so an external service can sync it? |
customEventDeliver | Boolean | Should proca put events in custom delivery queue, so an external service can sync it? |
eventBackend | ServiceName | Use a particular owned service type for sending events |
storageBackend | ServiceName | Use a particular owned service type for uploading files |
detailBackend | ServiceName | Use a particular owned service type for looking up supporters in CRM |
pushBackend | ServiceName | Use a particular owned service type for sending actions |
joinOrg | JoinOrgResult! | Try becoming a staffer of the org |
name | String! | Join the org of this name |
generateKey | KeyWithPrivate! | Generate a new encryption key in org |
orgName | String! | Name of organisation |
input | GenKeyInput! | |
addKey | Key! | Add a key to encryption keys |
orgName | String! | Name of organisation |
input | AddKeyInput! | key content |
activateKey | ActivateKeyResult! | A separate key activate operation, because you also need to add the key to receiving system before it is used |
orgName | String! | |
id | Int! | Key id |
upsertTemplate | Status | Upsert an email tempalte to be used for sending various emails.It belongs to org and is identified by (name, locale), so you can have multiple "thank_you" templates for different languages. |
orgName | String! | Add email tempalte to which org |
input | EmailTemplateInput! | Email template content |
upsertService | Service! | Insert or update a service for an org, using id to to update a particular one |
orgName | String! | Owner org |
id | Int | Id to select service to be updated |
input | ServiceInput! | Content of service |
addStripePaymentIntent | Json! | Stripe API - add a stripe payment intent, when donating to the action page specified by id |
actionPageId | Int! | Donating to this page |
input | StripePaymentIntentInput! | payment intent content |
contactRef | ID | Contact reference of donating supporter |
testing | Boolean | Use test stripe api keys |
addStripeSubscription | Json! | Stripe API - add a stripe subscription, when donating to the action page specified by id |
actionPageId | Int! | Donating to this page |
input | StripeSubscriptionInput! | subscription intent content |
contactRef | ID | Contact reference of donating supporter |
testing | Boolean | Use test stripe api keys |
addStripeObject | Json! | Create stripe object using Stripe key associated with action page owning org.Pass any of paymentIntent, subscription, customer, price json params to be sent as-is to Stripe API. The result is a JSON returned by Stripe API or a GraphQL Error object.If you provide customer along payment intent or subscription, it will be first created, then their id will be added to params for the payment intent or subscription, so you can pack 2 Stripe API calls into one. You can do the same with price object in case of a subscription. |
actionPageId | Int! | |
paymentIntent | Json | Parameters for Stripe Payment Intent creation |
subscription | Json | Parameters for Stripe Subscription creation |
customer | Json | Parameters for Stripe Customer creation |
price | Json | Parameters for Stripe Price creation |
testing | Boolean | Use test stripe api keys |
acceptOrgConfirm | ConfirmResult! | Accept a confirm on behalf of organisation. |
name | String! | Org name |
confirm | ConfirmInput! | Confirm content |
rejectOrgConfirm | ConfirmResult! | Reject a confirm on behalf of organisation. |
name | String! | Org name |
confirm | ConfirmInput! | Confirm data |
acceptUserConfirm | ConfirmResult! | Accept a confirm by user |
confirm | ConfirmInput! | Confirm data |
rejectUserConfirm | ConfirmResult! | Reject a confirm by user |
confirm | ConfirmInput! | Confirm data |
upsertTargets | [PrivateTarget]! | Upsert multiple targets at once.external_id is used to decide if new target record is added, or existing one is updated. |
targets | [TargetInput!]! | List of targets |
campaignId | Int! | Id of campaign these targets are added to |
replace | Boolean | Remove targets not existing in this upsert (if false, upsert will merge with omitted targets) |
Objects
Action
Field | Argument | Type | Description |
---|
actionId | Int! | Id of action |
createdAt | NaiveDateTime! | Timestamp of creation |
actionType | String! | Action type |
contact | Contact! | supporter contact data |
customFields | Json! | Action custom fields (as stringified JSON) |
fields ⚠️ | [CustomField!]! | Deprecated, use customFields ⚠️ DEPRECATED use custom_fields |
tracking | Tracking | UTM codes |
campaign | Campaign! | Campaign this action was collected in |
actionPage | ActionPage! | Action page this action was collected at |
privacy | Consent! | Consents, privacy data of this action |
donation | Donation | Donation specific data |
ActionCustomFields
Field | Argument | Type | Description |
---|
actionId | Int! | id of action |
actionType | String! | type of action |
insertedAt | NaiveDateTime! | creation timestamp |
area | String | area of supporter that did the action |
customFields | Json! | custom fields as stringified json |
fields ⚠️ | [CustomField!]! | ⚠️ DEPRECATED use custom_fields |
ActionTypeCount
Count of actions for particular action type
Field | Argument | Type | Description |
---|
actionType | String! | action type |
count | Int! | count of actions of action type |
ActivateKeyResult
Field | Argument | Type | Description |
---|
status | Status! | |
ApiToken
Api token metadata
AreaCount
Count of actions for particular action type
Field | Argument | Type | Description |
---|
area | String! | area |
count | Int! | count of supporters in this area |
CampaignMtt
Field | Argument | Type | Description |
---|
startAt | DateTime! | This is first day and start hour of the campaign. Note, every day of the campaign the start hour will be same. |
endAt | DateTime! | This is last day and end hour of the campaign. Note, every day of the campaign the end hour will be same. |
messageTemplate | String | If email templates are used to create MTT, use this template (works like thank you email templates).Otherwise, the raw text that is send with MTT action will make a plain text email. |
testEmail | String | A test target email (yourself) where test mtt actions will be sent (instead to real targets) |
CampaignStats
Campaign statistics
Field | Argument | Type | Description |
---|
supporterCount | Int! | Unique action tagers count |
supporterCountByArea | [AreaCount!]! | Unique action takers by area |
supporterCountByOrg | [OrgCount!]! | Unique action takers by org |
supporterCountByOthers | Int! | Unique supporter count not including the ones collected by org_name |
orgName | String! | Org name to exclude from counting supporters |
actionCount | [ActionTypeCount!]! | Action counts per action types (with duplicates) |
ChangeUserStatus
Field | Argument | Type | Description |
---|
status | Status! | |
Confirm
Field | Argument | Type | Description |
---|
code | String! | Secret code/PIN of the confirm |
email | String | Email the confirm is sent to |
message | String | Message attached to the confirm |
objectId | Int | Object id that confirmable action refers to |
creator | User | Who created the confirm |
ConfirmResult
Field | Argument | Type | Description |
---|
status | Status! | Status of Confirm: Success, Confirming (waiting for confirmation), Noop |
actionPage | ActionPage | Action page if its an object of confirm |
campaign | Campaign | Campaign page if its an object of confirm |
org | Org | Org if its an object of confirm |
message | String | A message attached to the confirm |
Consent
GDPR consent data for this org
Field | Argument | Type | Description |
---|
optIn | Boolean | communication (email) opt-in |
givenAt | NaiveDateTime! | Consent timestamp |
emailStatus | EmailStatus! | Email status, whether it's normal, DOI, or bouncing |
emailStatusChanged | NaiveDateTime | When did the email status change last time |
withConsent | Boolean! | This action contained consent (if false, it could be a share action that is attached to another action containing a consent) |
Field | Argument | Type | Description |
---|
contactRef | ID! | Contact ref (fingerprint) of supporter |
payload | String! | Stringified json with PII optionally encrypted |
nonce | String | Encryption nonce value |
publicKey | KeyIds | Public key used to encrypt this action |
signKey | KeyIds | Signing key used to encrypt this action |
Field | Argument | Type | Description |
---|
contactRef | String! | Contact's reference |
firstName | String | Contacts first name |
CustomField
Custom field with a key and value.
DeleteUserResult
Field | Argument | Type | Description |
---|
status | Status! | |
Donation
Field | Argument | Type | Description |
---|
schema | DonationSchema | |
amount | Int! | Provide amount of this donation, in smallest units for currency |
currency | String! | Provide currency of this donation |
payload | Json! | Donation data |
frequencyUnit | DonationFrequencyUnit! | Donation frequency unit |
JoinOrgResult
Field | Argument | Type | Description |
---|
status | Status! | Result of joining - succes or pending confirmation |
org | Org! | Org that was joined |
Key
Encryption or sign key with integer id (database)
Field | Argument | Type | Description |
---|
id | Int! | Key id |
public | String! | Public part of the key (base64url) |
name | String! | Name of the key (human readable) |
active | Boolean! | Is it active? |
expired | Boolean! | Is it expired? |
expiredAt | NaiveDateTime | When the key was expired, in UTC |
KeyIds
Field | Argument | Type | Description |
---|
id | Int! | Key id |
public | String! | Public part of the key (base64url) |
KeyWithPrivate
Field | Argument | Type | Description |
---|
id | Int! | Key id |
public | String! | Public part of the key (base64url) |
private | String! | Private (Secret) part of the key (base64url) |
name | String! | Name of the key (human readable) |
active | Boolean! | Is it active? |
expired | Boolean! | Is it expired? |
expiredAt | NaiveDateTime | When the key was expired, in UTC |
Field | Argument | Type | Description |
---|
status | Status! | |
OrgCount
Count of supporters for particular org
Field | Argument | Type | Description |
---|
org | Org! | org |
count | Int! | count of supporters registered by org |
OrgUser
Partnership
Field | Argument | Type | Description |
---|
org | Org! | Partner org |
actionPages | [ActionPage!]! | Partner's pages that are part of this campaign (can be more, eg: multiple languages) |
launchRequests | [Confirm!]! | Join/Launch requests of this partner |
launchRequesters | [User!]! | The partner staffers who initiated a request |
PersonalData
Field | Argument | Type | Description |
---|
contactSchema | ContactSchema! | Schema for contact personal information |
supporterConfirm | Boolean! | Email opt in enabled |
supporterConfirmTemplate | String | Email opt in template name |
highSecurity | Boolean! | High data security enabled |
doiThankYou | Boolean! | Only send thank you emails to opt-ins |
PrivateActionPage
Field | Argument | Type | Description |
---|
id | Int! | Id |
locale | String! | Locale for the widget, in i18n format |
name | String! | Name where the widget is hosted |
thankYouTemplate | String | Thank you email templated of this Action Page |
thankYouTemplateRef | String | A reference to thank you email template of this ActionPage |
live | Boolean! | Is live? |
journey ⚠️ | [String!]! | List of steps in journey ⚠️ DEPRECATED moved under config |
config | Json! | Config JSON of this action page |
campaign | Campaign! | Campaign this action page belongs to. |
org | Org! | Org the action page belongs to |
extraSupporters | Int! | Extra supporters, a number added to deduplicated supporter count. Cannot be added to per-area or per-action_type counts. |
delivery | Boolean! | Action page collects also opt-out actions, to deliver them to authorities.If false, the opt-outs will fallback to lead (we never trash data with opt-outs) |
supporterConfirmTemplate | String | Email template to confirm supporter (DOI) |
location | String | Location of the widget as last seen in HTTP REFERER header |
status | ActionPageStatus | Status of action page - STANDBY (ready to get actions), ACTIVE (collecting actions), STALLED (actions not coming any more) |
PrivateCampaign
Field | Argument | Type | Description |
---|
id | Int! | Campaign id |
externalId | Int | External ID (if set) |
name | String! | Internal name of the campaign |
title | String! | Full, official name of the campaign |
contactSchema | ContactSchema! | Schema for contact personal information |
config | Json! | Custom config map |
stats | CampaignStats! | Statistics |
org | Org! | Lead org |
actions | PublicActionsResult! | Fetch public actions. Can be used to display recent comments for example.To allow-list action fields to be public, `campaign.public_actions` must be set to a list of strings in formaction_type:custom_field_name, eg: `["signature:comment"]`. XXX this cannot be set in API, you need to set in backend. |
actionType | String! | Specify action type to return |
limit | Int! | Limit the number of returned actions, default is 10, max is 100) |
targets | [Target] | List MTT targets of this campaign |
forceDelivery | Boolean! | Campaign onwer collects opt-out actions for delivery even if campaign partner is delivering |
actionPages | [PrivateActionPage!]! | Action Pages of this campaign that are accessible to current user |
partnerships | [Partnership!] | List of partnerships and requests to join partnership |
mtt | CampaignMtt | MTT configuration |
PrivateOrg
Field | Argument | Type | Description |
---|
name | String! | Organisation short name |
title | String! | Organisation title (human readable name) |
config | Json! | config |
id | Int! | Organization id |
personalData | PersonalData! | Personal data settings for this org |
keys | [Key!]! | Encryption keys |
select | SelectKey | |
key | Key! | Get encryption key |
select | SelectKey! | Parameters to select the key by |
services | [Service]! | Services of this org |
select | SelectService | Parameters to select the key by |
users | [OrgUser]! | Users of this org |
processing | Processing! | Action processing settings for this org |
campaigns | [Campaign!]! | List campaigns this org is leader or partner of |
select | SelectCampaign | |
actionPages | [ActionPage!]! | List action pages this org has |
select | SelectActionPage | |
actionPage | ActionPage! | Get one page belonging to this org |
id | Int | Id of page |
name | String | Name of page |
campaign | Campaign! | DEPRECATED: use campaign() in API root. Get campaign this org is leader or partner of by id |
id | Int! | |
PrivateTarget
Field | Argument | Type | Description |
---|
id | String! | |
name | String! | Name of target |
externalId | String! | unique external_id of target, used to upsert target |
locale | String | Locale of this target (in which language do they read emails?) |
area | String | Area of the target |
fields | Json | Custom fields, stringified json |
emails | [TargetEmail]! | Email list of this target |
Processing
Field | Argument | Type | Description |
---|
emailFrom | String | Envelope FROM email when sending emails |
emailBackend | ServiceName | Use a particular owned service type for sending emails |
supporterConfirm | Boolean! | Is the supporter required to double opt in their action (and associated personal data)? |
supporterConfirmTemplate | String | The email template name that will be used to send the action DOI request |
doiThankYou | Boolean! | Only send thank you emails to opt-ins |
customSupporterConfirm | Boolean! | Should proca put action in a custom queue, so an external service can do this? |
customActionConfirm | Boolean! | Should proca put action in a custom queue, so an external service can do this? |
customActionDeliver | Boolean! | Should proca put action in custom delivery queue, so an external service can sync it? |
customEventDeliver | Boolean! | Should proca put events in custom delivery queue, so an external service can sync it? |
eventBackend | ServiceName | Use a particular owned service type for sending events |
pushBackend | ServiceName | Use a particular owned service type for sending actions |
storageBackend | ServiceName | Use a particular owned service type for uploading files |
detailBackend | ServiceName | Use a particular owned service type for looking up supporters in CRM |
emailTemplates | [String!] | Email templates. (warn: contant is not available to fetch) |
PublicActionPage
Field | Argument | Type | Description |
---|
id | Int! | Id |
locale | String! | Locale for the widget, in i18n format |
name | String! | Name where the widget is hosted |
thankYouTemplate | String | Thank you email templated of this Action Page |
thankYouTemplateRef | String | A reference to thank you email template of this ActionPage |
live | Boolean! | Is live? |
journey ⚠️ | [String!]! | List of steps in journey ⚠️ DEPRECATED moved under config |
config | Json! | Config JSON of this action page |
campaign | Campaign! | Campaign this action page belongs to. |
org | Org! | Org the action page belongs to |
PublicActionsResult
Result of actions query
Field | Argument | Type | Description |
---|
fieldKeys | [String!] | Custom field keys which are public |
list | [ActionCustomFields] | List of actions custom fields |
PublicCampaign
Field | Argument | Type | Description |
---|
id | Int! | Campaign id |
externalId | Int | External ID (if set) |
name | String! | Internal name of the campaign |
title | String! | Full, official name of the campaign |
contactSchema | ContactSchema! | Schema for contact personal information |
config | Json! | Custom config map |
stats | CampaignStats! | Statistics |
org | Org! | Lead org |
actions | PublicActionsResult! | Fetch public actions. Can be used to display recent comments for example.To allow-list action fields to be public, `campaign.public_actions` must be set to a list of strings in formaction_type:custom_field_name, eg: `["signature:comment"]`. XXX this cannot be set in API, you need to set in backend. |
actionType | String! | Specify action type to return |
limit | Int! | Limit the number of returned actions, default is 10, max is 100) |
targets | [Target] | List MTT targets of this campaign |
PublicOrg
Field | Argument | Type | Description |
---|
name | String! | Organisation short name |
title | String! | Organisation title (human readable name) |
config | Json! | config |
PublicTarget
Field | Argument | Type | Description |
---|
id | String! | |
name | String! | Name of target |
externalId | String! | unique external_id of target, used to upsert target |
locale | String | Locale of this target (in which language do they read emails?) |
area | String | Area of the target |
fields | Json | Custom fields, stringified json |
RequeueResult
Field | Argument | Type | Description |
---|
count | Int! | Count of actions selected for requeueing |
failed | Int! | Count of actions that could not be requeued |
RootSubscriptionType
Service
Field | Argument | Type | Description |
---|
id | Int! | Id |
name | ServiceName! | Service name (type) |
host | String | Hostname of service, but can be used as any "container" of the service. For AWS, contains a region. |
user | String | User, Account id, client id, whatever your API has |
path | String | A sub-selector of a resource. Can be url path, but can be something like AWS bucket name |
TargetEmail
Field | Argument | Type | Description |
---|
email | String! | Email of target |
emailStatus | EmailStatus! | The status of email (normal or bouncing etc) |
error | String | An error received when bouncing email was reported |
Tracking
Tracking codes (UTM params)
User
Field | Argument | Type | Description |
---|
id | Int! | Id of user |
email | String! | Email of user |
phone | String | Phone |
pictureUrl | String | Url to profile picture |
jobTitle | String | Job title |
apiToken | ApiToken | Users API token (to check expiry) |
isAdmin | Boolean! | Is user an admin? |
roles | [UserRole!]! | user's roles in orgs |
UserRole
Field | Argument | Type | Description |
---|
org | Org! | Org this role is in |
role | String! | Role name |
Custom field added to action. For signature it can be contact, for mail it can be subject and body
ActionPageInput
ActionPage input
Field | Type | Description |
---|
name | String | Unique NAME identifying ActionPage.Does not have to exist, must be unique. Can be a 'technical' identifierscoped to particular organization, so it does not have to change when theslugs/names change (eg. some.org/1234). However, frontend Widget canask for ActionPage by it's current location.href (but without https://), in which case it is usefulto make this url match the real widget location. |
locale | String | 2-letter, lowercase, code of ActionPage language |
thankYouTemplate | String | Thank you email template of this ActionPage |
supporterConfirmTemplate | String | Supporter confirm email template of this ActionPage |
extraSupporters | Int | Extra supporter count. If you want to add a number of signatories you have offline or kept in another system, you can specify the number here. |
config | Json | JSON string containing Action Page config |
delivery | Boolean | Collected PII is processed even with no opt-in |
Field | Type | Description |
---|
name | String! | Name of the key |
public | String! | Public part of the key (base64url) |
Address type which can hold different addres fields.
Field | Type | Description |
---|
country | String | Country code (two-letter). |
postcode | String | Postcode, in format correct for country locale |
locality | String | Locality, which can be a city/town/village |
region | String | Region, being province, voyevodship, county |
street | String | Street name |
streetNumber | String | Street number |
Campaign content changed in mutations
Field | Type | Description |
---|
name | String | Campaign short name |
externalId | Int | Campaign external_id. If provided, it will be used to find campaign. Can be used to rename a campaign |
title | String | Campaign human readable title |
contactSchema | ContactSchema | Schema for contact personal information |
config | Json | Custom config as stringified JSON map |
actionPages | [ActionPageInput!] | Action pages of this campaign |
mtt | CampaignMttInput | MTT configuration |
Field | Type | Description |
---|
startAt | DateTime | This is first day and start hour of the campaign. Note, every day of the campaign the start hour will be same. |
endAt | DateTime | This is last day and end hour of the campaign. Note, every day of the campaign the end hour will be same. |
messageTemplate | String | If email templates are used to create MTT, use this template (works like thank you email templates).Otherwise, the raw text that is send with MTT action will make a plain text email. |
testEmail | String | A test target email (yourself) where test mtt actions will be sent (instead to real targets) |
Field | Type | Description |
---|
code | String! | secret code of this confirm |
email | String | email that confirm was assigned for |
objectId | Int | object_id that this confirm refers to |
GDPR consent data structure
Field | Type | Description |
---|
optIn | Boolean | Has contact consented to receiving communication from widget owner? Null: not asked |
leadOptIn | Boolean | Opt in to the campaign leader |
Contact information
Field | Type | Description |
---|
name | String | Full name |
firstName | String | First name (when you provide full name split into first and last) |
lastName | String | Last name (when you provide full name split into first and last) |
email | String | Email |
phone | String | Contacts phone number |
birthDate | Date | Date of birth in format YYYY-MM-DD |
address | AddressInput | Contacts address |
nationality | NationalityInput | Nationality information |
Custom field with a key and value. Both are strings.
Field | Type | Description |
---|
key | String! | |
value | String! | |
transient | Boolean | Unused. To mark action_type/key as transient, use campaign.transient_actions list |
Field | Type | Description |
---|
schema | DonationSchema | Provide payload schema to validate, eg. stripe_payment_intent |
amount | Int | Provide amount of this donation, in smallest units for currency |
currency | String | Provide currency of this donation |
frequencyUnit | DonationFrequencyUnit | How often is the recurring donation collected |
payload | Json! | Custom JSON data |
Field | Type | Description |
---|
name | String! | Name of the key |
Field | Type | Description |
---|
subject | String | Subject line |
body | String | Body |
targets | [String!]! | Target ids |
files | [String!] | Files to attach (images allowed) |
Field | Type | Description |
---|
country | String! | Nationality / issuer of id document |
documentType | String | Document type |
documentNumber | String | Document serial id/number |
Field | Type | Description |
---|
name | String | Name used to rename |
title | String | Organisation title (human readable name) |
contactSchema | ContactSchema | Schema for contact personal information |
supporterConfirm | Boolean | Email opt in enabled |
supporterConfirmTemplate | String | Email opt in template name |
doiThankYou | Boolean | Only send thank you emails to opt-ins |
config | Json | Config |
Field | Type | Description |
---|
email | String! | Email of user |
role | String! | Role name of user in this org |
SelectActionPage
Field | Type | Description |
---|
campaignId | Int | Filter by campaign Id |
SelectCampaign
SelectKey
Field | Type | Description |
---|
id | Int | Key id |
active | Boolean | Only active |
public | String | Key having this public part |
SelectService
SelectUser
Criteria to filter users
Field | Type | Description |
---|
id | Int | |
email | String | Use % as wildcard |
orgName | String | Exact org name |
Field | Type | Description |
---|
name | ServiceName! | Service name (type) |
host | String | Hostname of service, but can be used as any "container" of the service. For AWS, contains a region. |
user | String | User, Account id, client id, whatever your API has |
password | String | Password, key, secret or whatever your API has as secret credential |
path | String | A sub-selector of a resource. Can be url path, but can be something like AWS bucket name |
Field | Type | Description |
---|
amount | Int! | Amount of payment |
currency | String! | Currency ofo payment |
paymentMethodTypes | [String!] | Stripe payment method type |
Field | Type | Description |
---|
amount | Int! | Amount of payment |
currency | String! | Currency ofo payment |
frequencyUnit | DonationFrequencyUnit! | how often is recurrent payment made? |
Field | Type | Description |
---|
email | String! | Email of target |
Field | Type | Description |
---|
name | String | Name of target |
externalId | String! | unique external_id of target, used to upsert target |
locale | String | Locale of this target (in which language do they read emails?) |
area | String | Area of the target |
fields | Json | Custom fields, stringified json |
emails | [TargetEmailInput!] | Email list of this target |
Tracking codes, utm medium/campaign/source default to 'unknown', content to empty string
Field | Type | Description |
---|
source | String | |
medium | String | |
campaign | String | |
content | String | |
location | String | Action page location. Url from which action is added. Must contain schema, domain, (port), pathname |
Field | Type | Description |
---|
pictureUrl | String | Users profile pic url |
jobTitle | String | Job title |
phone | String | Phone |
Enums
ActionPageStatus
Value | Description | STANDBY | This action page is ready to receive first action or is stalled for over 1 year |
ACTIVE | This action page received actions lately |
STALLED | This action page did not receive actions lately |
Value | Description | BASIC | |
POPULAR_INITIATIVE | |
ECI | |
IT_CI | |
DonationFrequencyUnit
Value | Description | ONE_OFF | |
WEEKLY | |
MONTHLY | |
DAILY | |
DonationSchema
Value | Description | STRIPE_PAYMENT_INTENT | |
EmailStatus
Value | Description | NONE | An unused email. (Warning: Or used, but we do not store the fact that emails are delivered ok) |
DOUBLE_OPT_IN | The user has received a DOI on this email and accepted it |
BOUNCE | This email was used and bounced |
BLOCKED | This email was used and blocked |
SPAM | This email was used and marked spam |
UNSUB | This email was used and user unsubscribed |
Queue
Value | Description | EMAIL_SUPPORTER | Queue of thank you email sender worker |
CUSTOM_SUPPORTER_CONFIRM | a custom queue of action that needs DOI |
CUSTOM_ACTION_CONFIRM | a custom queue of action that needs moderation |
CUSTOM_ACTION_DELIVER | a custom queue of actions to sync to CRM |
SQS | Queue of SQS sync worker |
WEBHOOK | Queue of webhook sync worker |
ServiceName
Value | Description | SES | AWS SES to send emails |
SQS | AWS SQS to process messages |
MAILJET | Mailjet to send emails |
SMTP | SMTP to send emails |
WORDPRESS | Wordpress HTTP API |
STRIPE | Stripe to process donations |
TEST_STRIPE | Stripe test account to test donations |
WEBHOOK | HTTP POST webhook |
SYSTEM | Use a service that instance org is using |
SUPABASE | Supabase to store files |
Status
Value | Description | SUCCESS | Operation completed succesfully |
CONFIRMING | Operation awaiting confirmation |
NOOP | Operation had no effect (already done) |
Scalars
Boolean
The Boolean
scalar type represents true
or false
.
Date
The Date
scalar type represents a date. The Date appears in a JSON
response as an ISO8601 formatted string, without a time component.
DateTime
The DateTime
scalar type represents a date and time in the UTC
timezone. The DateTime appears in a JSON response as an ISO8601 formatted
string, including UTC timezone ("Z"). The parsed date and time string will
be converted to UTC if there is an offset.
ID
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
Int
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Json
NaiveDateTime
The Naive DateTime
scalar type represents a naive date and time without
timezone. The DateTime appears in a JSON response as an ISO8601 formatted
string.
String
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Interfaces
ActionPage
Field | Argument | Type | Description |
---|
id | Int! | Id |
locale | String! | Locale for the widget, in i18n format |
name | String! | Name where the widget is hosted |
thankYouTemplate | String | Thank you email templated of this Action Page |
thankYouTemplateRef | String | A reference to thank you email template of this ActionPage |
live | Boolean! | Is live? |
journey ⚠️ | [String!]! | List of steps in journey ⚠️ DEPRECATED moved under config |
config | Json! | Config JSON of this action page |
campaign | Campaign! | Campaign this action page belongs to. |
org | Org! | Org the action page belongs to |
Campaign
Field | Argument | Type | Description |
---|
id | Int! | Campaign id |
externalId | Int | External ID (if set) |
name | String! | Internal name of the campaign |
title | String! | Full, official name of the campaign |
contactSchema | ContactSchema! | Schema for contact personal information |
config | Json! | Custom config map |
stats | CampaignStats! | Statistics |
org | Org! | Lead org |
actions | PublicActionsResult! | Fetch public actions. Can be used to display recent comments for example.To allow-list action fields to be public, `campaign.public_actions` must be set to a list of strings in formaction_type:custom_field_name, eg: `["signature:comment"]`. XXX this cannot be set in API, you need to set in backend. |
actionType | String! | Specify action type to return |
limit | Int! | Limit the number of returned actions, default is 10, max is 100) |
targets | [Target] | List MTT targets of this campaign |
Org
Field | Argument | Type | Description |
---|
name | String! | Organisation short name |
title | String! | Organisation title (human readable name) |
config | Json! | config |
Target
Field | Argument | Type | Description |
---|
id | String! | |
name | String! | Name of target |
externalId | String! | unique external_id of target, used to upsert target |
locale | String | Locale of this target (in which language do they read emails?) |
area | String | Area of the target |
fields | Json | Custom fields, stringified json |
Done in 0.18s.