NAV Navbar
cURL GraphQL JavaScript Python Ruby
  • Pavlov Training Manual
  • Getting Started
  • Core Concepts
  • Workflow: Image Moderation
  • Workflow: Identity Risk
  • GraphQL Reference
  • Pavlov Training Manual

    Adjust the language above to change the example code. Documentation appears on the center panel, while examples appear on the right panel in the selected language.

    Welcome to the Pavlov API. 🐶

    Pavlov provides integrated, extensible risk workflows for modern businesses. We provide the tools necessary to stop bad actors, protect your customers, and mitigate risk on an on-going basis. Want to understand how Pavlov works? Learn about the core concepts.

    The Pavlov API requires an auth token to get started. Don't have an auth token? Request Early Access »

    Our API uses GraphQL, a flexible query language developed by Facebook. All requests are secure and transferred over HTTPS. Request bodies follow the GraphQL query specification, while response bodies are encoded using JSON.

    Getting Started

    // Install apollographql/apollo-fetch
    // https://github.com/apollographql/apollo-fetch
    //
    // npm install apollo-fetch --save
    
    import { createApolloFetch } from 'apollo-fetch';
    
    const PAVLOV_ENDPOINT = 'https://api.pavlov.ai/v1/graphql'
    const PAVLOV_AUTH_TOKEN = 'MY_AUTH_TOKEN'
    
    const apolloFetch = createApolloFetch({
      uri: PAVLOV_ENDPOINT
    });
    
    apolloFetch.use(({ request, options }, next) => {
      if (!options.headers) {
        options.headers = {};  // Create the headers object if needed.
      }
      options.headers['authorization'] = `Bearer ${PAVLOV_AUTH_TOKEN}`;
    
      next();
    });
    
    apolloFetch({ query: `{ ok }` }).then(console.log).catch(console.error);
    
    curl "https://api.pavlov.ai/v1/graphql" \
      -XPOST \
      -H "Authorization: Bearer $PAVLOV_AUTH_TOKEN" \
      -H "Content-Type: application/graphql" \
      -d "{ ok }"
    
    # Install graphql-python/gql
    # https://github.com/graphql-python/gql
    #
    # pip install gql
    
    from gql import Client, gql
    from gql.transport.requests import RequestsHTTPTransport
    
    PAVLOV_ENDPOINT = 'https://api.pavlov.ai/v1/graphql'
    PAVLOV_AUTH_TOKEN = 'MY_AUTH_TOKEN'
    
    transport = RequestsHTTPTransport(
        url=PAVLOV_ENDPOINT,
        headers={'Authorization': 'Bearer ' + PAVLOV_AUTH_TOKEN}
    )
    
    client = Client(transport=transport)
    
    query = gql('{ ok }')
    client.execute(query)
    
    # Install github/graphql-client
    # https://github.com/github/graphql-client
    #
    # gem install graphql-client
    
    require "graphql/client"
    require "graphql/client/http"
    
    PAVLOV_ENDPOINT = 'https://api.pavlov.ai/v1/graphql'
    PAVLOV_AUTH_TOKEN = "MY_AUTH_TOKEN"
    
    http_transport = GraphQL::Client::HTTP.new(PAVLOV_ENDPOINT) do
      def headers(context)
        { "Authentication": "Bearer #{PAVLOV_AUTH_TOKEN}" }
      end
    end
    
    # Fetch latest schema on init, this will make a network request
    schema = GraphQL::Client.load_schema(http_transport)
    
    # However, it's smart to dump this to a JSON file and load from disk
    #
    # GraphQL::Client.dump_schema(http_transport, "path/to/schema.json")
    # schema = GraphQL::Client.load_schema("path/to/schema.json")
    
    client = GraphQL::Client.new(schema: schema, execute: http_transport)
    
    query = client.parse("{ ok }")
    result = client.query(query)
    

    You can access the Pavlov API programmatically using your GraphQL client of choice. Alternatively, the HTTP requests are simple to make from any HTTP client library in your language.

    GraphQL Endpoint

    All Pavlov API requests use the same HTTP endpoint. Use the POST verb and supply your GraphQL query in the body.

    https://api.pavlov.ai/v1/graphql

    Visiting the following link in your browser will provide access to GraphiQL, an interactive in-browser query editor for code-free exploration.

    https://console.pavlov.ai/v1/graphql

    GraphQL Clients

    We recommend using the following client libraries to connect to the GraphQL API and perform queries or mutations:

    Language Suggested Library
    Javascript Apollo Client
    Python gql
    Ruby graphql-client
    Go graphql-go
    Scala sangria

    Authentication

    All Pavlov APIs require requests to be made over HTTPS and include your secret API key. You can create and manage your signed auth tokens via Settings.

    Authenticate your account when using the API by including your secret key via HTTP Basic Auth (username or password) and HTTP Authorization header as a Bearer (Authorization: Bearer $MY_AUTH_TOKEN). Every GraphQL client has a slightly different way to set HTTP headers when performing requests — consult client documentation for more information.

    Errors

    The Pavlov API to valid GraphQL HTTP requests with 200 OK.

    {
      "errors": [
        {
          "message": "I'm sorry, Dave. I'm afraid I can't do that."
        }
      ]
    }
    

    If your request is valid but there is an error during processing, the error will be returned in the errors key of the response body. Partial errors such as these will still respond with 200 OK.

    Errors relating to the request itself (i.e. invalid GraphQL queries) will return an error HTTP status code (≥ 400).

    Status Code Name Description
    200 OK The provided GraphQL query is valid.
    400 Bad Request The provided GraphQL query is invalid.
    401 Unauthorized The API auth token provided is invalid or expired.
    404 Not Found The requested resource cannot not be found.
    500 Internal Server Error There is an error on our side. We'll look into it. 😜

    Core Concepts

    Actors

    Actors are Pavlov's abstraction of users on your website or application. An actor may be resolvable to a specific person, or may not be. Regardless, Pavlov can run workflows against both known and anonymous actors.

    Actors may be identified by a number of fields:

    Workflows

    Workflows are a step-wise process performed on an actor. Workflows may finish with a score, label, and multiple reasons. Some workflows are entirely automatic, such as those which tap into machine learning models. Other workflows may incorporate human review via the Pavlov Console interface.

    A workflow run is an instance of a workflow with a target actor. The workflow run's results may change over time as human review is added to the workflow.

    Entities

    An entity is unambiguous resource describing a person, place, or thing. The entity graph is Pavlov's interlinked network of entities and their relationships to one another. Pavlov incorporates data from the entity graph to power its workflows.

    Workflow: Image Moderation

    curl -d image@cooldesign.png \
            https://console.pavlov.ai/v1/run/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    

    The response will be JSON formatted and contain the run’s unique identifier:

    {
      "id": "RUNXXXXXXXXXXXXXXXXXXXXXX"
    }
    

    Pavlov’s workflows can be triggered client-side using a single HTTP request. These workflow runs will appear in the Pavlov Console, and the results can be validated server-side. The results of the workflow will be invisible to your users, and can only be resolved by your server.

    You can find your workflow’s Run URL in the Pavlov Console. The URL will be of the form:

    https://console.pavlov.ai/v1/run/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This endpoint has CORS enabled, so you will be able to make the HTTP call directly from your web front-end. To run the workflow, make an HTTP POST request to the workflow’s run URL. Upload the image you wish to have moderated using the image key.

    Your front end should send this run identifier to your back end for cross referencing when receiving decision results. You will likely need to store this run identifier in your database alongside the image itself.

    Receiving Decisions

    Please contact us with a webhook URL where you would like to receive decisions.

    Whenever a decision on a workflow changes, whether via our machine learning engine or via the Pavlov Console, Pavlov makes a web request to a URL exposed on your back end with the decision results. The webhook request body will include the run and decision identifiers, along with the decision’s label, score, and reasons.

    {
      "data": {
        "decision": {
          "id": "DECXXXXXXXXXXXXXXXXXXXXXX",
          "label": "APPROVE",
          "score": 1.0,
          "reasons": [],
          "createdAt": "2017-10-18T05:52:41.763Z",
          "run": {
            "id": "RUNXXXXXXXXXXXXXXXXXXXXXX",
            "image": {
              "rawURL": "https://...",
              "sha256": "..."
            }
          }
        }
      }
    

    The data.decision.label will be one of:

    data.decision.score is a number between 0 and 1, demonstrating Pavlov’s confidence in the decision (1 being full confidence). The score will be null if the decision was made via the Pavlov Console.

    data.decision.reasons is an array of strings, providing human-readable descriptions for why the decision was made.

    You can retrieve the image used to run the request under the data.decision.run.image.rawURL field. Alternatively, you verify that the user provided the correct image using the data.decision.run.sha256 of the image.

    Workflow: Identity Risk

    Example: Assess the risk of an actor, given their email and IP address.

    mutation {
      runWorkflow(
        name: "Identity Risk",
        actor: {
          email: "laika@pavlov.ai"
          ip: "127.0.0.1"
        }
      ) {
        label
        score
        reasons
    
        actor {
          display
        }
      }
    }
    
    curl "https://api.pavlov.ai/v1/graphql" \
      -XPOST \
      -H "Authorization: Bearer $PAVLOV_AUTH_TOKEN" \
      -H "Content-Type: application/graphql" \
      -d '
        mutation {
          runWorkflow(
            name: "Identity Risk",
            actor: {
              email: "laika@pavlov.ai"
              ip: "127.0.0.1"
            }
          ) {
            label
            score
            reasons
    
            actor {
              display
            }
          }
        }
      '
    
    // returns a Promise
    function runSignUpRisk(variables) {
      return apolloFetch({
        query: `
          mutation SignUpRisk($email: String!, $ip: String!) {
            runWorkflow(
              name: "Identity Risk",
              actor: {
                email: $email
                ip: $ip
              }
            ) {
              label
              score
              reasons
    
              actor {
                display
              }
            }
          }
        `,
        variables
      })
    }
    
    // runSignUpRisk({ email: 'laika@pavlov.ai', ip: '127.0.0.1' })
    
    SIGNUP_RISK_QUERY = gql('''
    mutation SignUpRisk($email: String!, $ip: String!) {
      runWorkflow(
        name: "Identity Risk",
        actor: {
          email: $email
          ip: $ip
        }
      ) {
        label
        score
        reasons
    
        actor {
          display
        }
      }
    }
    ''')
    
    def run_signup_risk(**kwargs):
        return client.execute(SIGNUP_RISK_QUERY, **kwargs)
    
    # run_signup_risk(email="laika@pavlov.ai", ip="127.0.0.1")
    
    SIGNUP_RISK_QUERY = client.parse <<-'GRAPHQL'
    mutation SignUpRisk($email: String!, $ip: String!) {
      runWorkflow(
        name: "Identity Risk",
        actor: {
          email: $email
          ip: $ip
        }
      ) {
        label
        score
        reasons
    
        actor {
          display
        }
      }
    }
    GRAPHQL
    
    def run_signup_risk(opts)
      client.query(SIGNUP_RISK_QUERY, variables: opts)
    end
    
    # run_signup_risk({ email: 'laika@pavlov.ai', ip: '127.0.0.1' })
    

    Response:

    {
      "data": {
        "runWorkflow": {
          "label": "APPROVE",
          "score": 1.0,
          "reasons": [
            "Name Match",
            "Email Found"
          ]
    
          "actor": {
            "display": "Alex Kern"
          }
        }
      }
    }
    

    The Identity Risk workflow is a simple way to analyze the risk associated with a new user sign-up on your service. It taps into the Pavlov Entity Graph to resolve an actor's email to a real person.

    To initiate the workflow, have your back-end call the runWorkflow mutation upon sign-up. You must include at least one field to identify the actor (more the merrier). It is up to your back-end to respond appropriately depending on the result.

    Fields

    Field Type Description Example
    name String The name of the workflow being run. Must be "Identity Risk" "Identity Risk"
    actor.name String The name of the actor. "Richard Feynman"
    actor.email String The email address of the actor. "laika@pavlov.ai"
    actor.ip String The IP address of the actor. "127.0.0.1"
    actor.phoneNumber String The phone number of the actor. "+15551234567"

    Reasons

    Identity Risk scores incorporate multiple features about the customer. Features which are given higher weight have a greater effect on the score than features with low weight.

    Reason Weight Description
    IP Blacklist ⭐️⭐️⭐️ If the actor’s IP address is part of a blacklist.
    Email Blacklist ⭐️⭐️⭐️ If the actor’s email address is part of a blacklist.
    Phone Number Blacklist ⭐️⭐️⭐️ If the actor’s phone number is part of a blacklist.
    Email Valid ⭐️⭐️⭐️ If the actor’s email address is of a valid format.
    Email Found ⭐️⭐️⭐️ If the actor’s email address has been seen before.
    Name Match ⭐️⭐️⭐️ If the actor’s name matches the given name.
    Disposable/Free Email ⭐️⭐️ If the actor’s email address is from a disposable account.
    High-risk Location ⭐️⭐️ If the actor’s session comes from a high-risk location.
    New Actor ⭐⭐ If the actor has minimal information related to them.
    Social Profile Found ⭐️ If the actor has an active social profile.

    Results

    The Identity Risk workflow will return a label as one of three states:

    GraphQL Reference

    Query

    ok

    Returns true if the Pavlov API is working.

    Returns Boolean!

    actor

    Retrieves an actor using their unique identifier.

    Returns Actor

    Argument Type Description
    id ID!

    me

    Retrieves your user account.

    Returns User

    authToken

    Retrieves an auth token using its unique identifier.

    Returns AuthToken

    Argument Type Description
    id ID!

    allAuthTokens

    Retrieves all of the auth tokens made by you.

    Returns [AuthToken!]!

    image

    Retrieves an image.

    Returns Image

    Argument Type Description
    id ID!

    The unique identifier of the image.

    onboarding

    Onboarding-related fields

    Returns Onboarding!

    workflow

    Retrieves a workflow using its unique identifier.

    Returns Workflow

    Argument Type Description
    id ID

    The unique identifier of the workflow.

    workflowRun

    Retrieves a workflow run using its unique identifier.

    Returns WorkflowRun

    Argument Type Description
    id ID!

    The unique identifier of the workflow run.

    decision

    Retrieves a decision using its unique identifier.

    Returns Decision

    Argument Type Description
    id ID

    The unique identifier of the decision.

    allWorkflows

    Retrieves all the available workflows.

    Returns [Workflow!]!

    Mutation

    ok

    Returns true if the Pavlov API is working.

    Returns Boolean!

    resolveActor

    Creates and resolves an actor using the given resolution fields.

    Returns Actor

    Argument Type Description
    lookupFields ActorLookupFieldsInput

    createAuthToken

    Creates a new auth token for a Pavlov user.

    Returns CreateAuthTokenResult!

    Argument Type Description
    username String

    The user's username, optional if authenticated.

    password String!

    The user's password.

    audience String

    The audience string for the new auth token.

    deleteAuthToken

    Deletes an auth token for a Pavlov user.

    Returns Ack!

    Argument Type Description
    id ID!

    The unique identifier of the auth token.

    checkInviteCode

    Checks if the invite code is associated with a database.

    Returns CheckInviteCodeResult!

    Argument Type Description
    inviteCode String!

    The invite code to check.

    checkUsername

    Checks if the username is available and permissible according to our security policy.

    Returns CheckUsernameResult!

    Argument Type Description
    inviteCode String!

    The invite code to use.

    username String!

    The username to check.

    checkPassword

    Checks if the password is permissible according to our security policy.

    Returns CheckPasswordResult!

    Argument Type Description
    inviteCode String!

    The invite code to use.

    password String!

    The password to check.

    checkEmail

    Checks if the email is permissible according to our security policy.

    Returns CheckEmailResult!

    Argument Type Description
    inviteCode String!

    The invite code to use.

    email String!

    The email to check.

    verifyEmail

    Verifies an email address for a user.

    Returns VerifyEmailResult!

    Argument Type Description
    verificationCode String!

    The verification code.

    resendEmailVerification

    Resend the email verification message for a user.

    Returns ResendEmailVerificationResult!

    resolveImage

    Resolves an image.

    Returns Image

    Argument Type Description
    lookupFields ImageLookupFieldsInput!

    The lookup fields of the image.

    runWorkflow

    Runs a workflow against an actor.

    Returns WorkflowRun

    Argument Type Description
    id ID

    The unique identifier of the workflow. Required unless name is provided.

    name String

    The name of the workflow. Required unless id is provided.

    title String

    The title for the workflow run.

    subtitle String

    The subtitle for the workflow run.

    actor ActorLookupFieldsInput

    The actor lookup fields, defining the target of the workflow.

    image ImageLookupFieldsInput

    The image lookup fields, defining the target of the workflow.

    addDecision

    Adds a decision to a workflow run.

    Returns Decision

    Argument Type Description
    id ID!

    The unique identifier of the workflow run.

    label String!

    The label of the decision.

    score Float

    The score of the decision.

    reasons [String!]

    The reason for the decision.

    updateWorkflowSettings

    Updates a workflow's settings.

    Returns Workflow

    Argument Type Description
    id ID!

    The unique identifier of the workflow.

    decisionWebhookURL URL

    The new decision webhook URL.

    regenerateDecisionWebhookSecret Boolean

    Whether or not to regenerate the decision webhook secret.

    resendDecisionWebhook

    Resends a decision webhook.

    Returns Decision

    Argument Type Description
    id ID!

    The unique identifier of the decision.

    Objects

    Ack

    Field Argument Type Description
    ok Boolean!

    Actor

    An actor is an abstraction over real-world identities, which can be resolved to a known person, ideally. Not enough information may known about an actor to resolve them to a person unambiguously.

    Field Argument Type Description
    id ID! The unique identifier of the Actor.
    display String! The display representation of the Actor.
    email Email The email address of the actor.
    ipAddress IPAddress The IP address of the actor.
    person Person The person associated with the actor.
    phoneNumber PhoneNumber The person number associated with the actor.
    lookupFields ActorLookupFields! The fields used to look up and resolve the actor.

    ActorLookupFields

    The fields that were used to look up an actor.

    Field Argument Type Description
    email String The email address of an actor.
    name String The name of an actor.
    phoneNumber String The phone number of an actor.
    ipAddress String The IP address of an actor.

    AuthToken

    An auth token, giving permissions to make requests on behalf of a Pavlov user.

    Field Argument Type Description
    id ID! The unique identifier of the auth token.
    user User! The user that the auth token is associated with.
    issuer String! The Pavlov domain which issued the token.
    audience String! The user-supplied name for the primary use of the auth token.
    expiresAt Timestamp! The time when the auth token expires.
    createdAt Timestamp! The time when the auth token was created.

    CheckEmailResult

    The response to a checkEmail mutation.

    Field Argument Type Description
    ok Boolean! Whether or not the email provided is ok.
    warning String! The reason the email is not ok.
    normalized String The normalized email address.

    CheckInviteCodeResult

    The response to a checkInviteCode mutation.

    Field Argument Type Description
    ok Boolean! Whether or not the invite code provided is ok.
    database Database The database associated with the invite code.

    CheckPasswordResult

    The response to a checkPassword mutation.

    Field Argument Type Description
    ok Boolean! Whether or not the password provided is ok.
    strength Float! The score given to the password's strength out of 1.
    warning String! The reason the password is not ok.
    suggestions [String!]! Suggestions for how to make the password better.

    CheckUsernameResult

    The response to a checkUsername mutation.

    Field Argument Type Description
    ok Boolean! Whether or not the username provided is ok.
    warning String! The reasons the username is not ok.

    CreateAuthTokenResult

    The response to a createAuthToken mutation.

    Field Argument Type Description
    ok Boolean! Whether or not the auth token was created.
    warning String! The reason the auth token could not be created.
    signedAuthToken String The signed auth token, to be used when making Pavlov API requests.
    authToken AuthToken Details regarding the auth token.

    Decision

    A decision on a workflow made by an automated system or human.

    Field Argument Type Description
    id ID! The unique identifier of the decision.
    display String! The textual description of the decision.
    label String! The label of the decision.
    score Float The score of the decision.
    reasons [String!]! The reason for the decision.
    isAutomated Boolean! Whether or not the decision was automated.
    createdAt Timestamp! The time when the decision was created.
    run WorkflowRun! The workflow run associated with this decision.
    lastWebhookStatus Int The HTTP status of the last webhook made.
    lastWebhookAt Timestamp The time the last webhook was made.

    EducationExperience

    An education experience of a person at an organization

    Field Argument Type Description
    id ID! The unique identifier of the EducationExperience
    display String! Summary of the education experience
    degrees [String!]! Degrees received or in progress
    endDate Timestamp Time at which education was complete
    isCurrent Boolean Whether the person is still pursuing this education program
    majors [String!]! Majors associated with the degree
    minors [String!]! Minors associated with the degree
    organization Organization! The educating organization
    person Person! Person being educated
    startDate Timestamp Time at which education commenced

    Email

    An email address owned by an entity

    Field Argument Type Description
    id ID! The unique identifier of the Email
    display String! Email address
    address String! Email address
    domain String Domain for the email address
    emailProvider Product Provider tha manages the email server
    isPrimary Boolean Indication of whether this is a primary email for the recipient
    relatedPeople [Person!]! People related to the email
    relatedOrganizations [Organization!]! Organizations related to the email
    type String Type of the email

    IPAddress

    Field Argument Type Description
    id ID! The unique identifier of the IP Address entity
    display String! The display name of the IP Address
    ipAddress String The Internet Protocol (IP) Address, represented in IPv4 or IPv6 format
    website Website A website hosted at this IP Address or associated with the organization at this IP Address
    location Location The location associated with this IP Address
    organization Organization The registering organization associated with this IP address
    asNumber Int The autonomous system number associated with the IP Address
    asOrg Organization The organization associated with the registered autonomous system number for the IP address
    isp Organization The internet service provider for the IP Address

    Image

    An image.

    Field Argument Type Description
    id ID! The unique identifier of the image.
    display String! The display name of the image.
    sha256 String! The SHA 256 of the image.
    contentType String! The content type of the image.
    contentLength Int! The content type of the image.
    sourceURL URL The source URL of the image.
    rawURL URL! The raw URL for the image.
    square512URL URL! The URL for the 512x512 square version of the image.
    square64URL URL! The URL for the 64x64 square version of the image.
    similarImages [SimilarImage!]! Searches
    similarityThreshold Float

    Industry

    An industry made up of organizations in a specific operational domain

    Field Argument Type Description
    id ID! The unique identifier of the Industry
    display String! The name of the industry
    name String! How an industry is referenced

    Language

    A language spoken by people

    Field Argument Type Description
    id ID! The unique identifier of the Language
    display String! The name of the language
    name String! The name of the language

    Location

    A location on Earth for the given entity

    Field Argument Type Description
    id ID! The unique identifier of the Location
    display String! Name associated with a given location
    name String! Name associated with a given location
    timezone Timezone Timezone associated with a given location
    continent String Continent of the given location
    country String Country of the given location
    isPrimary Boolean Whether this is the primary location for the given entity
    latitude String Latitude associated with this countries given location
    locality String The locality associated with this location
    longitude String Longitude associated with this countries given location
    relatedOrganizations [Organization!]! Organizations that are related to the business
    relatedPeople [Person!]! People that are related to the business
    poBox String The PO box associated with this location
    postalCode String Postal code associated with a given location
    region String Region associated with a given location
    state String State of the given location
    streetAddress String Street address associated with a given location
    type String Type of location this is i.e. home, headquarters, regional office, etc.

    Mutation

    Unsafe operations which have side-effects.

    Field Argument Type Description
    ok Boolean! Returns `true` if the Pavlov API is working.
    resolveActor Actor Creates and resolves an actor using the given resolution fields.
    lookupFields ActorLookupFieldsInput
    createUser CreateUserResult! Creates a new Pavlov user.
    username String! The new user's desired username.
    password String! The new user's desired password.
    email String! The new user's desired email.
    preferredName String! How the new user would like to be referred to.
    recaptchaResponse String! A reCAPTCHA challenge response.
    inviteCode String! The new user's invitation code.
    audience String The new user's first access token audience string.
    createAuthToken CreateAuthTokenResult! Creates a new auth token for a Pavlov user.
    username String The user's username, optional if authenticated.
    password String! The user's password.
    audience String The audience string for the new auth token.
    deleteAuthToken Ack! Deletes an auth token for a Pavlov user.
    id ID! The unique identifier of the auth token.
    checkInviteCode CheckInviteCodeResult! Checks if the invite code is associated with a database.
    inviteCode String! The invite code to check.
    checkUsername CheckUsernameResult! Checks if the username is available and permissible according to our security policy.
    inviteCode String! The invite code to use.
    username String! The username to check.
    checkPassword CheckPasswordResult! Checks if the password is permissible according to our security policy.
    inviteCode String! The invite code to use.
    password String! The password to check.
    checkEmail CheckEmailResult! Checks if the email is permissible according to our security policy.
    inviteCode String! The invite code to use.
    email String! The email to check.
    verifyEmail VerifyEmailResult! Verifies an email address for a user.
    verificationCode String! The verification code.
    resendEmailVerification ResendEmailVerificationResult! Resend the email verification message for a user.
    updateConnection Connection!
    id ID!
    active Boolean
    config JSON
    deleteConnection Ack!
    id ID!
    runQuery QueryResult!
    sql String!
    resolveImage Image Resolves an image.
    lookupFields ImageLookupFieldsInput! The lookup fields of the image.
    runWorkflow WorkflowRun Runs a workflow against an actor.
    id ID The unique identifier of the workflow. Required unless `name` is provided.
    name String The name of the workflow. Required unless `id` is provided.
    title String The title for the workflow run.
    subtitle String The subtitle for the workflow run.
    actor ActorLookupFieldsInput The actor lookup fields, defining the target of the workflow.
    image ImageLookupFieldsInput The image lookup fields, defining the target of the workflow.
    addDecision Decision Adds a decision to a workflow run.
    id ID! The unique identifier of the workflow run.
    label String! The label of the decision.
    score Float The score of the decision.
    reasons [String!] The reason for the decision.
    updateWorkflowSettings Workflow Updates a workflow's settings.
    id ID! The unique identifier of the workflow.
    decisionWebhookURL URL The new decision webhook URL.
    regenerateDecisionWebhookSecret Boolean Whether or not to regenerate the decision webhook secret.
    resendDecisionWebhook Decision Resends a decision webhook.
    id ID! The unique identifier of the decision.

    Onboarding

    Onboarding-related fields

    Field Argument Type Description
    isComplete Boolean! Whether or not onboarding has been completed.
    signedAuthToken String The signed auth token, to be used when making Pavlov API requests.
    authToken AuthToken Details regarding the auth token.

    Organization

    An organization such as a school, NGO, corporation, club, etc.

    Field Argument Type Description
    id ID! The unique identifier of the Organization
    display String! Name of the given organization
    name String! Name of the given organization
    DBAs [String!]! Any entities this business does business as
    alexaGlobalRank Int Ranking of the Alexa global traffic to a website
    alexaUSRank Int Ranking of the Alexa US traffic to a website
    competitors [Organization!]! Any competing organizations
    description String A description of the organization
    emails [Email!]! Any emails associated with the organization
    employeeCount String Number of employees
    employees [Person!]! Any people that are employed by the organization
    foundingDate Timestamp Approximate date the company was founded
    images [Image!]! Images assocaited with the organization
    industries [Industry!]! The industries the organization operates in
    legalName String The legal name of the organization
    locations [Location!]! Any locations the organization operates in
    marketCap Int The most recent market capitalization or valuation of the organization
    phoneNumbers [PhoneNumber!]! Phone numbers associated with the organization
    primaryWebsite Website The primary website for the organization
    products [Product!]! Products produced by the organization
    raised Int Total amount of capital raised
    relatedOrganizations [Organization!]! Organizations that are related to the business
    relatedPeople [Person!]! People that are related to the business
    socialProfiles [SocialProfile!]! The organizations social media profiles
    websites [Website!]! Websites associated with the organization

    Person

    A person

    Field Argument Type Description
    id ID! The unique identifier of the Person
    display String! The name of the person
    primaryName PersonName The primary name of the person
    dateOfBirth Timestamp The time this person was born
    educationExperiences [EducationExperience!]! Education this person has received
    emails [Email!]! Emails associated with this person
    gender String The gender identity of this person
    images [Image!]! Images associated with this person
    interests [String!]! Interests of this person
    languages [Language!]! The launguages this person speaks
    locations [Location!]! Locations of this person
    names [PersonName!]! Names this person goes by
    phoneNumbers [PhoneNumber!]! Phone numbers associated with this person
    relatedPeople [Person!]! Other people this person is related to
    skills [String!]! Skills of this person
    socialProfiles [SocialProfile!]! Social media profiles and accounts of this person
    websites [Website!]! Websites this person has
    workExperiences [WorkExperience!]! Work experience of this person

    PersonName

    The name of a given person

    Field Argument Type Description
    id ID! The unique identifier of the PersonName
    display String! The name of the person
    firstName String The first name of a person
    isPrimary Boolean Whether this is the primary name a person uses
    lastName String The last name of a person
    middleName String The middle name of a person
    person Person! The person this name refers to
    prefix String Prefix for this person
    suffix String Suffix for this person
    title String The title of the person

    PhoneNumber

    A phone number

    Field Argument Type Description
    id ID! The unique identifier of the PhoneNumber
    display String! A phone number
    areaCode String Area code of this phone number
    countryCode String Country code of this phone number
    extension String Extension of this phone number
    number String! A phone number
    type String The type of phone number this is i.e. mobile, home, office, support, etc.
    relatedPeople [Person!]! People related to the image
    relatedOrganizations [Organization!]! Organizations related to the image

    Product

    A product or service associated with an entity

    Field Argument Type Description
    id ID! The unique identifier of the Product
    display String! The name of the product
    name String! The name of the product
    website Website! Website associated with the given product or service

    ResendEmailVerificationResult

    The response to a resendEmailVerification mutation.

    Field Argument Type Description
    ok Boolean! Whether or not the email verification was sent.

    SimilarImage

    An image which is similar to another image.

    Field Argument Type Description
    similarity Float! The degree of similarity with the image.
    image Image! The image which is similar.

    SocialProfile

    Profile for a social media account

    Field Argument Type Description
    id ID! The unique identifier of the SocialProfile
    display String! Primary username
    aliases [String!]! Usernames, aliases, or id's associated with the account
    primaryAlias String The primary alias associated with the account
    bio String Biography or summary associated with the profile
    followers Int Most recent number of account followers
    isActive Boolean Whether the account is active or not
    network Product Social network or product a profile is associated with
    url String URL for the profile

    User

    A Pavlov user.

    Field Argument Type Description
    id ID! The unique identifier of the Pavlov user.
    username String! The username of the Pavlov user.
    preferredName String! How the Pavlov user would like to be referred to.
    primaryEmail String! The primary email address of the Pavlov user.
    primaryEmailVerified Boolean! Whether or not the Pavlov user's primary email address has been verified.

    VerifyEmailResult

    The response to a verifyEmail mutation.

    Field Argument Type Description
    ok Boolean! Whether or not the email was verified.
    warning String! The reason the email was not verified.

    Website

    Website associated with an entity

    Field Argument Type Description
    id ID! The unique identifier of the Website
    display String! The name or URL for the website
    name String! The name for the website
    url URL! URL of the website
    domain String! Domain of the website
    type String Type of website
    relatedPeople [Person!]! People related to the image
    relatedOrganizations [Organization!]! Organizations related to the image

    WorkExperience

    Work experience of a person at an organization

    Field Argument Type Description
    id ID! The unique identifier of the WorkExperience
    display String! Title of the work experience
    organization Organization! Organization where this person worked
    person Person! Person who was employed
    roles [WorkRole!]! Roles held at this organization

    WorkRole

    A work experience of a person at an organization

    Field Argument Type Description
    id ID! The unique identifier of the WorkRole
    display String! Title of this role
    title String Title of this role
    endDate Timestamp Time at which this person ended this role
    isCurrent Boolean Whether this person still holds this role
    startDate Timestamp Time at which this person started this role
    workExperience WorkExperience! The work experience associated with this role

    Workflow

    A workflow.

    Field Argument Type Description
    id ID! The unique identifier of the workflow.
    name String! The name of the workflow.
    inboxCount Int! Retrieves the number of runs in the inbox associated with the workflow.
    inboxSearchTerms [String!]! Search terms for the inbox view.
    suggestedSearchTerms [String!]! Suggestions for search terms.
    inboxLabels [String!]! The labels associated with the inbox view.
    possibleLabels [String!]! All possible labels associated with the workflow.
    runURL URL Returns the URL for running this workflow via a client, if allowed.
    decisionWebhookURL String! The URL to send decisions to.
    decisionWebhookSecret String! The secret to use when sending the decision to the webhook URL.
    searchRuns [WorkflowRun!]! Searches runs associated with the workflow.
    searchTerms [String!]!

    WorkflowRun

    An instance of a workflow, run against a target actor.

    Field Argument Type Description
    id ID! The unique identifier of the workflow run.
    workflow Workflow! The workflow associated with the workflow run.
    thumbnailURL URL The thumbnail of the workflow run.
    thumbnailIcon String! The kind of icon to use in place of a thumbnail image.
    title String! The title of the workflow run.
    subtitle String! The subtitle of the workflow run.
    label String! The label status of the workflow run.
    score Float The score status of the workflow run.
    reasons [String!]! The reason for the status of the workflow run.
    actor Actor The actor target of the workflow run.
    image Image The image target of the workflow run.
    decisions [Decision!]! The decisions incorporated into the workflow run.
    createdAt Timestamp! The time when the workflow run was created.
    updatedAt Timestamp! The time when the workflow run was updated.

    Enums

    Timezone

    AFRICA_ABIDJAN, AFRICA_ACCRA, AFRICA_ADDIS_ABABA, AFRICA_ALGIERS, AFRICA_ASMARA, AFRICA_BAMAKO, AFRICA_BANGUI, AFRICA_BANJUL, AFRICA_BISSAU, AFRICA_BLANTYRE, AFRICA_BRAZZAVILLE, AFRICA_BUJUMBURA, AFRICA_CAIRO, AFRICA_CASABLANCA, AFRICA_CEUTA, AFRICA_CONAKRY, AFRICA_DAKAR, AFRICA_DAR_ES_SALAAM, AFRICA_DJIBOUTI, AFRICA_DOUALA, AFRICA_EL_AAIUN, AFRICA_FREETOWN, AFRICA_GABORONE, AFRICA_HARARE, AFRICA_JOHANNESBURG, AFRICA_KAMPALA, AFRICA_KHARTOUM, AFRICA_KIGALI, AFRICA_KINSHASA, AFRICA_LAGOS, AFRICA_LIBREVILLE, AFRICA_LOME, AFRICA_LUANDA, AFRICA_LUBUMBASHI, AFRICA_LUSAKA, AFRICA_MALABO, AFRICA_MAPUTO, AFRICA_MASERU, AFRICA_MBABANE, AFRICA_MOGADISHU, AFRICA_MONROVIA, AFRICA_NAIROBI, AFRICA_NDJAMENA, AFRICA_NIAMEY, AFRICA_NOUAKCHOTT, AFRICA_OUAGADOUGOU, AFRICA_PORTO_NOVO, AFRICA_SAO_TOME, AFRICA_TRIPOLI, AFRICA_TUNIS, AFRICA_WINDHOEK, AMERICA_ADAK, AMERICA_ANCHORAGE, AMERICA_ANGUILLA, AMERICA_ANTIGUA, AMERICA_ARAGUAINA, AMERICA_ARGENTINA_BUENOS_AIRES, AMERICA_ARGENTINA_CATAMARCA, AMERICA_ARGENTINA_CORDOBA, AMERICA_ARGENTINA_JUJUY, AMERICA_ARGENTINA_LA_RIOJA, AMERICA_ARGENTINA_MENDOZA, AMERICA_ARGENTINA_RIO_GALLEGOS, AMERICA_ARGENTINA_SALTA, AMERICA_ARGENTINA_SAN_JUAN, AMERICA_ARGENTINA_SAN_LUIS, AMERICA_ARGENTINA_TUCUMAN, AMERICA_ARGENTINA_USHUAIA, AMERICA_ARUBA, AMERICA_ASUNCION, AMERICA_ATIKOKAN, AMERICA_BAHIA, AMERICA_BAHIA_BANDERAS, AMERICA_BARBADOS, AMERICA_BELEM, AMERICA_BELIZE, AMERICA_BLANC_SABLON, AMERICA_BOA_VISTA, AMERICA_BOGOTA, AMERICA_BOISE, AMERICA_CAMBRIDGE_BAY, AMERICA_CAMPO_GRANDE, AMERICA_CANCUN, AMERICA_CARACAS, AMERICA_CAYENNE, AMERICA_CAYMAN, AMERICA_CHICAGO, AMERICA_CHIHUAHUA, AMERICA_COSTA_RICA, AMERICA_CUIABA, AMERICA_CURACAO, AMERICA_DANMARKSHAVN, AMERICA_DAWSON, AMERICA_DAWSON_CREEK, AMERICA_DENVER, AMERICA_DETROIT, AMERICA_DOMINICA, AMERICA_EDMONTON, AMERICA_EIRUNEPE, AMERICA_EL_SALVADOR, AMERICA_FORTALEZA, AMERICA_GLACE_BAY, AMERICA_GODTHAB, AMERICA_GOOSE_BAY, AMERICA_GRAND_TURK, AMERICA_GRENADA, AMERICA_GUADELOUPE, AMERICA_GUATEMALA, AMERICA_GUAYAQUIL, AMERICA_GUYANA, AMERICA_HALIFAX, AMERICA_HAVANA, AMERICA_HERMOSILLO, AMERICA_INDIANA_INDIANAPOLIS, AMERICA_INDIANA_KNOX, AMERICA_INDIANA_MARENGO, AMERICA_INDIANA_PETERSBURG, AMERICA_INDIANA_TELL_CITY, AMERICA_INDIANA_VEVAY, AMERICA_INDIANA_VINCENNES, AMERICA_INDIANA_WINAMAC, AMERICA_INUVIK, AMERICA_IQALUIT, AMERICA_JAMAICA, AMERICA_JUNEAU, AMERICA_KENTUCKY_LOUISVILLE, AMERICA_KENTUCKY_MONTICELLO, AMERICA_LA_PAZ, AMERICA_LIMA, AMERICA_LOS_ANGELES, AMERICA_MACEIO, AMERICA_MANAGUA, AMERICA_MANAUS, AMERICA_MARTINIQUE, AMERICA_MATAMOROS, AMERICA_MAZATLAN, AMERICA_MENOMINEE, AMERICA_MERIDA, AMERICA_MEXICO_CITY, AMERICA_MIQUELON, AMERICA_MONCTON, AMERICA_MONTERREY, AMERICA_MONTEVIDEO, AMERICA_MONTREAL, AMERICA_MONTSERRAT, AMERICA_NASSAU, AMERICA_NEW_YORK, AMERICA_NIPIGON, AMERICA_NOME, AMERICA_NORONHA, AMERICA_NORTH_DAKOTA_CENTER, AMERICA_NORTH_DAKOTA_NEW_SALEM, AMERICA_OJINAGA, AMERICA_PANAMA, AMERICA_PANGNIRTUNG, AMERICA_PARAMARIBO, AMERICA_PHOENIX, AMERICA_PORTO_VELHO, AMERICA_PORT_AU_PRINCE, AMERICA_PORT_OF_SPAIN, AMERICA_PUERTO_RICO, AMERICA_RAINY_RIVER, AMERICA_RANKIN_INLET, AMERICA_RECIFE, AMERICA_REGINA, AMERICA_RESOLUTE, AMERICA_RIO_BRANCO, AMERICA_SANTAREM, AMERICA_SANTA_ISABEL, AMERICA_SANTIAGO, AMERICA_SANTO_DOMINGO, AMERICA_SAO_PAULO, AMERICA_SCORESBYSUND, AMERICA_ST_JOHNS, AMERICA_ST_KITTS, AMERICA_ST_LUCIA, AMERICA_ST_THOMAS, AMERICA_ST_VINCENT, AMERICA_SWIFT_CURRENT, AMERICA_TEGUCIGALPA, AMERICA_THULE, AMERICA_THUNDER_BAY, AMERICA_TIJUANA, AMERICA_TORONTO, AMERICA_TORTOLA, AMERICA_VANCOUVER, AMERICA_WHITEHORSE, AMERICA_WINNIPEG, AMERICA_YAKUTAT, AMERICA_YELLOWKNIFE, ANTARCTICA_CASEY, ANTARCTICA_DAVIS, ANTARCTICA_DUMONTDURVILLE, ANTARCTICA_MACQUARIE, ANTARCTICA_MAWSON, ANTARCTICA_MCMURDO, ANTARCTICA_PALMER, ANTARCTICA_ROTHERA, ANTARCTICA_SYOWA, ANTARCTICA_VOSTOK, ASIA_ADEN, ASIA_ALMATY, ASIA_AMMAN, ASIA_ANADYR, ASIA_AQTAU, ASIA_AQTOBE, ASIA_ASHGABAT, ASIA_BAGHDAD, ASIA_BAHRAIN, ASIA_BAKU, ASIA_BANGKOK, ASIA_BEIRUT, ASIA_BISHKEK, ASIA_BRUNEI, ASIA_CHOIBALSAN, ASIA_CHONGQING, ASIA_COLOMBO, ASIA_DAMASCUS, ASIA_DHAKA, ASIA_DILI, ASIA_DUBAI, ASIA_DUSHANBE, ASIA_GAZA, ASIA_HARBIN, ASIA_HONG_KONG, ASIA_HOVD, ASIA_HO_CHI_MINH, ASIA_IRKUTSK, ASIA_JAKARTA, ASIA_JAYAPURA, ASIA_JERUSALEM, ASIA_KABUL, ASIA_KAMCHATKA, ASIA_KARACHI, ASIA_KASHGAR, ASIA_KATHMANDU, ASIA_KOLKATA, ASIA_KRASNOYARSK, ASIA_KUALA_LUMPUR, ASIA_KUCHING, ASIA_KUWAIT, ASIA_MACAU, ASIA_MAGADAN, ASIA_MAKASSAR, ASIA_MANILA, ASIA_MUSCAT, ASIA_NICOSIA, ASIA_NOVOKUZNETSK, ASIA_NOVOSIBIRSK, ASIA_OMSK, ASIA_ORAL, ASIA_PHNOM_PENH, ASIA_PONTIANAK, ASIA_PYONGYANG, ASIA_QATAR, ASIA_QYZYLORDA, ASIA_RANGOON, ASIA_RIYADH, ASIA_SAKHALIN, ASIA_SAMARKAND, ASIA_SEOUL, ASIA_SHANGHAI, ASIA_SINGAPORE, ASIA_TAIPEI, ASIA_TASHKENT, ASIA_TBILISI, ASIA_TEHRAN, ASIA_THIMPHU, ASIA_TOKYO, ASIA_ULAANBAATAR, ASIA_URUMQI, ASIA_VIENTIANE, ASIA_VLADIVOSTOK, ASIA_YAKUTSK, ASIA_YEKATERINBURG, ASIA_YEREVAN, ATLANTIC_AZORES, ATLANTIC_BERMUDA, ATLANTIC_CANARY, ATLANTIC_CAPE_VERDE, ATLANTIC_FAROE, ATLANTIC_MADEIRA, ATLANTIC_REYKJAVIK, ATLANTIC_SOUTH_GEORGIA, ATLANTIC_STANLEY, ATLANTIC_ST_HELENA, AUSTRALIA_ADELAIDE, AUSTRALIA_BRISBANE, AUSTRALIA_BROKEN_HILL, AUSTRALIA_CURRIE, AUSTRALIA_DARWIN, AUSTRALIA_EUCLA, AUSTRALIA_HOBART, AUSTRALIA_LINDEMAN, AUSTRALIA_LORD_HOWE, AUSTRALIA_MELBOURNE, AUSTRALIA_PERTH, AUSTRALIA_SYDNEY, CANADA_ATLANTIC, CANADA_CENTRAL, CANADA_EASTERN, CANADA_MOUNTAIN, CANADA_NEWFOUNDLAND, CANADA_PACIFIC, EUROPE_AMSTERDAM, EUROPE_ANDORRA, EUROPE_ATHENS, EUROPE_BELGRADE, EUROPE_BERLIN, EUROPE_BRUSSELS, EUROPE_BUCHAREST, EUROPE_BUDAPEST, EUROPE_CHISINAU, EUROPE_COPENHAGEN, EUROPE_DUBLIN, EUROPE_GIBRALTAR, EUROPE_HELSINKI, EUROPE_ISTANBUL, EUROPE_KALININGRAD, EUROPE_KIEV, EUROPE_LISBON, EUROPE_LONDON, EUROPE_LUXEMBOURG, EUROPE_MADRID, EUROPE_MALTA, EUROPE_MINSK, EUROPE_MONACO, EUROPE_MOSCOW, EUROPE_OSLO, EUROPE_PARIS, EUROPE_PRAGUE, EUROPE_RIGA, EUROPE_ROME, EUROPE_SAMARA, EUROPE_SIMFEROPOL, EUROPE_SOFIA, EUROPE_STOCKHOLM, EUROPE_TALLINN, EUROPE_TIRANE, EUROPE_UZHGOROD, EUROPE_VADUZ, EUROPE_VIENNA, EUROPE_VILNIUS, EUROPE_VOLGOGRAD, EUROPE_WARSAW, EUROPE_ZAPOROZHYE, EUROPE_ZURICH, GMT, INDIAN_ANTANANARIVO, INDIAN_CHAGOS, INDIAN_CHRISTMAS, INDIAN_COCOS, INDIAN_COMORO, INDIAN_KERGUELEN, INDIAN_MAHE, INDIAN_MALDIVES, INDIAN_MAURITIUS, INDIAN_MAYOTTE, INDIAN_REUNION, PACIFIC_APIA, PACIFIC_AUCKLAND, PACIFIC_CHATHAM, PACIFIC_CHUUK, PACIFIC_EASTER, PACIFIC_EFATE, PACIFIC_ENDERBURY, PACIFIC_FAKAOFO, PACIFIC_FIJI, PACIFIC_FUNAFUTI, PACIFIC_GALAPAGOS, PACIFIC_GAMBIER, PACIFIC_GUADALCANAL, PACIFIC_GUAM, PACIFIC_HONOLULU, PACIFIC_JOHNSTON, PACIFIC_KIRITIMATI, PACIFIC_KOSRAE, PACIFIC_KWAJALEIN, PACIFIC_MAJURO, PACIFIC_MARQUESAS, PACIFIC_MIDWAY, PACIFIC_NAURU, PACIFIC_NIUE, PACIFIC_NORFOLK, PACIFIC_NOUMEA, PACIFIC_PAGO_PAGO, PACIFIC_PALAU, PACIFIC_PITCAIRN, PACIFIC_POHNPEI, PACIFIC_PORT_MORESBY, PACIFIC_RAROTONGA, PACIFIC_SAIPAN, PACIFIC_TAHITI, PACIFIC_TARAWA, PACIFIC_TONGATAPU, PACIFIC_WAKE, PACIFIC_WALLIS, US_ALASKA, US_ARIZONA, US_CENTRAL, US_EASTERN, US_HAWAII, US_MOUNTAIN, US_PACIFIC, UTC

    Scalars

    Boolean

    The Boolean scalar type represents true or false.

    Float

    The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

    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

    The JSON scalar type represents JSON values as specified by ECMA-404.

    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.

    Timestamp

    URL

    Interfaces

    Entity

    An entity in the entity graph.

    Field Argument Type Description
    id ID! The unique identifier of the entity.
    display String! A textual representation of the entity.