---
title: entities.entityFitness
description: Read entity fitness records with the entityFitness repository, and change them with the entity fitness mutations. Same records as the REST EntityFitnesses entity.
canonical: https://developers.coevera.com/reference/graphql/entity-fitness/
section: graphql
verification: schema
generatedFrom: schema f155746 (2026-10-20)
publisher: Coevera
---

# entities.entityFitness

Read entity fitness records with the entityFitness repository, and change them with the entity fitness mutations. Same records as the REST EntityFitnesses entity.

REST: [EntityFitnesses](https://developers.coevera.com/reference/rest/entity-fitnesses.md).

## Queries

- `getById(entityId: ID!): EntityFitnessEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [EntityFitnessEntity!]!` Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
- `getAll(limit: Int, offset: Int, filter: EntityFitnessFilterInput, orderBy: [EntityFitnessOrderByInput!], includeDeleted: Boolean): [EntityFitnessEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: EntityFitnessFilterInput, orderBy: [EntityFitnessOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): EntityFitnessEntityConnection` Returns the records that match the filter as a cursor-paginated connection.
- `getChangedFieldsSinceRevision(id: UUID!, revision: Int!): [UUID!]!` Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
- `getByEntityType(entityType: EntityNameEnum!, entityTypeId: UUID!): EntityFitnessEntity!` Returns the fitness configuration of a lead type or opportunity type.

## Mutations

- `updateEntityFitness(input: UpdateEntityFitnessInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateEntityFitnessPayload` Update fields.

## Types

### EntityFitnessEntity (object)

Fitness configuration of a lead or opportunity type: the indicators that flag records of that type needing attention.

- `isDeleteProtected: Boolean!` 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.
- `id: ID!` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `leadType: LeadTypeEntity` Lead type this fitness configuration applies to. Set when configuring fitness for leads.
- `opptyType: OpportunityTypeEntity` Opportunity type this fitness configuration applies to. Set when configuring fitness for opportunities.
- `leadTypeId: ID` Id of the lead type this fitness configuration applies to. Set when configuring fitness for leads.
- `opptyTypeId: ID` Id of the opportunity type.
- `revision: Int` Revision when entity was lastly changed.
- `indicatorRelations: EntityFitnessIndicatorEntityConnection (7 args)` Fitness indicators (system or custom rules) defined for this configuration.
- `entityTypeId: UUID!` Id of the lead or opportunity type this fitness configuration applies to.
- `entityType: BaseEntityTypeEnum!` Entity kind this fitness configuration applies to (Lead or Opportunity). Derived from whichever of leadType/opptyType is set.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### EntityFitnessEntityConnection (object)

Paginated list of EntityFitness records.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [EntityFitnessEntityEdge]!` Contains the nodes in this connection.
- `totalCount: Int` Total number of items in the connection.

### EntityFitnessEntityEdge (object)

A Relay edge containing a `EntityFitnessEntity` and its cursor.

- `node: EntityFitnessEntity` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### EntityFitnessFilterInput (input)

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

- `OR: [EntityFitnessFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [EntityFitnessFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: EntityFitnessFilterInput` Matches records that do not meet this filter.
- `globalSearchQuery: String` Search term matched against the fields that the global search covers for this entity.
- `id: EntityFilterStringField` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: EntityFilterDateTimeField` Last modification time.
- `created: EntityFilterDateTimeField` Creation time.
- `leadTypeId: EntityFilterStringField` Id of the lead type this fitness configuration applies to. Set when configuring fitness for leads.
- `opptyTypeId: EntityFilterStringField` Id of the opportunity type.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.
- `entityTypeId: UUID` Id of the lead or opportunity type this fitness configuration applies to.
- `entityType: BaseEntityTypeEnum` Entity kind this fitness configuration applies to (Lead or Opportunity). Derived from whichever of leadType/opptyType is set.
- `leadType: LeadTypeFilterInput` Lead type this fitness configuration applies to. Set when configuring fitness for leads. Matches records where a related record meets these conditions.
- `opptyType: OpportunityTypeFilterInput` Opportunity type this fitness configuration applies to. Set when configuring fitness for opportunities. Matches records where a related record meets these conditions.
- `indicatorRelations: EntityFitnessIndicatorFilterInput` Fitness indicators (system or custom rules) defined for this configuration. Matches records where a related record meets these conditions.

### EntityFitnessOrderByInput (input)

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

- `id: OrderByEnum` Unique identifier of entity.
- `isDeleted: OrderByEnum` Specifies if the entity is considered deleted.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `leadType: [LeadTypeOrderByNestedInput!]` Lead type this fitness configuration applies to. Set when configuring fitness for leads. Sorts by fields of the related record, listed in order of priority.
- `opptyType: [OpportunityTypeOrderByNestedInput!]` Opportunity type this fitness configuration applies to. Set when configuring fitness for opportunities. Sorts by fields of the related record, listed in order of priority.
- `leadTypeId: OrderByEnum` Id of the lead type this fitness configuration applies to. Set when configuring fitness for leads.
- `opptyTypeId: OrderByEnum` Id of the opportunity type.
- `revision: OrderByEnum` Revision when entity was lastly changed.

### CreateOrUpdateEntityFitnessIndicatorNoEntityFitnessBackrefInput (input)

Field values of an EntityFitnessIndicator record to create, or to update when its id is set, together with the record it belongs to.

- `id: ID` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `description: String` Description of what the indicator measures, shown in the UI.
- `descriptionUseLang: Boolean` When true, description is treated as a translation key and localized in the UI.
- `howToFix: String` Suggested remediation text shown to the user when a record triggers this indicator.
- `howToFixUseLang: Boolean` When true, howToFix is treated as a translation key and localized in the UI.
- `isEnabled: Boolean` When false, the indicator is configured but not evaluated for records.
- `name: String` Display name of the indicator.
- `nameUseLang: Boolean` When true, name is treated as a translation key and localized in the UI; otherwise the literal text is shown.
- `settings: FitnessIndicatorSettingsJSONString` Indicator rules. For system indicators contains three thresholds (Notice, Warning, Error); for custom indicators contains user-defined filter rules. This payload conforms to the `FitnessIndicatorSettings` JSON Schema: GET /api/v100/rest/schemas/FitnessIndicatorSettings.json on your region's API host
- `type: FitnessIndicatorTypeEnum` Rule the indicator evaluates. Custom indicators use user-defined filter rules and can be deleted; all other values are built-in system indicators with three threshold rules in settings that cannot be deleted.
- `revision: Int` Revision when entity was lastly changed.

### UpdateEntityFitnessInput (input)

Id of an EntityFitness record and the field values to change.

- `clientMutationId: String` Optional 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).
- `id: ID!` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `revision: Int` Revision when entity was lastly changed.
- `indicatorRelations: [CreateOrUpdateEntityFitnessIndicatorNoEntityFitnessBackrefInput!]` Fitness indicators (system or custom rules) defined for this configuration.

### UpdateEntityFitnessPayload (object)

Result of the updateEntityFitness mutation.

- `entityFitness: EntityFitnessEntity` The updated record.
- `clientMutationId: String` Optional 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).

Types several repositories share, such as `PageInfo` and the filter fields, are in the [types index](https://developers.coevera.com/reference/graphql/types.md). The [SDL](https://developers.coevera.com/graphql/schema.graphql) has the whole schema in one file.

## Example

```graphql
query FirstEntityFitnesss {
  entities {
    entityFitness {
      getByCriteria(first: 3, orderBy: [{ modified: Desc }]) {
        totalCount
        edges { node { id modified } }
      }
    }
  }
}
```

```bash
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 FirstEntityFitnesss { entities { entityFitness { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id modified } } } } } }"}'
```
