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

# entities.timeframe

Read timeframe records with the timeframe repository, and change them with the timeframe mutations. Same records as the REST Timeframes entity.

REST: [Timeframes](https://developers.coevera.com/reference/rest/timeframes.md).

## Queries

- `getById(entityId: ID!): TimeframeEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [TimeframeEntity!]!` 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: TimeframeFilterInput, orderBy: [TimeframeOrderByInput!], includeDeleted: Boolean): [TimeframeEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: TimeframeFilterInput, orderBy: [TimeframeOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): TimeframeEntityConnection` 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.

## Types

### TimeframeEntity (object)

Time a lead or opportunity has spent in a pipeline step.

- `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.
- `lead: LeadEntity` Lead this step-time record belongs to. Set when leadOpptyId resolves to a Lead.
- `oppty: OpportunityEntity` Opportunity this step-time record belongs to. Set when leadOpptyId resolves to an Opportunity.
- `step: StepEntity` Pipeline step the lead/opportunity entered.
- `leadOpptyId: ID!` Id of the lead or opportunity the timeframe belongs to.
- `stepId: ID!` Id of the pipeline step.
- `timeframe: Int!` Number of seconds the record spent in the step (cumulative across re-entries).
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### TimeframeEntityConnection (object)

Paginated list of Timeframe records.

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

### TimeframeEntityEdge (object)

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

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

### TimeframeFilterInput (input)

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

- `OR: [TimeframeFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [TimeframeFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: TimeframeFilterInput` 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.
- `leadOpptyId: EntityFilterStringField` Id of the lead or opportunity the timeframe belongs to.
- `stepId: EntityFilterStringField` Id of the pipeline step.
- `timeframe: EntityFilterNumberField` Number of seconds the record spent in the step (cumulative across re-entries).
- `lead: LeadFilterInput` Lead this step-time record belongs to. Set when leadOpptyId resolves to a Lead. Matches records where a related record meets these conditions.
- `oppty: OpportunityFilterInput` Opportunity this step-time record belongs to. Set when leadOpptyId resolves to an Opportunity. Matches records where a related record meets these conditions.
- `step: StepFilterInput` Pipeline step the lead/opportunity entered. Matches records where a related record meets these conditions.

### TimeframeOrderByInput (input)

Sorting of Timeframe 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.
- `lead: [LeadOrderByNestedInput!]` Lead this step-time record belongs to. Set when leadOpptyId resolves to a Lead. Sorts by fields of the related record, listed in order of priority.
- `oppty: [OpportunityOrderByNestedInput!]` Opportunity this step-time record belongs to. Set when leadOpptyId resolves to an Opportunity. Sorts by fields of the related record, listed in order of priority.
- `step: [StepOrderByNestedInput!]` Pipeline step the lead/opportunity entered. Sorts by fields of the related record, listed in order of priority.
- `leadOpptyId: OrderByEnum` Id of the lead or opportunity the timeframe belongs to.
- `stepId: OrderByEnum` Id of the pipeline step.
- `timeframe: OrderByEnum` Number of seconds the record spent in the step (cumulative across re-entries).

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