Skip to main content

GraphQL Queries for AnnounceKit (Part 2)

Reference for AnnounceKit GraphQL queries — analytics, plans, users, locales and more.

This is the second half of the GraphQL Queries reference. For the first half (me, project, posts, feedbacks, feeds, widgets and more), see GraphQL Queries for AnnounceKit — Part 1.

analyticsv3

Query

The analyticsv3 query is a GraphQL query that returns analytics data for a project. The query takes the following arguments:

  • input (required): An object that specifies the parameters for the analytics query.

Object

The AnalyticsInput object that is returned by the analyticsv3 query is a object with the following properties:

  • project_id (required): The ID of the project that the analytics data belongs to.

  • start_date (required): The start date of the time period for which the analytics data is being retrieved.

  • end_date (required): The end date of the time period for which the analytics data is being retrieved.

  • dimensions (array of strings): The dimensions for the analytics report.

  • metrics (array of strings): The metrics for the analytics report.

  • event_type (array of strings): The event types for the analytics report.

  • post_id (array of integers): The IDs of the posts for the analytics report.

  • widget_id (array of integers): The IDs of the widgets for the analytics report.

  • feed_id (array of integers): The IDs of the feeds for the analytics report.

  • client_country (array of strings): The countries of the users for the analytics report.

  • client_locale (array of strings): The locales of the users for the analytics report.

  • client_device (array of strings): The devices of the users for the analytics report.

  • sort_by (string): The field to sort the results by.

  • sort_desc (boolean): Whether to sort the results in descending order.

  • user_filter (JSON object): A JSON object with user filters for the analytics report.

  • limit (integer): The maximum number of rows to return.

  • offset (integer): The number of rows to skip.

Object

The AnalyticsReport object that is returned by the analyticsv3 query is a object with the following properties:

  • start_date (date): The start date of the time period for which the analytics data is being retrieved.

  • end_date (date): The end date of the time period for which the analytics data is being retrieved.

  • sort_by (string): The field to sort the results by.

  • sort_desc (boolean): Whether to sort the results in descending order.

  • headers (array of AnalyticsReportHeader objects): The headers for the analytics report.

  • rows (array of arrays of strings): The rows of the analytics report.

Object

The AnalyticsReportHeader object that is returned by the analyticsv3 query is a object with the following properties:

  • name (string): The name of the header.

  • type (string): The type of the header.

Examples

The following query will return the analytics data for the project with the ID 123456789 for the time period from 2023-07-01 to 2023-07-31.

GraphQL

query {
analyticsv3(input: {
start_date: "2023-07-01"
end_date: "2023-07-31"
project_id: 123456789
}) {
start_date
sort_by
sort_desc
headers {
name
type
}
}
}

image

Query

The image query is a GraphQL query that returns an image of account. The query takes the following arguments:

  • image_id (required): The ID of the image.

image_id can be found by running the me query.

Object

The Image object that is returned by the image query is a object with the following properties:

  • id (integer): The ID of the image.

  • src (string): The URL of the image.

Object

The src field of the Image object is a function that takes a size parameter and returns the URL of the image in that size. The size parameter can be one of the following values:

  • thumb

  • small

  • medium

  • large

  • original

Examples

The following query will return the image with the ID 123456789. The query will also return the URL of the image in the small size.

GraphQL

{
image(image_id: "4e62f9daea851b085c02e68e9b7366a7") {
id
src(size: "small")
}
}

This query will return the following JSON:

JSON

{
"image": {
"id": 123456789,
"src": "https://example.com/images/123456789-small.jpg"
}
}

checkSubscriptionPlan

Query

The checkSubscriptionPlan query is a GraphQL query that returns the subscription plans of AnnounceKit. The query takes the following arguments:

  • project_id (required): The ID of the project.

  • coupon (optional): The coupon code applied to the subscription plan.

Object

The Plan object that is returned by the checkSubscriptionPlan query is a object with the following properties:

  • id (integer): The ID of the plan.

  • group (string): The group of the plan.

  • name (string): The name of the plan.

  • hasCustomLabels (boolean): Whether the plan allows custom labels.

  • hasCustomDomains (boolean): Whether the plan allows custom domains.

  • hasWhiteLabel (boolean): Whether the plan allows white labeling.

  • hasTeam (boolean): Whether the plan allows teams.

  • hasPrivacy (boolean): Whether the plan allows privacy features.

  • hasSubscriptions (boolean): Whether the plan allows subscriptions.

  • hasFeedback (boolean): Whether the plan allows feedback.

  • hasUserTracking (boolean): Whether the plan allows user tracking.

  • hasSegmentation (boolean): Whether the plan allows segmentation.

  • hasCustomCSS (boolean): Whether the plan allows custom CSS.

  • hasIntegrations (boolean): Whether the plan allows integrations.

  • hasPostCustomization (boolean): Whether the plan allows post customization.

  • hasMultiLanguage (boolean): Whether the plan allows multi-language support.

  • hasThemes (boolean): Whether the plan allows themes.

  • hasBoosters (boolean): Whether the plan allows boosters.

  • hasSaml (boolean): Whether the plan allows SAML.

  • hasIPAccessControl (boolean): Whether the plan allows IP access control.

  • hasEmailDigest (boolean): Whether the plan allows email digests.

  • hasFeatureRequest (boolean): Whether the plan allows feature requests.

  • hasJiraIntegration (boolean): Whether the plan allows Jira integration.

  • hasNotify (boolean): Whether the plan allows notifications.

  • interval (string): The billing interval for the plan.

  • price (integer): The monthly price of the plan.

  • setup_price (integer): The one-time setup price of the plan.

  • bullets (array of strings): The bullets for the plan.

