Meet Toki Operator

Docs/Manage API

Integrations

Connected apps, Tremendous payouts, past order imports and customer sign-in with Toki.

Integrations connect Toki with the other tools your store runs on, such as Klaviyo or Recharge. Customer sign-in with Toki makes Toki an OpenID Connect provider, so an OIDC client such as Shopify customer accounts can sign customers in with their Toki account.

Operations4 queries · 7 mutations

integrations#

Lists the integrations available to your store, in the order of the Integrations page in the Toki app, Shopify first. Installed integrations include their saved settings in initialData. Apps that need no setup in Toki, such as Loox or Yotpo, are always listed as installed.

Arguments

  • externalEventsBoolean

    When true, include only installed integrations that support external workflow events.

Returns

TokiIntegrationConnection!

A page of TokiIntegration in nodes, with pageInfo for the next page. Each item:

An integration available to your store: whether it is installed, the settings form the Toki app shows for it and its saved settings.

  • identifierTokiIntegrationIdentifier!

    An integration, by the service it connects to, such as KLAVIYO. SHOPIFY and WOOCOMMERCE stand for your store's platform, and CUSTOMER_METAFIELDS writes member properties to Shopify customer metafields.

    TAGGUNATTENTIVEOMNISENDJUDGE_MESTAY_AIHEARTLANDTREMENDOUSSENDLANELISTRAKGORGIASKO_FISHOPIFYWOOCOMMERCEKLAVIYOBRAZEPOSTSCRIPTRECHARGEDRIPCHURN_BUSTERSNOWFLAKEGREENSPARKLOOPRELOADIFYCORSOLOOXOKENDOREVIEWS_IOSTAMPEDYOTPOFAIRINGSMARTRRSKIOCUSTOMER_METAFIELDS
  • installedBoolean!

    Whether the integration is installed on your store; for SHOPIFY, whether the Toki app is installed in your Shopify store.

  • hasManageButtonBoolean

    Whether the Toki app offers Manage for the integration while it is installed.

  • hasDeleteButtonBoolean

    Whether the Toki app offers Uninstall for the integration while it is installed.

  • hasInstallButtonBoolean

    Whether the Toki app offers Install for the integration while it isn't installed.

  • docsUrlString

    The setup guide the Toki app links to as Guide; null or empty when there is none.

  • contactUsBoolean

    Whether the Toki app offers Contact Us for the integration, which you set up together with Toki.

  • nameString!

    The integration's display name, such as Judge.me.

  • domainString!

    The service's website, such as klaviyo.com; your store's domain for SHOPIFY.

  • logoString!

    The path of the integration's logo in the Toki app, such as /v0/integrations/klaviyo/logo.svg.

  • formFields[TokiIntegrationListFormItem!]!

    The settings form the Toki app shows for the integration, item by item. Fields are tied by name to the integration's settings in integrationInstall.

  • initialDataTokiJSON

    The saved settings of an installed integration as JSON. Configured secrets are replaced with ********; send that mask back to keep a saved credential. null when it isn't installed.

