Developers
Set your API contextPick a region and space ID once. Every sample fills in your base URL.
Where do I find these?

In Coevera: open your space's API application and choose Show Access. It shows the space ID and the base URL, whose host starts with your region.

From the API: if you know the space ID, the discovery endpoint GET /api/discovery/spaces/{space_id} returns its region and base URLs, without credentials.

Only the region and space ID are kept, in this browser. Never paste a key or password here.

More in the quickstart

GraphQLRepositorieslead

entities.lead

Read lead records with the lead repository, and change them with the lead mutations. Same records as the REST Leads entity.

Queries

Fields of entities { lead { … } }.

Each operation opens an example built from the schema and checked against it on every build. Replace the placeholders, such as <lead id>, with values from your space.

KindFieldReturns
QUERYgetById(entityId: ID!)
Returns the record with the given id, or null when there is none. Deleted records are returned as well.
LeadEntity
Example
Example: getById
query LeadGetById {
  entities {
    lead {
      getById(entityId: "<lead id>") {
        id
        name
        formattedName
        modified
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadGetById { entities { lead { getById(entityId: \"<lead id>\") { id name formattedName modified } } } }"}'
QUERYgetByIds(entityIds: [ID!]!)
Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
[LeadEntity!]!
Example
Example: getByIds
query LeadGetByIds {
  entities {
    lead {
      getByIds(entityIds: ["<lead id>"]) {
        id
        name
        formattedName
        modified
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadGetByIds { entities { lead { getByIds(entityIds: [\"<lead id>\"]) { id name formattedName modified } } } }"}'
QUERYgetAll(limit: Int, offset: Int, filter: LeadFilterInput, orderBy: [LeadOrderByInput!], includeDeleted: Boolean)
Returns the records that match the filter, paged with limit and offset.
[LeadEntity!]!
Example
Example: getAll
query LeadGetAll {
  entities {
    lead {
      getAll(limit: 10) {
        id
        name
        formattedName
        modified
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadGetAll { entities { lead { getAll(limit: 10) { id name formattedName modified } } } }"}'
QUERYgetByCriteria(filter: LeadFilterInput, orderBy: [LeadOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)
Returns the records that match the filter as a cursor-paginated connection.
LeadEntityConnection
Example
Example: getByCriteria
query LeadGetByCriteria {
  entities {
    lead {
      getByCriteria(first: 10) {
        totalCount
        edges {
          node {
            id
            name
            formattedName
            modified
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadGetByCriteria { entities { lead { getByCriteria(first: 10) { totalCount edges { node { id name formattedName modified } } pageInfo { hasNextPage endCursor } } } } }"}'
QUERYgetChangedFieldsSinceRevision(id: UUID!, revision: Int!)
Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
[UUID!]!
Example
Example: getChangedFieldsSinceRevision
query LeadGetChangedFieldsSinceRevision {
  entities {
    lead {
      getChangedFieldsSinceRevision(id: "<lead id>", revision: 10)
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadGetChangedFieldsSinceRevision { entities { lead { getChangedFieldsSinceRevision(id: \"<lead id>\", revision: 10) } } }"}'
QUERYgetBySession(includedIds: [UUID!]!, excludedIds: [UUID!]!, sessionId: String!, before: String, after: String, first: Int, last: Int)
Returns a page of records selected in a list or report: all records of the given result plus the explicitly included ids, minus the excluded ids.
LeadEntityConnection
Example
Example: getBySession
query LeadGetBySession {
  entities {
    lead {
      getBySession(
        includedIds: ["<lead id>"]
        excludedIds: ["<lead id>"]
        sessionId: "<session id>"
        first: 10
      ) {
        totalCount
        edges {
          node {
            id
            name
            formattedName
            modified
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadGetBySession { entities { lead { getBySession( includedIds: [\"<lead id>\"] excludedIds: [\"<lead id>\"] sessionId: \"<session id>\" first: 10 ) { totalCount edges { node { id name formattedName modified } } pageInfo { hasNextPage endCursor } } } } }"}'
QUERYgetByIdFormatted(id: UUID!, fieldIds: [UUID!])
Returns the values of a record's fields formatted for display, keyed by field id.
JSONString
Example
Example: getByIdFormatted
query LeadGetByIdFormatted {
  entities {
    lead {
      getByIdFormatted(id: "<lead id>")
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadGetByIdFormatted { entities { lead { getByIdFormatted(id: \"<lead id>\") } } }"}'
QUERYautoPrefill(mappingId: UUID!, entityId: UUID!, targetEntityTypeId: UUID)
Returns a new, unsaved record pre-filled from a source record according to a field mapping. Nothing is saved; the returned values can be used as input for create.
LeadEntity!
Example
Example: autoPrefill
query LeadAutoPrefill {
  entities {
    lead {
      autoPrefill(mappingId: "<mapping id>", entityId: "<lead id>") {
        id
        name
        formattedName
        modified
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadAutoPrefill { entities { lead { autoPrefill(mappingId: \"<mapping id>\", entityId: \"<lead id>\") { id name formattedName modified } } } }"}'
QUERYaiAutoPrefill(actionId: String!)
Returns an unsaved record pre-filled with the values proposed by an AI record suggestion, together with the fields the suggestion filled in.
LeadAutoPrefill!
Example
Example: aiAutoPrefill
query LeadAiAutoPrefill {
  entities {
    lead {
      aiAutoPrefill(actionId: "<action id>") {
        entity {
          id
          name
          formattedName
          modified
        }
        fieldIds
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query LeadAiAutoPrefill { entities { lead { aiAutoPrefill(actionId: \"<action id>\") { entity { id name formattedName modified } fieldIds } } } }"}'

Mutations

KindMutationDoesReturns
MUTATIONreleaseOwnershipLead(input: ReleaseOwnershipLeadInput!)Release ownership GraphQL onlyReleaseOwnershipLeadPayload
Example
Example: releaseOwnershipLead
mutation ReleaseOwnershipLead {
  releaseOwnershipLead(input: {id: "<lead id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation ReleaseOwnershipLead { releaseOwnershipLead(input: {id: \"<lead id>\"}) { result { id name formattedName modified } } }"}'
MUTATIONchangeOwnershipLead(input: ChangeOwnershipLeadInput!)Change owner GraphQL onlyChangeOwnershipLeadPayload
Example
Example: changeOwnershipLead
mutation ChangeOwnershipLead {
  changeOwnershipLead(
    input: {ownerId: "<owner id>", unitId: "<unit id>", keepOwnerAsEditor: false, transferLinkedRecords: false, id: "<lead id>"}
  ) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation ChangeOwnershipLead { changeOwnershipLead( input: {ownerId: \"<owner id>\", unitId: \"<unit id>\", keepOwnerAsEditor: false, transferLinkedRecords: false, id: \"<lead id>\"} ) { result { id name formattedName modified } } }"}'
MUTATIONmanageSharingLead(input: ManageSharingLeadInput!)Change who it is shared with GraphQL onlyManageSharingLeadPayload
Example
Example: manageSharingLead
mutation ManageSharingLead {
  manageSharingLead(input: {shareMode: Standard, id: "<lead id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation ManageSharingLead { manageSharingLead(input: {shareMode: Standard, id: \"<lead id>\"}) { result { id name formattedName modified } } }"}'
MUTATIONchangeLabelFlagLead(input: ChangeLabelFlagLeadInput!)Change the label flag GraphQL onlyChangeLabelFlagLeadPayload
Example
Example: changeLabelFlagLead
mutation ChangeLabelFlagLead {
  changeLabelFlagLead(
    input: {hot: false, priority: false, stalled: false, id: "<lead id>"}
  ) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation ChangeLabelFlagLead { changeLabelFlagLead( input: {hot: false, priority: false, stalled: false, id: \"<lead id>\"} ) { result { id name formattedName modified } } }"}'
MUTATIONrestoreLead(input: RestoreLeadInput!)Restore a deleted recordRestoreLeadPayload
Example
Example: restoreLead
mutation RestoreLead {
  restoreLead(input: {id: "<lead id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation RestoreLead { restoreLead(input: {id: \"<lead id>\"}) { result { id name formattedName modified } } }"}'
MUTATIONcopyLead(input: CopyLeadInput!)Copy a record GraphQL onlyCopyLeadPayload
Example
Example: copyLead
mutation CopyLead {
  copyLead(input: {id: "<lead id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation CopyLead { copyLead(input: {id: \"<lead id>\"}) { result { id name formattedName modified } } }"}'
MUTATIONarchiveLead(input: ArchiveLeadInput!)Archive GraphQL onlyArchiveLeadPayload
Example
Example: archiveLead
mutation ArchiveLead {
  archiveLead(input: {id: "<lead id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation ArchiveLead { archiveLead(input: {id: \"<lead id>\"}) { result { id name formattedName modified } } }"}'
MUTATIONreactivateLead(input: ReactivateLeadInput!)Undo archive GraphQL onlyReactivateLeadPayload
Example
Example: reactivateLead
mutation ReactivateLead {
  reactivateLead(input: {id: "<lead id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation ReactivateLead { reactivateLead(input: {id: \"<lead id>\"}) { result { id name formattedName modified } } }"}'
MUTATIONqualifyLead(input: QualifyLeadInput!)Qualify into an opportunity GraphQL onlyQualifyLeadPayload
Example
Example: qualifyLead
mutation QualifyLead {
  qualifyLead(input: {entity: {id: "<lead id>"}}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation QualifyLead { qualifyLead(input: {entity: {id: \"<lead id>\"}}) { result { id name formattedName modified } } }"}'
MUTATIONmoveLead(input: MoveLeadInput!)Move to another step GraphQL onlyMoveLeadPayload
Example
Example: moveLead
mutation MoveLead {
  moveLead(input: {entity: {id: "<lead id>"}}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation MoveLead { moveLead(input: {entity: {id: \"<lead id>\"}}) { result { id name formattedName modified } } }"}'
MUTATIONcreateLead(input: CreateLeadInput!, validationLevel: [ValidationLevel!])Create one recordCreateLeadPayload
Example
Example: createLead
mutation CreateLead {
  createLead(input: {name: "Northwind Analytics"}) {
    lead {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation CreateLead { createLead(input: {name: \"Northwind Analytics\"}) { lead { id name formattedName modified } } }"}'
MUTATIONupdateLead(input: UpdateLeadInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String)Update fieldsUpdateLeadPayload
Example
Example: updateLead
mutation UpdateLead {
  updateLead(input: {id: "<lead id>"}) {
    lead {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation UpdateLead { updateLead(input: {id: \"<lead id>\"}) { lead { id name formattedName modified } } }"}'
MUTATIONbulkUpdateLead(input: [CreateOrUpdateLeadInput!]!, deleteInput: [DeleteLeadInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput)Create or update many; per-item resultsBulkUpdateLeadPayload
Example
Example: bulkUpdateLead
mutation BulkUpdateLead {
  bulkUpdateLead(input: [{id: "<lead id>"}]) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation BulkUpdateLead { bulkUpdateLead(input: [{id: \"<lead id>\"}]) { result { created { id } errors { index code message entityId } updated deleted errorsOnDelete { index code message entityId } } } }"}'
MUTATIONdeleteLead(input: DeleteLeadInput!)Soft-deleteDeleteLeadPayload
Example
Example: deleteLead
mutation DeleteLead {
  deleteLead(input: {id: "<lead id>"}) {
    lead {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation DeleteLead { deleteLead(input: {id: \"<lead id>\"}) { lead { id name formattedName modified } } }"}'
MUTATIONbulkArchiveLead(input: BulkArchiveLeadInput!)Archive many GraphQL onlyBulkArchiveLeadPayload
Example
Example: bulkArchiveLead
mutation BulkArchiveLead {
  bulkArchiveLead(input: {bulkFilter: {includedIds: ["<lead id>"]}}) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation BulkArchiveLead { bulkArchiveLead(input: {bulkFilter: {includedIds: [\"<lead id>\"]}}) { result { created { id } errors { index code message entityId } updated deleted errorsOnDelete { index code message entityId } } } }"}'
MUTATIONbulkReactivateLead(input: BulkReactivateLeadInput!)Undo archive for many GraphQL onlyBulkReactivateLeadPayload
Example
Example: bulkReactivateLead
mutation BulkReactivateLead {
  bulkReactivateLead(input: {bulkFilter: {includedIds: ["<lead id>"]}}) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation BulkReactivateLead { bulkReactivateLead(input: {bulkFilter: {includedIds: [\"<lead id>\"]}}) { result { created { id } errors { index code message entityId } updated deleted errorsOnDelete { index code message entityId } } } }"}'
MUTATIONbulkQualifyLead(input: BulkQualifyLeadInput!)Qualify many GraphQL onlyBulkQualifyLeadPayload
Example
Example: bulkQualifyLead
mutation BulkQualifyLead {
  bulkQualifyLead(
    input: {bulkFilter: {includedIds: ["<lead id>"]}, entity: {id: "<lead id>"}}
  ) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation BulkQualifyLead { bulkQualifyLead( input: {bulkFilter: {includedIds: [\"<lead id>\"]}, entity: {id: \"<lead id>\"}} ) { result { created { id } errors { index code message entityId } updated deleted errorsOnDelete { index code message entityId } } } }"}'
MUTATIONbulkMoveLead(input: BulkMoveLeadInput!)Move many to another step GraphQL onlyBulkMoveLeadPayload
Example
Example: bulkMoveLead
mutation BulkMoveLead {
  bulkMoveLead(
    input: {bulkFilter: {includedIds: ["<lead id>"]}, entity: {id: "<lead id>"}}
  ) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation BulkMoveLead { bulkMoveLead( input: {bulkFilter: {includedIds: [\"<lead id>\"]}, entity: {id: \"<lead id>\"}} ) { result { created { id } errors { index code message entityId } updated deleted errorsOnDelete { index code message entityId } } } }"}'
MUTATIONconvertLead(input: CreateLeadInput!, sourceEntity: EntityNameEnum!, sourceEntityId: UUID!, operation: RecordConversionOperationEnum!, options: RecordConversionOptions!, sourceEntityApiName: String, validationLevel: [ValidationLevel!])Create from another record GraphQL onlyConvertLeadPayload
Example
Example: convertLead
mutation ConvertLead {
  convertLead(
    input: {name: "Northwind Analytics"}
    sourceEntity: AiAgent
    sourceEntityId: "<source entity id>"
    operation: Nothing
    options: {}
  ) {
    lead {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation ConvertLead { convertLead( input: {name: \"Northwind Analytics\"} sourceEntity: AiAgent sourceEntityId: \"<source entity id>\" operation: Nothing options: {} ) { lead { id name formattedName modified } } }"}'
MUTATIONbackToLead(input: BackToLeadInput!)Turn back into a lead GraphQL onlyBackToLeadPayload
Example
Example: backToLead
mutation BackToLead {
  backToLead(input: {entity: {id: "<lead id>"}}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation BackToLead { backToLead(input: {entity: {id: \"<lead id>\"}}) { result { id name formattedName modified } } }"}'
MUTATIONbulkBackToLead(input: BulkBackToLeadInput!)Turn many back into leads GraphQL onlyBulkBackToLeadPayload
Example
Example: bulkBackToLead
mutation BulkBackToLead {
  bulkBackToLead(
    input: {bulkFilter: {includedIds: ["<lead id>"]}, entity: {id: "<lead id>"}}
  ) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"mutation BulkBackToLead { bulkBackToLead( input: {bulkFilter: {includedIds: [\"<lead id>\"]}, entity: {id: \"<lead id>\"}} ) { result { created { id } errors { index code message entityId } updated deleted errorsOnDelete { index code message entityId } } } }"}'

Types

The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.

LeadEntity object 65 fields: customFields, pendingScheduledActions, isDeleteProtected, …

Potential sale in its early stage that moves through a lead process until it is qualified into an opportunity or lost.

FieldTypeDescription
customFieldsJSONString! (1 args)Values of the record's custom fields as a JSON object keyed by custom field apiName (camelCase).
pendingScheduledActionsIntFilled only when a single record is read by its id; otherwise null or an empty list.
isDeleteProtectedBoolean!True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
idID!Unique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
currencyExchangeRatesListCurrencyExchangeRatesListEntityCurrency exchange rate list used to convert monetary fields linked to this lead. Empty to inherit the team space default.
leadSourceDataEntityHow the lead originated (e.g. Website, Referral, Trade Show). Configurable per team space.
leadTypeLeadTypeEntityLead type that classifies this lead. Lead types are configurable per team space and drive which form, fields and lead process apply.
ownerClientEntitySales user who owns this lead. May be empty when the lead is unassigned and available for take-over.
reasonOfCloseDataEntityConfigurable reason recorded when the lead is archived (lost). Required when the lost form mandates it.
stepStepEntityStep in the lead process the lead is currently in.
unitSalesUnitEntitySales unit this lead is assigned to. Determines which team members can see the record under unit-based sharing.
currencyExchangeRatesListIdIDId of the currency exchange rate list applied to this lead.
descriptionStringFree-form description of the lead.
isArchivedBooleanTrue when the lead has been archived (lost). Archived leads remain readable but are hidden from active lists and cannot be edited until reactivated.
labelFlagIntUser-set colored flag used to highlight the lead in lists and reports.
lastAiBuyingCenterAppliedDateTimeTime when an AI-suggested buying center was last applied to this lead.
leadSourceIdIDId of the lead source recording how the lead originated (e.g. Website, Referral, Trade Show).
leadTypeIdIDId of the lead type that classifies the lead and drives which form, fields and lead process apply.
nameString!Name of the entity and its default text representation.
ownerIdIDId of the lead owner.
quickAccountEmailStringFree-text company email captured at lead creation when no Account record has been linked yet.
quickAccountNameStringFree-text company name captured at lead creation when no Account record has been linked yet.
quickAccountPhoneStringFree-text company phone captured at lead creation when no Account record has been linked yet.
quickContactNameStringFree-text contact name captured at lead creation when no Contact record has been linked yet.
quickEmailStringFree-text contact email captured at lead creation when no Contact record has been linked yet.
quickPhoneStringFree-text contact phone captured at lead creation when no Contact record has been linked yet.
rankingIntQualitative ranking score (1-10) the user assigns to indicate the strength of the lead.
reasonOfCloseDescriptionStringFree-form note explaining why the lead was archived (lost). Captured alongside reasonOfClose.
reasonOfCloseIdIDId of the reason recorded when the lead is archived (lost), or empty when none was given.
shareModeShareModeEnumSharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
stepIdIDId of the lead process step.
tableNameString!Discriminator identifying the concrete record type — always "lead" for Lead records. Read-only; useful when consuming polymorphic LeadOppty results.
unitIdIDId of the sales unit.
revisionIntRevision when entity was lastly changed.
primaryContactContactEntityPrimary contact of this lead. Set automatically from the contact relation marked as primary.
primaryAccountAccountEntityPrimary account of this lead. Set automatically from the account relation marked as primary.
contactRelationsLeadOpptyContactRelationEntityConnection (8 args)Contacts linked to this lead, including their roles and org-chart positions.
accountRelationsLeadOpptyAccountRelationEntityConnection (8 args)Accounts linked to this lead, including the primary-account flag.
statusLeadStatusEnum!Current status of the lead (Open, Lost, Qualified). Read-only; derived from the archived flag and lifecycle events.
sharingUnitsLeadOpptySharingSalesUnitRelationEntityConnection (8 args)Sales units that have been granted shared access to this lead. Editable only when shareMode allows unit sharing.
sharingClientsLeadOpptySharingClientRelationEntityConnection (8 args)Users that have been granted shared access to this lead. Editable only when shareMode allows user sharing.
documentsCloudObjectRelationEntityConnection (8 args)Documents linked to this lead.
enrolledEmailSequencesInt!Number of email sequences this record is currently actively enrolled in (soft-deleted or ended enrollments are not counted).
tagsTagRelationEntityConnection (8 args)Tag labels applied to this lead.
staticProfilesProfileRelationEntityConnection (8 args)Saved view profiles this lead currently matches.
qualifyDateDateTimeTimestamp of when the lead was qualified, taken from the matching KPI event. Empty for leads that have not been qualified. Read-only.
daysInStepInt!Number of days the lead has been sitting in its current pipeline step. Read-only; computed by Coevera from the most recent move event.
fitnessWarningLevelEnumFilled only when a single record is read by its id; otherwise null or an empty list.
fitnessDescriptionFitnessDescriptionFilled only when a single record is read by its id; otherwise null or an empty list.
isFavoriteBoolean!True when the current authenticated user has marked this lead as favorite. Per-user.
lostDateDateTimeTimestamp of when the lead was archived (lost). Setting it adjusts the underlying loss event; empty for leads that have not been archived.
formattedNameString!Display version of the lead name, used in lists and references.
scoringEntityScoringResultLead scoring summary, combining the percentile and current scoring state. Read-only; computed by Coevera.
viewerIdsPerSalesUnit[UUID!]!Filled only when a single record is read by its id; otherwise null or an empty list.
modifiedByUserDateTimeTimestamp of the most recent modification made by an end user (excluding system changes). Read-only; computed by Coevera.
instancePermissions[EntityPermsEnum!]! (1 args)Permissions the current user has on this record, out of the requested ones.
relatedEntitiesDrilldownCompactViewDrilldownModel! (1 args)Records of the given entity type that are related to this record, as a drilldown list.
charts[DashboardChartData!] (1 args)Data of the given preview pane charts and lists, computed for this record.
chartsDrilldownCompactViewDrilldownModel! (3 args)Records behind one preview pane chart of this record: all records of a list chart, or the records of a single data point of a report chart.
fields[InterfaceFieldData]! (2 args)Values of the fields shown in the record's preview pane, as configured for the record's type.
stepChecklists[StepChecklistActivityItem]! (1 args)Checklist items of the steps of the record's lead process, with the completion state of each item for this record.
approvalApprovalEntityApproval request of this record that is pending or was rejected; null when there is none or it was approved.
LeadEntityConnection object pageInfo: PageInfo!, edges: [LeadEntityEdge]!, totalCount: Int

Paginated list of Lead records.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[LeadEntityEdge]!Contains the nodes in this connection.
totalCountIntTotal number of items in the connection.
LeadEntityEdge object node: LeadEntity, cursor: String!

A Relay edge containing a LeadEntity and its cursor.

FieldTypeDescription
nodeLeadEntityThe item at the end of the edge
cursorString!A cursor for use in pagination
LeadFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field

Filter conditions for Lead records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

Input fieldTypeDescription
OR[LeadFilterInput!]Matches records that meet at least one of the listed filters.
AND[LeadFilterInput!]Matches records that meet all of the listed filters.
NOTLeadFilterInputMatches records that do not meet this filter.
globalSearchQueryStringSearch term matched against the fields that the global search covers for this entity.
idEntityFilterStringFieldUnique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedEntityFilterDateTimeFieldLast modification time.
createdEntityFilterDateTimeFieldCreation time.
currencyExchangeRatesListIdEntityFilterStringFieldId of the currency exchange rate list applied to this lead.
descriptionEntityFilterStringFieldFree-form description of the lead.
isArchivedBooleanTrue when the lead has been archived (lost). Archived leads remain readable but are hidden from active lists and cannot be edited until reactivated.
labelFlagLabelFlagEnumFilterInputUser-set colored flag used to highlight the lead in lists and reports.
lastAiBuyingCenterAppliedEntityFilterDateTimeFieldTime when an AI-suggested buying center was last applied to this lead.
leadSourceIdEntityFilterStringFieldId of the lead source recording how the lead originated (e.g. Website, Referral, Trade Show).
leadTypeIdEntityFilterStringFieldId of the lead type that classifies the lead and drives which form, fields and lead process apply.
nameEntityFilterStringFieldName of the entity and its default text representation.
ownerIdEntityFilterStringFieldId of the lead owner.
quickAccountEmailEntityFilterStringFieldFree-text company email captured at lead creation when no Account record has been linked yet.
quickAccountNameEntityFilterStringFieldFree-text company name captured at lead creation when no Account record has been linked yet.
quickAccountPhoneEntityFilterStringFieldFree-text company phone captured at lead creation when no Account record has been linked yet.
quickContactNameEntityFilterStringFieldFree-text contact name captured at lead creation when no Contact record has been linked yet.
quickEmailEntityFilterStringFieldFree-text contact email captured at lead creation when no Contact record has been linked yet.
quickPhoneEntityFilterStringFieldFree-text contact phone captured at lead creation when no Contact record has been linked yet.
rankingEntityFilterNumberFieldQualitative ranking score (1-10) the user assigns to indicate the strength of the lead.
reasonOfCloseDescriptionEntityFilterStringFieldFree-form note explaining why the lead was archived (lost). Captured alongside reasonOfClose.
reasonOfCloseIdEntityFilterStringFieldId of the reason recorded when the lead is archived (lost), or empty when none was given.
shareModeShareModeEnumFilterInputSharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
stepIdEntityFilterStringFieldId of the lead process step.
tableNameEntityFilterStringFieldDiscriminator identifying the concrete record type — always "lead" for Lead records. Read-only; useful when consuming polymorphic LeadOppty results.
unitIdEntityFilterStringFieldId of the sales unit.
revisionEntityFilterNumberFieldRevision when entity was lastly changed.
statusLeadStatusEnumFilterInputCurrent status of the lead (Open, Lost, Qualified). Read-only; derived from the archived flag and lifecycle events.
enrolledEmailSequencesIntNumber of email sequences this record is currently actively enrolled in (soft-deleted or ended enrollments are not counted).
relatedEntities[EntityFilterRelatedField]Matches records related to at least one of the listed records.
withCustom[CustomField!]Conditions on custom fields, each identified by its api name. All listed conditions must match.
currencyExchangeRatesListCurrencyExchangeRatesListFilterInputCurrency exchange rate list used to convert monetary fields linked to this lead. Empty to inherit the team space default. Matches records where a related record meets these conditions.
leadSourceDataFilterInputHow the lead originated (e.g. Website, Referral, Trade Show). Configurable per team space. Matches records where a related record meets these conditions.
leadTypeLeadTypeFilterInputLead type that classifies this lead. Lead types are configurable per team space and drive which form, fields and lead process apply. Matches records where a related record meets these conditions.
ownerClientFilterInputSales user who owns this lead. May be empty when the lead is unassigned and available for take-over. Matches records where a related record meets these conditions.
reasonOfCloseDataFilterInputConfigurable reason recorded when the lead is archived (lost). Required when the lost form mandates it. Matches records where a related record meets these conditions.
stepStepFilterInputStep in the lead process the lead is currently in. Matches records where a related record meets these conditions.
unitSalesUnitFilterInputSales unit this lead is assigned to. Determines which team members can see the record under unit-based sharing. Matches records where a related record meets these conditions.
primaryContactContactFilterInputPrimary contact of this lead. Set automatically from the contact relation marked as primary. Matches records where a related record meets these conditions.
primaryAccountAccountFilterInputPrimary account of this lead. Set automatically from the account relation marked as primary. Matches records where a related record meets these conditions.
contactRelationsLeadOpptyContactRelationFilterInputContacts linked to this lead, including their roles and org-chart positions. Matches records where a related record meets these conditions.
accountRelationsLeadOpptyAccountRelationFilterInputAccounts linked to this lead, including the primary-account flag. Matches records where a related record meets these conditions.
sharingUnitsLeadOpptySharingSalesUnitRelationFilterInputSales units that have been granted shared access to this lead. Editable only when shareMode allows unit sharing. Matches records where a related record meets these conditions.
sharingClientsLeadOpptySharingClientRelationFilterInputUsers that have been granted shared access to this lead. Editable only when shareMode allows user sharing. Matches records where a related record meets these conditions.
documentsCloudObjectRelationFilterInputDocuments linked to this lead. Matches records where a related record meets these conditions.
tagsTagRelationFilterInputTag labels applied to this lead. Matches records where a related record meets these conditions.
staticProfilesProfileRelationFilterInputSaved view profiles this lead currently matches. Matches records where a related record meets these conditions.
LeadOrderByInput input Asc or Desc per field

Sorting of Lead records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

Input fieldTypeDescription
idOrderByEnumUnique identifier of entity.
isDeletedOrderByEnumSpecifies if the entity is considered deleted.
modifiedOrderByEnumLast modification time.
createdOrderByEnumCreation time.
currencyExchangeRatesList[CurrencyExchangeRatesListOrderByNestedInput!]Currency exchange rate list used to convert monetary fields linked to this lead. Empty to inherit the team space default. Sorts by fields of the related record, listed in order of priority.
leadSource[DataOrderByNestedInput!]How the lead originated (e.g. Website, Referral, Trade Show). Configurable per team space. Sorts by fields of the related record, listed in order of priority.
leadType[LeadTypeOrderByNestedInput!]Lead type that classifies this lead. Lead types are configurable per team space and drive which form, fields and lead process apply. Sorts by fields of the related record, listed in order of priority.
owner[ClientOrderByNestedInput!]Sales user who owns this lead. May be empty when the lead is unassigned and available for take-over. Sorts by fields of the related record, listed in order of priority.
reasonOfClose[DataOrderByNestedInput!]Configurable reason recorded when the lead is archived (lost). Required when the lost form mandates it. Sorts by fields of the related record, listed in order of priority.
step[StepOrderByNestedInput!]Step in the lead process the lead is currently in. Sorts by fields of the related record, listed in order of priority.
unit[SalesUnitOrderByNestedInput!]Sales unit this lead is assigned to. Determines which team members can see the record under unit-based sharing. Sorts by fields of the related record, listed in order of priority.
currencyExchangeRatesListIdOrderByEnumId of the currency exchange rate list applied to this lead.
descriptionOrderByEnumFree-form description of the lead.
isArchivedOrderByEnumTrue when the lead has been archived (lost). Archived leads remain readable but are hidden from active lists and cannot be edited until reactivated.
labelFlagOrderByEnumUser-set colored flag used to highlight the lead in lists and reports.
leadSourceIdOrderByEnumId of the lead source recording how the lead originated (e.g. Website, Referral, Trade Show).
leadTypeIdOrderByEnumId of the lead type that classifies the lead and drives which form, fields and lead process apply.
nameOrderByEnumName of the entity and its default text representation.
ownerIdOrderByEnumId of the lead owner.
quickAccountEmailOrderByEnumFree-text company email captured at lead creation when no Account record has been linked yet.
quickAccountNameOrderByEnumFree-text company name captured at lead creation when no Account record has been linked yet.
quickAccountPhoneOrderByEnumFree-text company phone captured at lead creation when no Account record has been linked yet.
quickContactNameOrderByEnumFree-text contact name captured at lead creation when no Contact record has been linked yet.
quickEmailOrderByEnumFree-text contact email captured at lead creation when no Contact record has been linked yet.
quickPhoneOrderByEnumFree-text contact phone captured at lead creation when no Contact record has been linked yet.
rankingOrderByEnumQualitative ranking score (1-10) the user assigns to indicate the strength of the lead.
reasonOfCloseDescriptionOrderByEnumFree-form note explaining why the lead was archived (lost). Captured alongside reasonOfClose.
reasonOfCloseIdOrderByEnumId of the reason recorded when the lead is archived (lost), or empty when none was given.
shareModeOrderByEnumSharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
stepIdOrderByEnumId of the lead process step.
unitIdOrderByEnumId of the sales unit.
revisionOrderByEnumRevision when entity was lastly changed.
statusOrderByEnumCurrent status of the lead (Open, Lost, Qualified). Read-only; derived from the archived flag and lifecycle events.
enrolledEmailSequencesOrderByEnumNumber of email sequences this record is currently actively enrolled in (soft-deleted or ended enrollments are not counted).
relatedEntitiesCommonEntityRepositoryOrderByEntityRelationFieldSorts records by whether they are related to the listed records.
withCustomCommonEntityRepositoryOrderByCustomFieldSorts by a custom field.
LeadStatusEnumFilterInput input eq: [LeadStatusEnum!], NOT: LeadStatusEnumFilterInput

Conditions on an enumeration field. Several conditions given together must all match.

Input fieldTypeDescription
eq[LeadStatusEnum!]Matches any of the listed values.
NOTLeadStatusEnumFilterInputMatches values that do not meet this condition.
ArchiveLeadInput input completeActivityIds: [UUID!], memoText: String, id: ID!, clientMutationId: String

Parameters of the archiveLead mutation.

Input fieldTypeDescription
completeActivityIds[UUID!]Ids of tasks linked to the lead to mark as completed.
memoTextStringText of a memo added to the lead together with the archive.
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BackToLeadInput input entity: UpdateLeadInput!, clientMutationId: String

Parameters of the backToLead mutation.

Input fieldTypeDescription
entityUpdateLeadInput!Id of the opportunity, the target lead step (stepId) and any lead field values to save with the conversion.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkArchiveLeadInput input 6 fields: bulkFilter, rollbackMethod, entity, …

Parameters of the bulkArchiveLead mutation.

Input fieldTypeDescription
bulkFilterBulkOperationInput!Leads to archive: includedIds minus excludedIds. Integrations can leave sessionId empty.
rollbackMethodRollbackMethodROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
entityCreateOrUpdateLeadInputOptional field values saved on every archived lead.
memoTextStringText of a memo added to every archived lead.
completeActivityIds[UUID!]Ids of linked tasks to mark as completed.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkBackToLeadInput input bulkFilter: BulkOperationInput!, entity: CreateOrUpdateLeadInput!, rollbackMethod: RollbackMethod, clientMutationId: String

Parameters of the bulkBackToLead mutation.

Input fieldTypeDescription
bulkFilterBulkOperationInput!Opportunities to convert: includedIds minus excludedIds. Integrations can leave sessionId empty.
entityCreateOrUpdateLeadInput!Lead field values applied to every converted record, such as the target lead stepId.
rollbackMethodRollbackMethodROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkMoveLeadInput input 6 fields: bulkFilter, entity, memoText, …

Parameters of the bulkMoveLead mutation.

Input fieldTypeDescription
bulkFilterBulkOperationInput!Leads to move: includedIds minus excludedIds. Integrations can leave sessionId empty.
entityCreateOrUpdateLeadInput!Target step (stepId) and field values applied to every lead.
memoTextStringText of a memo added to every moved lead.
completeActivityIds[UUID!]Ids of linked tasks to mark as completed.
rollbackMethodRollbackMethodROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkQualifyLeadInput input bulkFilter: BulkOperationInput!, entity: CreateOrUpdateOpportunityInput!, rollbackMethod: RollbackMethod, clientMutationId: String

Parameters of the bulkQualifyLead mutation.

Input fieldTypeDescription
bulkFilterBulkOperationInput!Leads to qualify: includedIds minus excludedIds. Integrations can leave sessionId empty.
entityCreateOrUpdateOpportunityInput!Target opportunity step (stepId) and opportunity field values applied to every lead.
rollbackMethodRollbackMethodROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkReactivateLeadInput input bulkFilter: BulkOperationInput!, rollbackMethod: RollbackMethod, clientMutationId: String

Parameters of the bulkReactivateLead mutation.

Input fieldTypeDescription
bulkFilterBulkOperationInput!Records to reactivate: includedIds minus excludedIds. Integrations can leave sessionId empty.
rollbackMethodRollbackMethodROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ChangeLabelFlagLeadInput input 5 fields: hot, priority, stalled, …

Parameters of the changeLabelFlagLead mutation.

Input fieldTypeDescription
hotBoolean!Marks the record as hot.
priorityBoolean!Marks the record as priority.
stalledBoolean!Marks the record as stalled.
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ChangeOwnershipLeadInput input 6 fields: ownerId, unitId, keepOwnerAsEditor, …

Parameters of the changeOwnershipLead mutation.

Input fieldTypeDescription
ownerIdID!User who becomes the new owner of the record.
unitIdID!Sales unit the record is assigned to.
keepOwnerAsEditorBoolean!When true, the previous owner (if still an active user) stays on the record as a shared user with the Editor role, and a Private sharing mode is switched to Standard.
transferLinkedRecordsBoolean!When true, the new owner and sales unit are also applied to the record's open tasks and appointments and its notes. Linked records that cannot be transferred are skipped without failing the mutation.
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
CopyLeadInput input skipCopySuffix: Boolean, id: ID!, clientMutationId: String

Parameters of the copyLead mutation.

Input fieldTypeDescription
skipCopySuffixBooleanWhen true, the copy keeps the original name without the copy suffix. Defaults to false.
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
CreateLeadInput input 34 fields: clientMutationId, modified, created, …

Field values of a new Lead record.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
currencyExchangeRatesListIdIDId of the currency exchange rate list applied to this lead.
descriptionStringFree-form description of the lead.
isArchivedBooleanTrue when the lead has been archived (lost). Archived leads remain readable but are hidden from active lists and cannot be edited until reactivated.
labelFlagIntUser-set colored flag used to highlight the lead in lists and reports.
lastAiBuyingCenterAppliedDateTimeTime when an AI-suggested buying center was last applied to this lead.
leadSourceIdIDId of the lead source recording how the lead originated (e.g. Website, Referral, Trade Show).
leadTypeIdIDId of the lead type that classifies the lead and drives which form, fields and lead process apply.
nameString!Name of the entity and its default text representation.
ownerIdIDId of the lead owner.
quickAccountEmailStringFree-text company email captured at lead creation when no Account record has been linked yet.
quickAccountNameStringFree-text company name captured at lead creation when no Account record has been linked yet.
quickAccountPhoneStringFree-text company phone captured at lead creation when no Account record has been linked yet.
quickContactNameStringFree-text contact name captured at lead creation when no Contact record has been linked yet.
quickEmailStringFree-text contact email captured at lead creation when no Contact record has been linked yet.
quickPhoneStringFree-text contact phone captured at lead creation when no Contact record has been linked yet.
rankingIntQualitative ranking score (1-10) the user assigns to indicate the strength of the lead.
reasonOfCloseDescriptionStringFree-form note explaining why the lead was archived (lost). Captured alongside reasonOfClose.
reasonOfCloseIdIDId of the reason recorded when the lead is archived (lost), or empty when none was given.
shareModeShareModeEnumSharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
stepIdIDId of the lead process step.
unitIdIDId of the sales unit.
customFieldsJSONStringCustom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
revisionIntRevision when entity was lastly changed.
contactRelations[CreateLeadOpptyContactRelationNoLeadOpptyBackrefInput!]Contacts linked to this lead, including their roles and org-chart positions.
accountRelations[CreateLeadOpptyAccountRelationNoLeadOpptyBackrefInput!]Accounts linked to this lead, including the primary-account flag.
sharingUnits[CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]Sales units that have been granted shared access to this lead. Editable only when shareMode allows unit sharing.
sharingClients[CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]Users that have been granted shared access to this lead. Editable only when shareMode allows user sharing.
documents[CreateCloudObjectRelationNoBackrefInput!]Documents linked to this lead.
tags[CreateTagRelationNoLeadBackrefInput!]Tag labels applied to this lead.
staticProfiles[CreateProfileRelationNoLeadOpptyBackrefInput!]Saved view profiles this lead currently matches.
lostDateDateTimeTimestamp of when the lead was archived (lost). Setting it adjusts the underlying loss event; empty for leads that have not been archived.
CreateOrUpdateLeadInput input 35 fields: clientMutationId, id, modified, …

Field values of a Lead record to create, or to update when its id is set.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idIDUnique identifier of entity.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
currencyExchangeRatesListIdIDId of the currency exchange rate list applied to this lead.
descriptionStringFree-form description of the lead.
isArchivedBooleanTrue when the lead has been archived (lost). Archived leads remain readable but are hidden from active lists and cannot be edited until reactivated.
labelFlagIntUser-set colored flag used to highlight the lead in lists and reports.
lastAiBuyingCenterAppliedDateTimeTime when an AI-suggested buying center was last applied to this lead.
leadSourceIdIDId of the lead source recording how the lead originated (e.g. Website, Referral, Trade Show).
leadTypeIdIDId of the lead type that classifies the lead and drives which form, fields and lead process apply.
nameStringName of the entity and its default text representation.
ownerIdIDId of the lead owner.
quickAccountEmailStringFree-text company email captured at lead creation when no Account record has been linked yet.
quickAccountNameStringFree-text company name captured at lead creation when no Account record has been linked yet.
quickAccountPhoneStringFree-text company phone captured at lead creation when no Account record has been linked yet.
quickContactNameStringFree-text contact name captured at lead creation when no Contact record has been linked yet.
quickEmailStringFree-text contact email captured at lead creation when no Contact record has been linked yet.
quickPhoneStringFree-text contact phone captured at lead creation when no Contact record has been linked yet.
rankingIntQualitative ranking score (1-10) the user assigns to indicate the strength of the lead.
reasonOfCloseDescriptionStringFree-form note explaining why the lead was archived (lost). Captured alongside reasonOfClose.
reasonOfCloseIdIDId of the reason recorded when the lead is archived (lost), or empty when none was given.
shareModeShareModeEnumSharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
stepIdIDId of the lead process step.
unitIdIDId of the sales unit.
customFieldsJSONStringCustom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
revisionIntRevision when entity was lastly changed.
contactRelations[CreateLeadOpptyContactRelationNoLeadOpptyBackrefInput!]Contacts linked to this lead, including their roles and org-chart positions.
accountRelations[CreateLeadOpptyAccountRelationNoLeadOpptyBackrefInput!]Accounts linked to this lead, including the primary-account flag.
sharingUnits[CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]Sales units that have been granted shared access to this lead. Editable only when shareMode allows unit sharing.
sharingClients[CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]Users that have been granted shared access to this lead. Editable only when shareMode allows user sharing.
documents[CreateCloudObjectRelationNoBackrefInput!]Documents linked to this lead.
tags[CreateTagRelationNoLeadBackrefInput!]Tag labels applied to this lead.
staticProfiles[CreateProfileRelationNoLeadOpptyBackrefInput!]Saved view profiles this lead currently matches.
lostDateDateTimeTimestamp of when the lead was archived (lost). Setting it adjusts the underlying loss event; empty for leads that have not been archived.
CreateTagRelationNoLeadBackrefInput input 15 fields: modified, created, accountId, …

Field values of a new TagRelation record, created together with the record it belongs to.

Input fieldTypeDescription
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
accountIdIDId of the linked account.
appointmentIdIDId of the linked appointment.
contactIdIDId of the linked contact.
customEntityIdIDId of the linked custom entity record.
emailIdIDId of the linked email.
opptyIdIDId of the linked opportunity.
processIdIDId of the linked sales process.
projectIdIDId of the linked project.
quoteIdIDId of the linked quote.
solutionIdIDId of the linked solution.
tagIdID!Id of the tag attached to the record.
taskIdIDId of the linked task.
revisionIntRevision when entity was lastly changed.
DeleteLeadInput input clientMutationId: String, id: ID!

Id of the Lead record to delete.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idID!Unique identifier of entity.
ManageSharingLeadInput input 5 fields: shareMode, sharingClients, sharingUnits, …

Parameters of the manageSharingLead mutation.

Input fieldTypeDescription
shareModeShareModeEnum!Sharing mode of the record: Standard, Private, AllView or AllEdit.
sharingClients[CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]Users the record is shared with, each with the Watcher (view) or Editor (edit) role. Send an empty list to remove all shared users.
sharingUnits[CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]Sales units the record is shared with, each with the Watcher or Editor role. Send an empty list to remove all shared units.
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
MoveLeadInput input entity: UpdateLeadInput!, memoText: String, completeActivityIds: [UUID!], clientMutationId: String

Parameters of the moveLead mutation.

Input fieldTypeDescription
entityUpdateLeadInput!Id of the lead, the target step (stepId) and any field values to save with the move.
memoTextStringText of a memo added to the lead together with the move.
completeActivityIds[UUID!]Ids of tasks linked to the lead to mark as completed.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
QualifyLeadInput input entity: UpdateOpportunityInput!, clientMutationId: String

Parameters of the qualifyLead mutation.

Input fieldTypeDescription
entityUpdateOpportunityInput!Id of the lead, the target opportunity step (stepId) and any opportunity field values to set.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ReactivateLeadInput input id: ID!, clientMutationId: String

Parameters of the reactivateLead mutation.

Input fieldTypeDescription
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ReleaseOwnershipLeadInput input id: ID!, clientMutationId: String

Parameters of the releaseOwnershipLead mutation.

Input fieldTypeDescription
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
RestoreLeadInput input id: ID!, clientMutationId: String

Parameters of the restoreLead mutation.

Input fieldTypeDescription
idID!Identifier of the LeadEntity to perform the action on.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
UpdateLeadInput input 35 fields: clientMutationId, id, modified, …

Id of a Lead record and the field values to change.

Input fieldTypeDescription
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
idID!Unique identifier of entity.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
currencyExchangeRatesListIdIDId of the currency exchange rate list applied to this lead.
descriptionStringFree-form description of the lead.
isArchivedBooleanTrue when the lead has been archived (lost). Archived leads remain readable but are hidden from active lists and cannot be edited until reactivated.
labelFlagIntUser-set colored flag used to highlight the lead in lists and reports.
lastAiBuyingCenterAppliedDateTimeTime when an AI-suggested buying center was last applied to this lead.
leadSourceIdIDId of the lead source recording how the lead originated (e.g. Website, Referral, Trade Show).
leadTypeIdIDId of the lead type that classifies the lead and drives which form, fields and lead process apply.
nameStringName of the entity and its default text representation.
ownerIdIDId of the lead owner.
quickAccountEmailStringFree-text company email captured at lead creation when no Account record has been linked yet.
quickAccountNameStringFree-text company name captured at lead creation when no Account record has been linked yet.
quickAccountPhoneStringFree-text company phone captured at lead creation when no Account record has been linked yet.
quickContactNameStringFree-text contact name captured at lead creation when no Contact record has been linked yet.
quickEmailStringFree-text contact email captured at lead creation when no Contact record has been linked yet.
quickPhoneStringFree-text contact phone captured at lead creation when no Contact record has been linked yet.
rankingIntQualitative ranking score (1-10) the user assigns to indicate the strength of the lead.
reasonOfCloseDescriptionStringFree-form note explaining why the lead was archived (lost). Captured alongside reasonOfClose.
reasonOfCloseIdIDId of the reason recorded when the lead is archived (lost), or empty when none was given.
shareModeShareModeEnumSharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
stepIdIDId of the lead process step.
unitIdIDId of the sales unit.
customFieldsJSONStringCustom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
revisionIntRevision when entity was lastly changed.
contactRelations[CreateLeadOpptyContactRelationNoLeadOpptyBackrefInput!]Contacts linked to this lead, including their roles and org-chart positions.
accountRelations[CreateLeadOpptyAccountRelationNoLeadOpptyBackrefInput!]Accounts linked to this lead, including the primary-account flag.
sharingUnits[CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]Sales units that have been granted shared access to this lead. Editable only when shareMode allows unit sharing.
sharingClients[CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]Users that have been granted shared access to this lead. Editable only when shareMode allows user sharing.
documents[CreateCloudObjectRelationNoBackrefInput!]Documents linked to this lead.
tags[CreateTagRelationNoLeadBackrefInput!]Tag labels applied to this lead.
staticProfiles[CreateProfileRelationNoLeadOpptyBackrefInput!]Saved view profiles this lead currently matches.
lostDateDateTimeTimestamp of when the lead was archived (lost). Setting it adjusts the underlying loss event; empty for leads that have not been archived.
ArchiveLeadPayload object result: LeadEntity, clientMutationId: String

Result of the archiveLead mutation.

FieldTypeDescription
resultLeadEntityThe archived lead.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BackToLeadPayload object result: LeadEntity, clientMutationId: String

Result of the backToLead mutation.

FieldTypeDescription
resultLeadEntityThe resulting lead.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkArchiveLeadPayload object result: BulkUpdateResults!, clientMutationId: String

Result of the bulkArchiveLead mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the archived leads and the items that failed.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkBackToLeadPayload object result: BulkUpdateResults!, clientMutationId: String

Result of the bulkBackToLead mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the converted records and the items that failed.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkMoveLeadPayload object result: BulkUpdateResults!, clientMutationId: String

Result of the bulkMoveLead mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the moved leads and the items that failed.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkQualifyLeadPayload object result: BulkUpdateResults!, clientMutationId: String

Result of the bulkQualifyLead mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the qualified records (the new opportunities keep the lead ids) and the items that failed.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkReactivateLeadPayload object result: BulkUpdateResults!, clientMutationId: String

Result of the bulkReactivateLead mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the reactivated records and the items that failed.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
BulkUpdateLeadPayload object result: BulkUpdateResults!

Result of the bulkUpdateLead mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the created, updated and deleted records, and the items that failed.
ChangeLabelFlagLeadPayload object result: LeadEntity, clientMutationId: String

Result of the changeLabelFlagLead mutation.

FieldTypeDescription
resultLeadEntityThe updated record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ChangeOwnershipLeadPayload object result: LeadEntity, clientMutationId: String

Result of the changeOwnershipLead mutation.

FieldTypeDescription
resultLeadEntityThe record with its new owner.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ConvertLeadPayload object lead: LeadEntity!, clientMutationId: String

Result of the convertLead mutation.

FieldTypeDescription
leadLeadEntity!The created record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
CopyLeadPayload object result: LeadEntity, clientMutationId: String

Result of the copyLead mutation.

FieldTypeDescription
resultLeadEntityThe new lead.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
CreateLeadPayload object lead: LeadEntity, clientMutationId: String

Result of the createLead mutation.

FieldTypeDescription
leadLeadEntityThe created record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
DeleteLeadPayload object lead: LeadEntity, clientMutationId: String

Result of the deleteLead mutation.

FieldTypeDescription
leadLeadEntityThe deleted record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ManageSharingLeadPayload object result: LeadEntity, clientMutationId: String

Result of the manageSharingLead mutation.

FieldTypeDescription
resultLeadEntityThe record with its updated sharing.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
MoveLeadPayload object result: LeadEntity, clientMutationId: String

Result of the moveLead mutation.

FieldTypeDescription
resultLeadEntityThe moved lead.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
QualifyLeadPayload object result: OpportunityEntity, clientMutationId: String

Result of the qualifyLead mutation.

FieldTypeDescription
resultOpportunityEntityThe created opportunity.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ReactivateLeadPayload object result: LeadEntity, clientMutationId: String

Result of the reactivateLead mutation.

FieldTypeDescription
resultLeadEntityThe reactivated lead.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
ReleaseOwnershipLeadPayload object result: LeadEntity, clientMutationId: String

Result of the releaseOwnershipLead mutation.

FieldTypeDescription
resultLeadEntityThe released lead.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
RestoreLeadPayload object result: LeadEntity, clientMutationId: String

Result of the restoreLead mutation.

FieldTypeDescription
resultLeadEntityThe restored record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
UpdateLeadPayload object lead: LeadEntity, clientMutationId: String

Result of the updateLead mutation.

FieldTypeDescription
leadLeadEntityThe updated record.
clientMutationIdStringOptional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
EntityScoringResult object 8 fields: categories, score, trend, …

Score of a record: its value, trend and category, and the rules that affect it.

FieldTypeDescription
categories[EntityScoringCategory!]!Score categories of the scoring, such as Hot, Warm and Cold.
scoreInt!Score of the record as a percentile from 0 to 100, comparing its rule points with those of the other records of the same scoring; 0 when it has no points.
trendEntityScoringTrendEnum!How the score changed compared with the previous calculation.
rules[EntityScoringResultRule!]!Scoring rules that currently add points to the score of the record, or subtract them.
entityScoringIdUUID!Id of the scoring the record was scored by.
entityScoringNameString!Name of the scoring the record was scored by.
entityScoringUseLangBoolean!When true, entityScoringName is treated as a translation key and resolved through the translation system; otherwise the literal text is shown.
lastCalculationDateTime!When the score of the record was last calculated.
EntityScoringResultRule object id: UUID!, name: String!, useLang: Boolean!, trend: EntityScoringTrendEnum!

Scoring rule that currently adds points to the score of a record, or subtracts them.

FieldTypeDescription
idUUID!Id of the scoring rule.
nameString!Name of the scoring rule.
useLangBoolean!When true, name is treated as a translation key and resolved through the translation system; otherwise the literal text is shown.
trendEntityScoringTrendEnum!Whether the rule adds points to the score or subtracts them.
EntityScoringTrendEnum enum Decreasing, Increasing, NoChange

Direction of a record's score, or of one scoring rule's contribution to it.

ValueDescription
DecreasingThe score went down, or the rule subtracts points.
IncreasingThe score went up, or the rule adds points.
NoChangeThe score did not change, or the rule adds no points.
LeadAutoPrefill object entity: LeadEntity, fieldIds: [UUID!]!

New, unsaved lead pre-filled with the values of an AI suggestion, with the ids of the fields that were filled in.

FieldTypeDescription
entityLeadEntityNew lead carrying the pre-filled values; it is not saved.
fieldIds[UUID!]!Ids of the fields that were filled in.
LeadStatusEnum enum Open, Lost, Qualified

Status of a lead.

ValueDescription
OpenThe lead is active.
LostThe lead was archived as lost.
QualifiedThe lead was qualified into an opportunity.