Examples

The following query will return the subscription plan for the project with the ID 123456789.

GraphQL

{
checkSubscriptionPlan(project_id: 123456789, coupon: "MY_COUPON") {
id
group
name
hasCustomLabels
hasCustomDomains
hasWhiteLabel
hasTeam
hasPrivacy
hasSubscriptions
hasFeedback
hasUserTracking
hasSegmentation
hasCustomCSS
hasIntegrations
hasPostCustomization
hasMultiLanguage
hasThemes
hasBoosters
hasSaml
hasIPAccessControl
hasEmailDigest
hasFeatureRequest
hasJiraIntegration
hasNotify
interval
price
setup_price
bullets
}
}

This query will return the following JSON:

JSON

{
"data": {
"checkSubscriptionPlan": [
{
"id": "essentialsv4",
"group": "essentials",
"name": "Essentials",
"hasCustomLabels": true,
"hasCustomDomains": false,
"hasWhiteLabel": false,
"hasTeam": false,
"hasPrivacy": false,
"hasSubscriptions": true,
"hasFeedback": true,
"hasUserTracking": false,
"hasSegmentation": false,
"hasCustomCSS": false,
"hasIntegrations": false,
"hasPostCustomization": true,
"hasMultiLanguage": false,
"hasThemes": false,
"hasBoosters": false,
"hasSaml": false,
"hasIPAccessControl": false,
"hasEmailDigest": false,
"hasFeatureRequest": false,
"hasJiraIntegration": false,
"hasNotify": false,
"interval": "month",
"price": XXXXX,
"setup_price": 0,
"bullets": [
"AI-Powered Post Editor",
"Grammarly Integration",
"Labels",
"Standalone Feed",
"Widgets",
"Comments & Reactions",
"Email Notifications",
"Basic Branding"
]
}

plans

Query

The plans query is a GraphQL query that returns all of the plans that are available. It is similar to "checkSubscriptionPlan"

Object

The Plan object that is returned by the plans query is a object with the following properties:

  • id (integer): The ID of the plan.

  • group (string): The group of the plan.

  • name (string): The name of the plan.

  • hasCustomLabels (boolean): Whether the plan allows custom labels.

  • hasCustomDomains (boolean): Whether the plan allows custom domains.

  • hasWhiteLabel (boolean): Whether the plan allows white labeling.

  • hasTeam (boolean): Whether the plan allows teams.

  • hasPrivacy (boolean): Whether the plan allows privacy features.

  • hasSubscriptions (boolean): Whether the plan allows subscriptions.

  • hasFeedback (boolean): Whether the plan allows feedback.

  • hasUserTracking (boolean): Whether the plan allows user tracking.

  • hasSegmentation (boolean): Whether the plan allows segmentation.

  • hasCustomCSS (boolean): Whether the plan allows custom CSS.

  • hasIntegrations (boolean): Whether the plan allows integrations.

  • hasPostCustomization (boolean): Whether the plan allows post customization.

  • hasMultiLanguage (boolean): Whether the plan allows multi-language support.

  • hasThemes (boolean): Whether the plan allows themes.

  • hasBoosters (boolean): Whether the plan allows boosters.

  • hasSaml (boolean): Whether the plan allows SAML.

  • hasIPAccessControl (boolean): Whether the plan allows IP access control.

  • hasEmailDigest (boolean): Whether the plan allows email digests.

  • hasFeatureRequest (boolean): Whether the plan allows feature requests.

  • hasJiraIntegration (boolean): Whether the plan allows Jira integration.

  • hasNotify (boolean): Whether the plan allows notifications.

  • interval (string): The billing interval for the plan.

  • price (integer): The monthly price of the plan.

  • setup_price (integer): The one-time setup price of the plan.

  • bullets (array of strings): The bullets for the plan.

Examples

The following query will return all of the plans that are available.

GraphQL

{
plans {
id
group
name
hasCustomLabels
hasCustomDomains
hasWhiteLabel
hasTeam
hasPrivacy
hasSubscriptions
hasFeedback
hasUserTracking
hasSegmentation
hasCustomCSS
hasIntegrations
hasPostCustomization
hasMultiLanguage
hasThemes
hasBoosters
hasSaml
hasIPAccessControl
hasEmailDigest
hasFeatureRequest
hasJiraIntegration
hasNotify
interval
price
setup_price
bullets
}
}

This query will return the following JSON:

JSON

{
"plans": [
{
"id": 123456789,
"group": "Pro",
"name": "Pro Plan",
"hasCustomLabels": true,
"hasCustomDomains": true,
"hasWhiteLabel": true,
"hasTeam": true,
"hasPrivacy": true,
"hasSubscriptions": true,
"hasFeedback": true,
"hasUserTracking": true,
"hasSegmentation": true,
"hasCustomCSS": true,
"hasIntegrations": true,
"hasPostCustomization": true,
"hasMultiLanguage": true,
"hasThemes": true,
"hasBoosters

invoices

Query

The invoices query is a GraphQL query that returns all of the invoices for a project.

Object

The Invoice object that is returned by the invoices query is a object with the following properties:

  • id (integer): The ID of the invoice.

  • amount (integer): The amount of the invoice.

  • created_at (date): The date the invoice was created.

  • paid (boolean): Whether the invoice has been paid.

  • pdf (string): The URL of the PDF of the invoice.

Examples

The following query will return all of the invoices for the project with the ID 123456789.

GraphQL

{
invoices(project_id: 123456789) {
id
amount
created_at
paid
pdf
}
}

This query will return the following JSON:

JSON

{
"invoices": [
{
"id": 123456789,
"amount": 100,
"created_at": "2023-07-01T00:00:00Z",
"paid": true,
"pdf": "https://example.com/invoices/123456789.pdf"
},
{
"id": 987654321,
"amount": 50,
"created_at": "2023-06-30T00:00:00Z",
"paid": false,
"pdf": "https://example.com/invoices/987654321.pdf"
}
]
}

projectLocale

Query

The projectLocale query is a GraphQL query that returns a project locale.

Object

The ProjectLocale object that is returned by the projectLocale query is a object with the following properties:

  • id (integer): The ID of the project locale.

  • project_id (integer): The ID of the project.

  • locale_id (integer): The ID of the locale.

  • overrides (array of LocaleEntry objects): The overrides for the locale.

  • project (object): The project object.

  • locale (object): The locale object.

Object

The LocaleEntry object that is returned by the projectLocale query is a object with the following properties:

  • key (string): The key of the locale entry.

  • value (string): The value of the locale entry.

Examples

The following query will return the project locale for the project with the ID 123456789 and the locale ID 987654321.

GraphQL

{
projectLocale(project_id: 123456789, locale_id: 987654321) {
id
project_id
locale_id
}
}

This query will return the following JSON:

JSON

{
"projectLocale": {
"id": 123456789,
"project_id": 123456789,
"locale_id": 987654321
}
}

projectLocales

Query

The projectLocales query is a GraphQL query that returns all of the project locales for a project.

Object

The ProjectLocale object that is returned by the projectLocales query is a object with the following properties:

  • id (integer): The ID of the project locale.

  • project_id (integer): The ID of the project.

  • locale_id (integer): The ID of the locale.

  • overrides (array of LocaleEntry objects): The overrides for the locale.

  • project (object): The project object.

  • locale (object): The locale object.

Object

The LocaleEntry object that is returned by the projectLocales query is a object with the following properties:

  • key (string): The key of the locale entry.

  • value (string): The value of the locale entry.

Examples

The following query will return all of the project locales for the project with the ID 123456789.

GraphQL

{
projectLocales(project_id:123456789) {
id
project {
id
}
project_id
locale_id
locale {
id
}
}
}

This query will return the following JSON:

JSON

{
"data": {
"projectLocales": [
{
"id": "3-en",
"project": {
"id": "3"
},
"project_id": "3",
"locale_id": "en",
"locale": {
"id": "en"
}
}
]
}
}

  • projectWebhooks

Query

The projectWebhooks query is a GraphQL query that returns all of the project webhooks for a project.

Object

The ProjectWebhook object that is returned by the projectWebhooks query is a object with the following properties:

  • id (integer): The ID of the project webhook.

  • project_id (integer): The ID of the project.

  • is_enabled (boolean): Whether the webhook is enabled.

  • url (string): The URL of the webhook.

Examples

The following query will return all of the project webhooks for the project with the ID 123456789.

GraphQL

{
projectWebhooks(project_id: 123456789) {
id
project_id
is_enabled
url
}
}

This query will return the following JSON:

JSON

{
"projectWebhooks": [
{
"id": 123456789,
"project_id": 123456789,
"is_enabled": true,
"url": "https://example.com/webhooks/my-project"
},
{
"id": 234567890,
"project_id": 123456789,
"is_enabled": false,
"url": "https://example.com/webhooks/my-project-2"
}
]
}

samlConfig

Query

The samlConfig query is a GraphQL query that returns the SAML configuration for a project.

Object

The SAMLConfig object that is returned by the samlConfig query is a object with the following properties:

  • id (integer): The ID of the SAML configuration.

  • project_id (integer): The ID of the project.

  • route (string): The route for the SAML SSO endpoint.

  • login_url (string): The URL of the SAML IDP login page.

  • certificate (string): The certificate for the SAML IDP.

  • domain (string): The domain of the SAML IDP.

  • is_domain_verified (boolean): Whether the domain has been verified.

  • verify_token (string): The token for verifying the domain.

Examples

The following query will return the SAML configuration for the project with the ID 123456789.

GraphQL

{
samlConfig(project_id: 123456789) {
id
project_id
route
login_url
certificate
domain
is_domain_verified
verify_token
}
}

This query will return the following JSON:

JSON

{
"samlConfig": {
"id": 123456789,
"project_id": 123456789,
"route": "/saml/login",
"login_url": "https://idp.example.com/sso/saml2/login",
"certificate": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----",
"domain": "example.com",
"is_domain_verified": true,
"verify_token": "1234567890"
}
}

samlLoginURL

Query

The samlLoginURL query is a GraphQL query that returns the SAML login URL for a domain.

Object

The SAMLConfig object that is returned by the samlLoginURL query is a string with the following properties:

  • login_url (string): The URL of the SAML IDP login page.

Examples

The following query will return the SAML login URL for the domain example.com.

GraphQL

{
samlLoginURL(domain: "example.com")
}

JSON

{
"samlLoginURL": "https://idp.example.com/sso/saml2/login"
}

projectSecret

Query

The projectSecret query is a GraphQL query that returns the project secret for a project.

Object

The ProjectSecret object that is returned by the projectSecret query is a string with the following properties:

  • secret (string): The project secret.

Examples

The following query will return the project secret for the project with the ID 123456789.

GraphQL

{
projectSecret(project_id: 123456789)
}

This query will return the following JSON:

JSON

{
"secret": "my-secret-key"
}

Note: The project secret is a randomly generated string that is used to authenticate requests to the project's API. It is important to keep the project secret secret!

locale

Query

The locale query is a GraphQL query that returns a locale.

Object

The Locale object that is returned by the locale query is a object with the following properties:

  • id (integer): The ID of the locale.

  • name (string): The name of the locale.

  • entries (array of LocaleEntry objects): The entries for the locale.

Object

The LocaleEntry object that is returned by the locale query is a object with the following properties:

  • key (string): The key of the locale entry.

  • value (string): The value of the locale entry.

Examples

The following query will return the locale with the ID 123456789.

GraphQL

{
locale(locale_id: 123456789) {
id
name
}
}

This query will return the following JSON:

JSON

{
"locale": {
"id": 123456789,
"name": "Spanish"
}
}

locales

Query

The locales query is a GraphQL query that returns all of the locales.

Object

The Locale object that is returned by the locales query is a object with the following properties:

  • id (integer): The ID of the locale.

  • name (string): The name of the locale.

  • entries (array of LocaleEntry objects): The entries for the locale.

Object

The LocaleEntry object that is returned by the locales query is a object with the following properties:

  • key (string): The key of the locale entry.

  • value (string): The value of the locale entry.

Examples

The following query will return all of the locales:

GraphQL

{
locales {
id
name
}
}

This query will return the following JSON:

JSON

{
"data": {
"locales": [
{
"id": "en",
"name": "English"
},
{
"id": "gb",
"name": "English (en-GB)"
},
{
"id": "de",
"name": "Deutsch"
},
}
]
}
}

users

Query

The users query is a GraphQL query that returns all of the users.

Object

The User object that is returned by the users query is a object with the following properties:

  • id (integer): The ID of the user.

  • hash (string): The hash of the user's password.

  • email (string): The email address of the user.

  • display_name (string): The display name of the user.

  • title (string): The title of the user.

  • created_at (date): The date the user was created.

  • image_id (integer): The ID of the user's image.

  • image (object): The user's image.

  • active_project (object): The user's active project.

  • memberships (array of ProjectMember objects): The user's memberships.

  • avatar (string): The user's avatar.

  • is_validated (boolean): Whether the user has been validated.

  • is_totp_enabled (boolean): Whether the user has two-factor authentication enabled.

  • is_unsubs (boolean): Whether the user has unsubscribed from emails.

Examples

The following query will return all of the users.

GraphQL

{
users(page: 0) {
id
hash
email
display_name
title
created_at
image_id
avatar
is_validated
is_totp_enabled
is_unsubs
}
}

This query will return the following JSON:

JSON

{
"users": [
{
"id": 123456789,
"hash": "some-hash",
"email": "[email protected]",
"display_name": "John Doe",
"title": "Software Engineer",
"created_at": "2023-07-17T00:00:00Z",
"image_id": 123456789,
"avatar": "https://example.com/avatars/123456789.png",
"is_validated": true,
"is_totp_enabled": false,
"is_unsubs": false
},
{
"id": 987654321,
"hash": "some-other-hash",
"email": "[email protected]",
"display_name": "Jane Doe",
"title": "Product Manager",
"created_at": "2023-07-16T00:00:00Z",
"image_id": 987654321
}
]
}

checkActiveFeatures

Query

The checkActiveFeatures query is a GraphQL query that returns the active features for a project.

Object

The Features object that is returned by the checkActiveFeatures query is a object with the following properties:

  • hasCustomLabels (boolean): Whether the project has custom labels enabled.

  • hasCustomDomains (boolean): Whether the project has custom domains enabled.

  • hasWhiteLabel (boolean): Whether the project has white labeling enabled.

  • hasTeam (boolean): Whether the project has teams enabled.

  • hasPrivacy (boolean): Whether the project has privacy features enabled.

  • hasSubscriptions (boolean): Whether the project has subscriptions enabled.

  • hasFeedback (boolean): Whether the project has feedback enabled.

  • hasUserTracking (boolean): Whether the project has user tracking enabled.

  • hasSegmentation (boolean): Whether the project has segmentation enabled.

  • hasCustomCSS (boolean): Whether the project has custom CSS enabled.

  • hasIntegrations (boolean): Whether the project has integrations enabled.

  • hasPostCustomization (boolean): Whether the project has post customization enabled.

  • hasMultiLanguage (boolean): Whether the project has multi-language support enabled.

  • hasThemes (boolean): Whether the project has themes enabled.

  • hasBoosters (boolean): Whether the project has boosters enabled.

  • hasEmailDigest (boolean): Whether the project has email digests enabled.

  • hasFeatureRequest (boolean): Whether the project has feature requests enabled.

  • hasJiraIntegration (boolean): Whether the project has Jira integration enabled.

  • hasNotify (boolean): Whether the project has notifications enabled.

Examples

The following query will return the active features for the project with the ID 123456789.

GraphQL

{
checkActiveFeatures(project_id: 123456789) {
hasThemes {
value
}
hasPrivacy {
value
}
hasBoosters {
value
}
}
}

This query will return the following JSON:

JSON

{
"data": {
"checkActiveFeatures": {
"hasThemes": {
"value": true
},
"hasPrivacy": {
"value": false
},
"hasBoosters": {
"value": false
}
}
}
}

onboarding

Query

The onboarding query is a GraphQL query that returns the onboarding progress for a project.

Object

The Onboarding object that is returned by the onboarding query is a object with the following properties:

  • progress (integer): The current progress of the onboarding process.

  • items (array of OnboardingStep objects): The onboarding steps.

Object

The OnboardingStep object that is returned by the onboarding query is a object with the following properties:

  • step_key (string): The unique identifier of the onboarding step.

  • index (integer): The index of the onboarding step.

  • is_done (boolean): Whether the onboarding step has been completed.

  • is_active (boolean): Whether the onboarding step is active.

  • title (string): The title of the onboarding step.

  • description (string): The description of the onboarding step.

  • target_url (array of QuickStartControllers objects): The URLs of the resources for the onboarding step.

  • time (string): The estimated time to complete the onboarding step.

Examples

The following query will return the onboarding progress for the project with the ID 123456789.

GraphQL

{
onboarding(project_id: 123456789) {
progress
items {
step_key
index
is_done
is_active
title
description
target_url {
forceReload
error
}
time
}
}
}

This query will return the following JSON:

JSON

{
"data": {
"onboarding": {
"progress": 4,
"items": [
{
"step_key": "post_create",
"index": 0,
"is_done": true,
"is_active": false,
"title": "Draft your first announcement",
"description": "New feature? Bug fix? Improvement? Whatever it is, leverage the power of AI to manage ideas & solutions with your users.",
"target_url": [
{
"forceReload": null,
"error": null
},
{
"forceReload": true,
"error": null
}
],
"time": "2 min"
},
{
"step_key": "customize_feed",
"index": 1,
"is_done": true,
"is_active": false,
"title": "Customize your standalone feed page",
"description": "Set up your feed page according to your needs. Stand out from the crowd and reflect your brand with your own designs and colors.",
"target_url": [
{
"forceReload": null,
"error": null
}
],
"time": "3 min"
},
{
"step_key": "widget_create",
"index": 2,
"is_done": true,
"is_active": false,
"title": "Create a widget to display announcements",
"description": "Set up a widget to make sure your announcements reach your users in the right place, at the right time. No coding required.",
"target_url": [
{
"forceReload": null,
"error": null
},
{
"forceReload": null,
"error": null
}
],
"time": "4 min"
},
{
"step_key": "team_invite",
"index": 3,
"is_done": true,
"is_active": false,
"title": "Invite your teammates",
"description": "Invite your teammates and colleagues to work together on this project.",
"target_url": [
{
"forceReload": null,
"error": null
}
],
"time": "2 min"
},
{
"step_key": "project_update",
"index": 4,
"is_done": false,
"is_active": true,
"title": "Update project settings",
"description": "Check the project settings and update them according to your needs & requirements. That way there are no surprises.",
"target_url": [
{
"forceReload": null,
"error": null
}
],
"time": "2 min"
}
]
}
}
}

emailConfig

Query

The emailConfig query is a GraphQL query that returns the email digest configuration for a project.

Object

The EmailConfig object that is returned by the emailConfig query is a object with the following properties:

  • project_id (integer): The ID of the project.

  • send_day (integer): The day of the week to send emails.

  • sending_interval (string): The interval between email sends.

  • filter_labels (array of String objects): The labels to filter emails by.

  • include_labels (array of String objects): The labels to include emails by.

  • include_segmented_posts (boolean): Whether to include segmented posts in emails.

  • post_content_type (string): The type of content to include in emails.

  • last_send_date (date): The date of the last email send.

  • is_enabled (boolean): Whether email notifications are enabled.

Examples

The following query will return the email configuration for the project with the ID 123456789.

GraphQL

{
emailConfig(project_id: 3) {
project_id
send_day
sending_interval
filter_labels
include_labels
include_segmented_posts
post_content_type
last_send_date
is_enabled
}
}

JSON

{
"data": {
"emailConfig": {
"project_id": "123456789",
"send_day": 3,
"sending_interval": "monthly",
"filter_labels": [],
"include_labels": [],
"include_segmented_posts": true,
"post_content_type": "summary",
"last_send_date": "2023-06-01T00:00:00.000Z",
"is_enabled": true
}
}
}

projectEmailSenderConfig

Query

The projectEmailSenderConfig query is a GraphQL query that returns the email sender configuration for a project.

Object

The ProjectEmailSenderConfig object that is returned by the projectEmailSenderConfig query is a object with the following properties:

  • project_id (integer): The ID of the project.

  • provider (string): The email sender provider.

  • sender_name (string): The sender name.

  • sender_email (string): The sender email address.

  • sender_domain (string): The sender domain.

  • provider_endpoint (string): The provider endpoint.

  • provider_api_key (string): The provider API key.

  • provider_username (string): The provider username.

  • provider_password (string): The provider password.

  • email_reply_to (string): The email reply-to address.

Examples

The following query will return the email sender configuration for the project with the ID 123456789.

GraphQL

{
projectEmailSenderConfig(project_id: 123456789) {
project_id
provider
sender_name
sender_email
sender_domain
provider_endpoint
provider_api_key
provider_username
provider_password
email_reply_to
}
}

This query will return the following JSON:

JSON

{
"projectEmailSenderConfig": {
"project_id": 123456789,
"provider": "Mailgun",
"sender_name": "Bard Team",
"sender_email": "[email protected]",
"sender_domain": "example.com",
"provider_endpoint": "https://api.mailgun.com/v3/example.com",
"provider_api_key": "abc123",
"provider_username": "bard",
"provider_password": "secret",
"email_reply_to": "[email protected]"
}
}

projectRoadmapConfig

Query

The projectRoadmapConfig query is a GraphQL query that returns the roadmap configuration for a project.

Object

The ProjectRoadmapConfig object that is returned by the projectRoadmapConfig query is a object with the following properties:

  • project_id (integer): The ID of the project.

  • title (string): The title of the roadmap.

  • is_enabled (boolean): Whether the roadmap is enabled.

  • is_hidden_in_feed (boolean): Whether the roadmap is hidden in the feed.

  • is_hidden_in_widget (boolean): Whether the roadmap is hidden in the widget.

Examples

The following query will return the roadmap configuration for the project with the ID 123456789.

GraphQL

{
projectRoadmapConfig(project_id: 1234456789) {
project_id
title
is_enabled
is_hidden_in_feed
is_hidden_in_widget
}
}

This query will return the following JSON:

JSON

{
"data": {
"projectRoadmapConfig": {
"project_id": "3",
"title": null,
"is_enabled": true,
"is_hidden_in_feed": false,
"is_hidden_in_widget": false
}
}
}

projectFeatureRequestConfig

Query

The projectFeatureRequestConfig query is a GraphQL query that returns the feature request configuration for a project.

Object

The ProjectFeatureRequestConfig object that is returned by the projectFeatureRequestConfig query is a object with the following properties:

  • project_id (integer): The ID of the project.

  • is_enabled (boolean): Whether feature requests are enabled.

  • is_hidden_in_feed (boolean): Whether feature requests are hidden in the feed.

  • is_hidden_in_widget (boolean): Whether feature requests are hidden in the widget.

  • is_approvement_enabled (boolean): Whether feature requests require approval.

  • is_default_status_private (boolean): Whether feature requests are private by default.

  • is_comments_public (boolean): Whether comments on feature requests are public.

  • button_name (string): The text of the feature request button.

Examples

The following query will return the feature request configuration for the project with the ID 123456789.

GraphQL

{
projectFeatureRequestConfig(project_id: 123456789) {
project_id
is_enabled
is_hidden_in_feed
is_hidden_in_widget
is_approvement_enabled
is_default_status_private
is_comments_public
button_name
}
}

This query will return the following JSON:

JSON

{
"projectFeatureRequestConfig": {
"project_id": 123456789,
"is_enabled": true,
"is_hidden_in_feed": false,
"is_hidden_in_widget": false,
"is_approvement_enabled": true,
"is_default_status_private": false,
"is_comments_public": true,
"button_name": "Request a Feature"
}
}

projectWarnings

Query

The projectWarnings query is a GraphQL query that returns all of the warnings for a project.

Object

The ProjectWarning object that is returned by the projectWarnings query is a object with the following properties:

  • id (integer): The ID of the warning.

  • created_at (date): The date the warning was created.

  • project_id (integer): The ID of the project.

  • event_vars (JSON object): The event variables that triggered the warning.

Examples

The following query will return all of the warnings for the project with the ID 123456789.

GraphQL

{
projectWarnings(project_id: 123456789) {
id
created_at
project_id
event_vars
}
}

This query will return the following JSON:

JSON

{
"projectWarnings": [
{
"id": 1,
"created_at": "2023-07-17T00:00:00Z",
"project_id": 123456789,
"event_vars": {
"warning_type": "invalid_label_name",
"label_name": "invalid-label-name"
}
},
{
"id": 2,
"created_at": "2023-07-17T00:00:01Z",
"project_id": 123456789,
"event_vars": {
"warning_type": "invalid_post_content",
"post_content": "This post contains invalid content."
}
}
]
}

projectMagicInviteLink

Query

The projectMagicInviteLink query is a GraphQL query that returns the magic invite link for a project.

Object

The ProjectMagicInviteLink object that is returned by the projectMagicInviteLink query is a string that represents the magic invite link for the project.

Examples

The following query will return the magic invite link for the project with the ID 123456789.

GraphQL

{
projectMagicInviteLink(project_id: 123456789)
}

This query will return the following string:

https://example.com/join/123456789

Note: The magic invite link is a unique URL that can be used to invite users to join a project. The link will expire after a certain amount of time.

previewPost

Query

The previewPost query is a GraphQL query that previews a post.

Object

The PreviewPost object that is returned by the previewPost query is a JSON object that contains the following properties:

  • locale_id (string): The locale ID of the post.

  • title (string): The title of the post.

  • body (string): The body of the post.

  • summary (string): The summary of the post.

  • name (string): The name of the post.

  • image_id (integer): The ID of the image for the post.

  • labels (array of integers): The IDs of the labels for the post.

  • flags (array of strings): The flags for the post.

Examples

The following query will preview a post with the following content:

query {
previewPost(project_id: 3, content: { locale_id: "en_US", title: "My Title", body: "Post body", summary: "Post summary" })
}

This query will return the following JSON object:

JSON

{
"locale_id": "en-US",
"title": "My Post Title",
"body": "This is the body of my post.",
"summary": "This is the summary of my post.",
"name": "My Post Name",
"image_id": 123456789,
"labels": [1, 2, 3],
"flags": ["draft", "private"]
}

Note: The previewPost query does not actually create a post. It simply returns a preview of what the post would look like if it were created.

statuses

Query

The statuses query is a GraphQL query that returns all of the statuses of the Feature Request for a project.

Object

The Status object that is returned by the statuses query is a object with the following properties:

  • id (integer): The ID of the status.

  • name (string): The name of the status.

  • color (string): The color of the status.

Examples

The following query will return all of the statuses for the project with the ID 123456789.

GraphQL

{
statuses(project_id: 123456789) {
id
name
color
}
}

This query will return the following JSON:

JSON

{
"statuses": [
{
"id": 1,
"name": "Open",
"color": "#337ab7"
},
{
"id": 2,
"name": "In Progress",
"color": "#97ca86"
},
{
"id": 3,
"name": "Done",
"color": "#43a047"
}
]
}

issues

Query

The issues query is a GraphQL query that returns all of the live Roadmap items for a project.

Object

The Issues object that is returned by the issues query is a object with the following properties:

  • list (array of Issue objects): The list of issues.

  • count (integer): The total number of issues.

  • page (integer): The current page number.

  • pages (integer): The total number of pages.

Object

The Issue object that is returned by the issues query is a object with the following properties:

  • id (integer): The ID of the issue.

  • created_at (date): The date the issue was created.

  • updated_at (date): The date the issue was updated.

  • status_id (integer): The ID of the status for the issue.

  • status (Status object): The status for the issue.

  • title (string): The title of the issue.

  • summary (string): The summary of the issue.

  • due_at (date): The due date for the issue.

  • sort_index (integer): The sort index for the issue.

  • user_id (integer): The ID of the user who created the issue.

  • user (User object): The user who created the issue.

  • labels (array of IssueLabel objects): The labels for the issue.

Examples

The following query will return all of the issues for the project with the ID 123456789.

GraphQL

{
issues(project_id: 29289) {
list {
id
created_at
updated_at
status_id
status {
id
}
title
summary
due_at
sort_index
user_id
user {
id
}
labels {
label_id
}
}
count
page
pages
}
}

This query will return the following JSON:

JSON

{
"data": {
"issues": {
"list": [
{
"id": "1884",
"created_at": "2023-07-17T20:49:23.248Z",
"updated_at": "2023-07-17T20:49:23.248Z",
"status_id": "2645",
"status": {
"id": "2645"
},
"title": "Testing",
"summary": "This is a live example in a Roadmap",
"due_at": "2023-07-16T21:00:00.000Z",
"sort_index": 0,
"user_id": "15924",
"user": {
"id": "15924"
},
"labels": [
{
"label_id": "47061"
}
]
}
],
"count": 1,
"page": 0,
"pages": 1
}
}
}

Feature Requests

Query

The featureRequests query is a GraphQL query that returns all of the feature requests for a project.

Object

The FeatureRequests object that is returned by the featureRequests query is a object with the following properties:

  • list (array of FeatureRequest objects): The list of feature requests.

  • count (integer): The total number of feature requests.

  • page (integer): The current page number.

  • pages (integer): The total number of pages.

Object

The FeatureRequest object that is returned by the featureRequests query is a object with the following properties:

  • id (integer): The ID of the feature request.

  • project_id (integer): The ID of the project the feature request belongs to.

  • project (Project object): The project the feature request belongs to.

  • created_at (date): The date the feature request was created.

  • updated_at (date): The date the feature request was updated.

  • user_id (integer): The ID of the user who created the feature request.

  • user (User object): The user who created the feature request.

  • external_user_id (string): The ID of the external user who created the feature request, if applicable.

  • external_user (ExternalUser object): The external user who created the feature request, if applicable.

  • title (string): The title of the feature request.

  • summary (string): The summary of the feature request.

  • is_deleted (boolean): Whether the feature request has been deleted.

  • is_archived (boolean): Whether the feature request has been archived.

  • is_internal (boolean): Whether the feature request is internal.

  • is_approved (boolean): Whether the feature request has been approved.

  • is_voting_enabled (boolean): Whether voting is enabled for the feature request.

  • is_commenting_enabled (boolean): Whether commenting is enabled for the feature request.

  • user_info (UserInfo object): The user information for the user who created the feature request.

  • issue_id (integer): The ID of the issue associated with the feature request, if applicable.

  • stats (FeatureRequestStats object): The statistics for the feature request.

  • comments (array of FeatureRequestComment objects): The comments for the feature request.

  • votes (array of FeatureRequestVote objects): The votes for the feature request.

  • labels (array of FeatureRequestLabel objects): The labels for the feature request.

Examples

The following query will return all of the feature requests for the project with the ID 123456789.

GraphQL

{
featureRequests(project_id:123456789,sort_by:TOP,sort_order:DESC) {
list {
id
user_id
title
}
count
page
pages
}
}

This query will return the following JSON:

JSON

{
"featureRequests": {
"list": [
{
"id": 1,
"user_id": 1,
"title": "My Top Feature Request"
},
{
"id": 2,
"user_id": 2,
"title": "Another Great Feature Request"
},
{
"id": 3,
"user_id": 3,
"title": "This Feature Request is Really Good"
}
],
"count": 3,
"page": 1,
"pages": 1
}
}

projectMembers

Query

The projectMembers query is a GraphQL query that returns all of the project members for a project.

Object

The ProjectMembers object that is returned by the projectMembers query is a object with the following properties:

  • list (array of ProjectMember objects): The list of project members.

Object

The ProjectMember object that is returned by the projectMembers query is a object with the following properties:

  • id (integer): The ID of the project member.

  • user_id (integer): The ID of the user who is a project member.

  • project_id (integer): The ID of the project the user is a project member for.

  • user (User object): The user who is a project member.

  • project (Project object): The project the user is a project member for.

  • member_role (string): The role of the project member.

Examples

The following query will return all of the project members for the project with the ID 123456789.

GraphQL

{
projectMembers(project_id: 123456789) {
id
user_id
project_id
user {
id
}
project {
id
}
member_role
}
}

This query will return the following JSON:

JSON

{
"data": {
"projectMembers": [
{
"id": "12345",
"user_id": "12345",
"project_id": "12345",
"user": {
"id": "12345"
},
"project": {
"id": "12345"
},
"member_role": "owner"
}
]
}
}

getProjectDetails

Query

The getProjectDetails query is a GraphQL query that returns the details of a project.

Object

The ProjectDetails object that is returned by the getProjectDetails query is a object with the following properties:

  • id (integer): The ID of the project.

  • project_id (integer): The ID of the project.

  • url (string): The URL of the project.

  • description (string): The description of the project.

  • user_persona (string): The user persona of the project.

Examples

The following query will return the details of the project with the ID 123456789.

GraphQL

{
getProjectDetails(project_id: 123456789) {
id
project_id
url
description
user_persona
}
}

This query will return the following JSON:

JSON

{
"data": {
"getProjectDetails": {
"id": "123456",
"project_id": "123456789",
"url": "https://announcekit.app",
"description": "AnnounceKit is a software solution that enables businesses to communicate updates, releases, and news directly to their users. With AnnounceKit, companies can create and publish customizable announcements on their website, in-app, or via email. The platform offers features such as audience targeting, feedback collection, and analytics to help businesses understand how their announcements are being received.",
"user_persona": "AnnounceKit is ideal for SaaS companies, eCommerce businesses, and other online platforms looking to improve their user experience and keep their customers informed about the latest updates and changes. The tool is also suitable for marketing teams and product managers who need a streamlined way to communicate with their users."
}
}
}

getNotification

Query

The getNotification query is a GraphQL query that returns a notification of a specified post.

Object

The Notification object that is returned by the getNotification query is a object with the following properties:

  • id (integer): The ID of the notification.

  • project_id (integer): The ID of the project the notification is for.

  • post_id (integer): The ID of the post the notification is for.

  • options (JSON): The options of the notification.

  • interaction (string): The interaction of the notification.

  • type (string): The type of the notification.

  • url (string): The URL of the notification.

Examples

The following query will return the notification with the ID 123456789.

GraphQL

{
getNotification(project_id: 3, post_id: 349722) {
id
project_id
post_id
type
url
}
}

This query will return the following JSON:

JSON

{
"notification": {
"id": 1,
"project_id": 3,
"post_id": 349722,
"type": "new_comment",
"url": "https://my-project.bard.ai/posts/349722#comment-1"
}
}
Did this answer your question?