query Integrations($first: Int) {
  integrations(first: $first) {
    nodes {
      identifier
      installed
      hasManageButton
      name
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "first": 10
}
Response
{
  "data": {
    "integrations": {
      "nodes": [
        {
          "identifier": "TAGGUN",
          "installed": false,
          "hasManageButton": true,
          "name": "Gold"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yOjE5"
      }
    }
  }
}
query

integration#

Returns one integration from integrations, or null when it isn't available to your store.

Arguments

  • identifierTokiIntegrationIdentifier!Required

    An integration, by the service it connects to, such as KLAVIYO. SHOPIFY and WOOCOMMERCE stand for your store's platform, and CUSTOMER_METAFIELDS writes member properties to Shopify customer metafields.

    TAGGUNATTENTIVEOMNISENDJUDGE_MESTAY_AIHEARTLANDTREMENDOUSSENDLANELISTRAKGORGIASKO_FISHOPIFYWOOCOMMERCEKLAVIYOBRAZEPOSTSCRIPTRECHARGEDRIPCHURN_BUSTERSNOWFLAKEGREENSPARKLOOPRELOADIFYCORSOLOOXOKENDOREVIEWS_IOSTAMPEDYOTPOFAIRINGSMARTRRSKIOCUSTOMER_METAFIELDS

Returns

TokiIntegration

An integration available to your store: whether it is installed, the settings form the Toki app shows for it and its saved settings.

  • identifierTokiIntegrationIdentifier!

    An integration, by the service it connects to, such as KLAVIYO. SHOPIFY and WOOCOMMERCE stand for your store's platform, and CUSTOMER_METAFIELDS writes member properties to Shopify customer metafields.

    TAGGUNATTENTIVEOMNISENDJUDGE_MESTAY_AIHEARTLANDTREMENDOUSSENDLANELISTRAKGORGIASKO_FISHOPIFYWOOCOMMERCEKLAVIYOBRAZEPOSTSCRIPTRECHARGEDRIPCHURN_BUSTERSNOWFLAKEGREENSPARKLOOPRELOADIFYCORSOLOOXOKENDOREVIEWS_IOSTAMPEDYOTPOFAIRINGSMARTRRSKIOCUSTOMER_METAFIELDS
  • installedBoolean!

    Whether the integration is installed on your store; for SHOPIFY, whether the Toki app is installed in your Shopify store.

  • hasManageButtonBoolean

    Whether the Toki app offers Manage for the integration while it is installed.

  • hasDeleteButtonBoolean

    Whether the Toki app offers Uninstall for the integration while it is installed.

  • hasInstallButtonBoolean

    Whether the Toki app offers Install for the integration while it isn't installed.

  • docsUrlString

    The setup guide the Toki app links to as Guide; null or empty when there is none.

  • contactUsBoolean

    Whether the Toki app offers Contact Us for the integration, which you set up together with Toki.

  • nameString!

    The integration's display name, such as Judge.me.

  • domainString!

    The service's website, such as klaviyo.com; your store's domain for SHOPIFY.

  • logoString!

    The path of the integration's logo in the Toki app, such as /v0/integrations/klaviyo/logo.svg.

  • formFields[TokiIntegrationListFormItem!]!

    The settings form the Toki app shows for the integration, item by item. Fields are tied by name to the integration's settings in integrationInstall.

  • initialDataTokiJSON

    The saved settings of an installed integration as JSON. Configured secrets are replaced with ********; send that mask back to keep a saved credential. null when it isn't installed.

query Integration($identifier: TokiIntegrationIdentifier!) {
  integration(identifier: $identifier) {
    identifier
    installed
    hasManageButton
    hasDeleteButton
    hasInstallButton
    docsUrl
    name
  }
}
Variables
{
  "identifier": "TAGGUN"
}
Response
{
  "data": {
    "integration": {
      "identifier": "TAGGUN",
      "installed": false,
      "hasManageButton": true,
      "hasDeleteButton": true,
      "hasInstallButton": true,
      "docsUrl": "https://example.com/toki/webhooks",
      "name": "Gold"
    }
  }
}

tremendousCashouts#

Lists the payouts members cashed out through Tremendous in your store, newest first. This is the payout history of the Tremendous integration in the Toki app.

Arguments

  • reverseBoolean

    Reverse the sort order.

Returns

TokiTremendousCashoutConnection!

A page of TokiTremendousCashout in nodes, with pageInfo for the next page. Each item:

A member's cash-out of points to a Tremendous payout, such as PayPal or a gift card.

  • idID!

    Also sent to Tremendous as the order's external_id.

  • createdAtString!

    When the member cashed out.

  • customerNameString!

    The member's name, as sent to Tremendous.

  • customerEmailString!

    The email address Tremendous sends the payout to.

  • productNameString!

    The payout method, such as PayPal USA or a gift card brand; the Tremendous product ID when Toki doesn't know the product.

  • pointsFloat!

    Points taken from the member's balance for the payout.

  • storeCreditNameString!

    The name of the balance the points came from.

  • payoutAmountFloat!

    The payout's value in currencyCode, as a decimal amount: points converted at the balance's default conversion rate.

  • currencyCodeString!

    The currency of payoutAmount: your store's currency.

  • statusTokiTremendousCashoutStatus!

    processing while Toki places the payout with Tremendous; sent once Tremendous has executed it and emails it to the member; refunded when Tremendous declined it or it failed or was cancelled, and the points went back to the member's balance; needs_review when Toki couldn't confirm the outcome, so the points stay deducted and the order needs checking in your Tremendous account.

    processingsentrefundedneeds_review
  • errorMessageString

    The latest error Toki got while placing the payout, such as why Tremendous declined it; null once it is sent, or when there was no error.

query TremendousCashouts($first: Int) {
  tremendousCashouts(first: $first) {
    nodes {
      id
      createdAt
      points
      status
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "first": 10
}
Response
{
  "data": {
    "tremendousCashouts": {
      "nodes": [
        {
          "id": "03e2cd41-02e2-4bae-a1e2-ca1b00e2c888",
          "createdAt": "2026-10-14T09:30:00.000Z",
          "points": 1.5,
          "status": "processing"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yOjE5"
      }
    }
  }
}
mutation

integrationInstall#

Installs an integration on your store, or saves new settings for an installed one. Sending ******** keeps a saved secret. Other empty or omitted secrets also keep their saved values, except Multipass, where an empty or omitted token disables it. New secret values replace the saved credentials. Some integrations do more on save, for example Klaviyo receives a sample of every Toki event. Toki checks the values, with the other service where it can: problems come back in errors, though some rejected credentials fail the request instead. For SHOPIFY and WOOCOMMERCE it only saves the Multipass token, which SHOPIFY refuses while the customer authentication provider is set up and not DISABLED.

Input

TokiIntegrationInstallInput!
  • integrationTokiIntegrationInput!Required

    The integration and its settings. Set exactly one field: the settings of the integration you install, or true for an integration without settings.

Returns

TokiIntegrationInstallPayload!
  • errors[TokiIntegrationInstallErrorsEntry!]

    Problems with the values you sent: key is the field, such as apiKey, and value the message. null on success.

mutation IntegrationInstall($input: TokiIntegrationInstallInput!) {
  integrationInstall(input: $input) {
    errors {
      key
      value
    }
  }
}
Variables
{
  "input": {
    "integration": {
      "identifierTAGGUN": {
        "apiKey": "Api key"
      }
    }
  }
}
Response
{
  "data": {
    "integrationInstall": {
      "errors": [
        {
          "key": "Key",
          "value": "Value"
        }
      ]
    }
  }
}
mutation

integrationUninstall#

Uninstalls an integration from your store and deletes the settings and credentials saved for it. Where it can, Toki also removes what it set up in the other service, such as its Judge.me webhook.

Input

TokiIntegrationUninstallInput!
  • identifierTokiIntegrationIdentifier!Required

    An integration, by the service it connects to, such as KLAVIYO. SHOPIFY and WOOCOMMERCE stand for your store's platform, and CUSTOMER_METAFIELDS writes member properties to Shopify customer metafields.

    TAGGUNATTENTIVEOMNISENDJUDGE_MESTAY_AIHEARTLANDTREMENDOUSSENDLANELISTRAKGORGIASKO_FISHOPIFYWOOCOMMERCEKLAVIYOBRAZEPOSTSCRIPTRECHARGEDRIPCHURN_BUSTERSNOWFLAKEGREENSPARKLOOPRELOADIFYCORSOLOOXOKENDOREVIEWS_IOSTAMPEDYOTPOFAIRINGSMARTRRSKIOCUSTOMER_METAFIELDS

Returns

Boolean!

true when the change was made. Anything that stops it comes back as an error.

mutation IntegrationUninstall($input: TokiIntegrationUninstallInput!) {
  integrationUninstall(input: $input)
}
Variables
{
  "input": {
    "identifier": "TAGGUN"
  }
}
Response
{
  "data": {
    "integrationUninstall": true
  }
}
mutation

integrationOrderImportStart#

Starts importing your store's past paid, partially paid and partially refunded orders from Shopify, in the background. Orders Toki already has are skipped, customers who aren't members yet become members, and imported orders earn no rewards. A member whose imported order is older than their join date gets the order's date as their join date.

Input

TokiIntegrationOrderImportStartInput!

Nothing to set: pass an empty input: {}.

Returns

Boolean!

true when the change was made. Anything that stops it comes back as an error.

mutation IntegrationOrderImportStart($input: TokiIntegrationOrderImportStartInput!) {
  integrationOrderImportStart(input: $input)
}
Variables
{
  "input": {}
}
Response
{
  "data": {
    "integrationOrderImportStart": true
  }
}
query

customerAuthenticationProvider#

Returns your store's setup of customer sign-in with Toki: its status, the values to enter in your OIDC client and the URLs you saved.

Returns

TokiCustomerAuthenticationProviderPayload!

Your store's customer sign-in with Toki, in which Toki is the OpenID Connect provider for an OIDC client such as Shopify customer accounts.

  • statusTokiCustomerAuthenticationProviderStatus!

    NOT_CONFIGURED until you generate credentials, DRAFT until you save callback and sign-out URLs, then READY. It becomes ACTIVE once your OIDC client exchanges an authorization code for tokens, and DISABLED when you disable it. Toki signs customers in only while it is READY or ACTIVE.

    NOT_CONFIGUREDDRAFTREADYACTIVEDISABLED
  • issuerString!

    Toki's OIDC issuer, the iss of the tokens it signs. It is the same for every store.

  • discoveryUrlString!

    The OpenID Connect discovery URL to enter in your OIDC client.

  • clientIdString

    The client ID to enter in your OIDC client; null until you generate credentials.

  • secretConfiguredBoolean!

    Whether a client secret exists. The secret itself is returned only once, when Toki generates it.

  • redirectUris[String!]!

    The callback URLs your OIDC client may send as redirect_uri.

  • postLogoutRedirectUris[String!]!

    The sign-out URLs your OIDC client may send as post_logout_redirect_uri.

  • lastSuccessfulTokenExchangeAtString

    When your OIDC client last exchanged an authorization code for tokens, in ISO 8601; null if it never has.

query CustomerAuthenticationProvider {
  customerAuthenticationProvider {
    status
    issuer
    discoveryUrl
    clientId
    secretConfigured
    redirectUris
    postLogoutRedirectUris
  }
}
Response
{
  "data": {
    "customerAuthenticationProvider": {
      "status": "NOT_CONFIGURED",
      "issuer": "Issuer",
      "discoveryUrl": "https://example.com/toki/webhooks",
      "clientId": "217963aa-2279-453d-af79-608420796217",
      "secretConfigured": false,
      "redirectUris": [
        "https://example.com/toki/webhooks"
      ],
      "postLogoutRedirectUris": [
        "https://example.com/toki/webhooks"
      ]
    }
  }
}
mutation

customerAuthenticationProviderCreate#

Generates OIDC credentials for your store, sets the status to DRAFT and returns the client secret once, in clientSecret; if credentials already exist, even disabled ones, nothing changes and clientSecret is null. Fails while a Multipass token is saved (see integrationInstall), or unless your published wallet_v2 design offers a sign-in method that Toki runs itself (passwordless, authCode, social or email-password in loginAuthorizationTypes).

Input

TokiCustomerAuthenticationProviderCreateInput!

Nothing to set: pass an empty input: {}.

Returns

TokiCustomerAuthenticationProviderCreatePayload!

The provider after the change, and the client secret when Toki generated one.

  • providerTokiCustomerAuthenticationProviderPayload!

    Your store's customer sign-in with Toki, in which Toki is the OpenID Connect provider for an OIDC client such as Shopify customer accounts.

  • clientSecretString

    The client secret Toki just generated. It is returned only here and only once, so store it now; null when no secret was generated.

mutation CustomerAuthenticationProviderCreate($input: TokiCustomerAuthenticationProviderCreateInput!) {
  customerAuthenticationProviderCreate(input: $input) {
    clientSecret
    provider {
      status
      issuer
      discoveryUrl
      clientId
    }
  }
}
Variables
{
  "input": {}
}
Response
{
  "data": {
    "customerAuthenticationProviderCreate": {
      "clientSecret": "Client secret",
      "provider": {
        "status": "NOT_CONFIGURED",
        "issuer": "Issuer",
        "discoveryUrl": "https://example.com/toki/webhooks",
        "clientId": "769390eb-7593-4f58-a893-94117793927e"
      }
    }
  }
}
mutation

customerAuthenticationProviderUpdateUrls#

Replaces the callback and sign-out URLs. An ACTIVE provider stays active; other statuses become READY, which also turns a DISABLED provider back on. Requires credentials, and the same Multipass and wallet checks as customerAuthenticationProviderCreate apply.

Input

TokiCustomerAuthenticationProviderUpdateUrlsInput!
  • redirectUris[String!]!Required

    Your OIDC client's callback URLs, which it sends as redirect_uri. At least one; each must use https:// and have no fragment.

  • postLogoutRedirectUris[String!]!Required

    Your OIDC client's sign-out URLs, which it sends as post_logout_redirect_uri. At least one; each must use https:// and have no fragment.

Returns

TokiCustomerAuthenticationProviderCreatePayload!

The provider after the change, and the client secret when Toki generated one.

  • providerTokiCustomerAuthenticationProviderPayload!

    Your store's customer sign-in with Toki, in which Toki is the OpenID Connect provider for an OIDC client such as Shopify customer accounts.

  • clientSecretString

    The client secret Toki just generated. It is returned only here and only once, so store it now; null when no secret was generated.

mutation CustomerAuthenticationProviderUpdateUrls($input: TokiCustomerAuthenticationProviderUpdateUrlsInput!) {
  customerAuthenticationProviderUpdateUrls(input: $input) {
    clientSecret
    provider {
      status
      issuer
      discoveryUrl
      clientId
    }
  }
}
Variables
{
  "input": {
    "redirectUris": [
      "https://example.com/toki/webhooks"
    ],
    "postLogoutRedirectUris": [
      "https://example.com/toki/webhooks"
    ]
  }
}
Response
{
  "data": {
    "customerAuthenticationProviderUpdateUrls": {
      "clientSecret": "Client secret",
      "provider": {
        "status": "NOT_CONFIGURED",
        "issuer": "Issuer",
        "discoveryUrl": "https://example.com/toki/webhooks",
        "clientId": "f5b80294-f6b8-4427-a7b8-05baf8b8074d"
      }
    }
  }
}
mutation

customerAuthenticationProviderRotateSecret#

Generates a new client secret and returns it once, in clientSecret. The previous secret keeps working for 24 hours, so you can update your OIDC client without interrupting sign-ins. Requires credentials, and fails while a Multipass token is saved.

Input

TokiCustomerAuthenticationProviderRotateSecretInput!

Nothing to set: pass an empty input: {}.

Returns

TokiCustomerAuthenticationProviderCreatePayload!

The provider after the change, and the client secret when Toki generated one.

  • providerTokiCustomerAuthenticationProviderPayload!

    Your store's customer sign-in with Toki, in which Toki is the OpenID Connect provider for an OIDC client such as Shopify customer accounts.

  • clientSecretString

    The client secret Toki just generated. It is returned only here and only once, so store it now; null when no secret was generated.

mutation CustomerAuthenticationProviderRotateSecret($input: TokiCustomerAuthenticationProviderRotateSecretInput!) {
  customerAuthenticationProviderRotateSecret(input: $input) {
    clientSecret
    provider {
      status
      issuer
      discoveryUrl
      clientId
    }
  }
}
Variables
{
  "input": {}
}
Response
{
  "data": {
    "customerAuthenticationProviderRotateSecret": {
      "clientSecret": "Client secret",
      "provider": {
        "status": "NOT_CONFIGURED",
        "issuer": "Issuer",
        "discoveryUrl": "https://example.com/toki/webhooks",
        "clientId": "c15c2bf8-c25c-4d8b-a35c-2f1ec45c30b1"
      }
    }
  }
}
mutation

customerAuthenticationProviderDisable#

Turns customer sign-in with Toki off: the status becomes DISABLED, Toki stops signing customers in and revokes the access it granted, including refresh tokens. Credentials and URLs are kept; customerAuthenticationProviderUpdateUrls turns it back on.

Input

TokiCustomerAuthenticationProviderDisableInput!

Nothing to set: pass an empty input: {}.

Returns

TokiCustomerAuthenticationProviderCreatePayload!

The provider after the change, and the client secret when Toki generated one.

  • providerTokiCustomerAuthenticationProviderPayload!

    Your store's customer sign-in with Toki, in which Toki is the OpenID Connect provider for an OIDC client such as Shopify customer accounts.

  • clientSecretString

    The client secret Toki just generated. It is returned only here and only once, so store it now; null when no secret was generated.

mutation CustomerAuthenticationProviderDisable($input: TokiCustomerAuthenticationProviderDisableInput!) {
  customerAuthenticationProviderDisable(input: $input) {
    clientSecret
    provider {
      status
      issuer
      discoveryUrl
      clientId
    }
  }
}
Variables
{
  "input": {}
}
Response
{
  "data": {
    "customerAuthenticationProviderDisable": {
      "clientSecret": "Client secret",
      "provider": {
        "status": "NOT_CONFIGURED",
        "issuer": "Issuer",
        "discoveryUrl": "https://example.com/toki/webhooks",
        "clientId": "b8459e8b-b745-4cf8-aa45-a1b1b945a01e"
      }
    }
  }
}