Google Dialogflow Contexts API

The contexts API from Google Dialogflow — 8 operation(s) for contexts.

Operations 20

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts Add a context to a regional session · Dialogflow projects locations agent sessions contexts create #
Ask an LLM
“How do I set a context on a live session of my regional agent?”
“Can I control how many turns a context stays active when I add it to a regional session?”
Tell an agent
Create context {name} in session {session} for project {project} in location {location}.
Add context {name} to regional session {session} in {location} for project {project}, active for {lifespan} turns.
GET /v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts List active contexts in a regional session · Dialogflow projects locations agent sessions contexts list #
Ask an LLM
“Which contexts are currently active in a session on my regional ES agent?”
“Can I page through the contexts of a draft-agent session in one location?”
Tell an agent
List the active contexts in session {session} for project {project} in location {location}.
Show regional session {session} contexts in {location}, {page_size} at a time, for project {project}.
PATCH /v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId} Update a context in a regional session · Dialogflow projects locations agent sessions contexts patch #
Ask an LLM
“Can I change the lifespan of a context that is already active in a regional session?”
“How would I overwrite the parameters on an existing location-scoped context?”
Tell an agent
Update context {context} in session {session} for project {project}, location {location}, to last {lifespan} turns.
Patch regional context {context} of session {session} in {location}, project {project}, using mask {update_mask}.
DELETE /v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId} Remove a context from a regional session · Dialogflow projects locations agent sessions contexts delete #
Ask an LLM
“Can I clear a single context from a session on my regional agent?”
“Does deleting one context end the rest of a location-scoped session?”
Tell an agent destructive · confirm first
Delete context {context} from session {session} for project {project} in location {location}.
Drop regional context {context} out of session {session} in {location} for project {project}.
GET /v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId} Get a context from a regional session · Dialogflow projects locations agent sessions contexts get #
Ask an LLM
“What parameters does a specific context hold in my regional session?”
“Can I check the remaining lifespan of one context in a location-scoped session?”
Tell an agent
Get context {context} from session {session} for project {project} in location {location}.
Show the parameters stored in regional context {context} of session {session} in {location}, project {project}.
POST /v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts Add a context to a regional environment session · Dialogflow projects locations agent environments users sessions contexts create #
Ask an LLM
“How do I inject a context into an end user's session in a regional deployed environment?”
“Can I create a context for a specific user in a location-scoped environment?”
Tell an agent
Create context {name} for user {user} in session {session} of environment {environment}, project {project}, location {location}.
Give user {user}'s session {session} in regional environment {environment} the context {name} for {lifespan} turns.
GET /v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts List contexts in a regional environment session · Dialogflow projects locations agent environments users sessions contexts list #
Ask an LLM
“Which contexts are active for one user's session in a regional environment?”
“Can I list contexts per end user in a deployed environment in one location?”
Tell an agent
List contexts for user {user} in session {session} of environment {environment}, project {project}, location {location}.
Page through contexts of user {user}'s session {session} in regional environment {environment} with token {page_token}.
PATCH /v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId} Update a context in a regional environment session · Dialogflow projects locations agent environments users sessions contexts patch #
Ask an LLM
“Can I extend a context's lifespan for one user in a regional deployed environment?”
“How do I change the parameters of a context in a location-scoped environment session?”
Tell an agent
Update context {context} for user {user}, session {session}, environment {environment}, project {project}, location {location}, to {lifespan} turns.
Patch regional environment {environment} context {context} of user {user}'s session {session} with mask {update_mask}.
DELETE /v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId} Remove a context in a regional environment session · Dialogflow projects locations agent environments users sessions contexts delete #
Ask an LLM
“Can I delete one context from an end user's session in a regional environment?”
“Is clearing a context in a deployed location-scoped environment immediate?”
Tell an agent destructive · confirm first
Delete context {context} for user {user} in session {session} of environment {environment}, project {project}, location {location}.
Clear regional environment {environment} context {context} from user {user}'s session {session}.
GET /v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId} Get a context in a regional environment session · Dialogflow projects locations agent environments users sessions contexts get #
Ask an LLM
“What does a particular context look like in a user's regional environment session?”
“Can I read one context back from a deployed environment's session in a given location?”
Tell an agent
Get context {context} for user {user}, session {session}, environment {environment}, project {project}, location {location}.
Read regional environment {environment} context {context} from user {user}'s session {session}.
POST /v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts Add a context to an environment user session · Dialogflow projects agent environments users sessions contexts create #
Ask an LLM
“How do I set a context for one user's session in a global agent environment?”
“Can I add a context with a lifespan to a default-location environment session?”
Tell an agent
Create context {name} for user {user} in session {session} of global environment {environment}, project {project}.
Attach context {name} lasting {lifespan} turns to user {user}'s session {session} in default environment {environment}, project {project}.
GET /v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts List contexts in an environment user session · Dialogflow projects agent environments users sessions contexts list #
Ask an LLM
“Which contexts are active for a user's session in an environment of my global ES agent?”
“Can I list a default-location environment's session contexts per user?”
Tell an agent
List contexts for user {user} in session {session} of global environment {environment}, project {project}.
Show {page_size} contexts per page from user {user}'s session {session} in default environment {environment}, project {project}.
PATCH /v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId} Update a context in an environment user session · Dialogflow projects agent environments users sessions contexts patch #
Ask an LLM
“Can I modify a context's parameters for one user in a global agent environment?”
“How do I reset the lifespan of a context in a default-location environment session?”
Tell an agent
Update context {context} for user {user}, session {session}, global environment {environment}, project {project}, to {lifespan} turns.
Patch default environment {environment} context {context} in user {user}'s session {session}, project {project}, with mask {update_mask}.
GET /v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId} Get a context in an environment user session · Dialogflow projects agent environments users sessions contexts get #
Ask an LLM
“What's stored in one context of a user's session in my global agent's environment?”
“Can I fetch a single context from a default-location environment session?”
Tell an agent
Get context {context} for user {user}, session {session}, global environment {environment}, project {project}.
Fetch default environment {environment} context {context} from user {user}'s session {session} in project {project}.
DELETE /v2/projects/{projectsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId} Remove a context in an environment user session · Dialogflow projects agent environments users sessions contexts delete #
Ask an LLM
“Can I delete a context from a user's session in a global agent environment?”
“Is a deleted context in a default-location environment session gone for good?”
Tell an agent destructive · confirm first
Delete context {context} for user {user} in session {session} of global environment {environment}, project {project}.
Remove default environment {environment} context {context} from user {user}'s session {session} in project {project}.
GET /v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts List active contexts in a session · Dialogflow projects agent sessions contexts list #
Ask an LLM
“Which contexts are active right now in a session of my global ES agent?”
“How do I see all contexts for a draft-agent session in my default project location?”
Tell an agent
List the contexts in session {session} of the global agent in project {project}.
Show default-location session {session} contexts for project {project} after token {page_token}.
POST /v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts Add a context to a session · Dialogflow projects agent sessions contexts create #
Ask an LLM
“Can I push a context into a session of my global ES agent from my backend?”
“What lifespan can I give a context I create on a default-location session?”
Tell an agent
Create context {name} in session {session} of the global agent in project {project}.
Set context {name} for {lifespan} turns on default-location session {session}, project {project}.
GET /v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId} Get a context from a session · Dialogflow projects agent sessions contexts get #
Ask an LLM
“How can I read one context back from a global agent session?”
“Can I see the parameters a single context carries in a default-location session?”
Tell an agent
Get context {context} from session {session} of the global agent in project {project}.
Show default-location context {context} parameters for session {session}, project {project}.
PATCH /v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId} Update a context in a session · Dialogflow projects agent sessions contexts patch #
Ask an LLM
“Can I update the lifespan of a context in my global agent session?”
“How do I change a default-location context's parameters mid-conversation?”
Tell an agent
Update context {context} in session {session} of the global agent, project {project}, to last {lifespan} turns.
Patch default-location context {context} in session {session}, project {project}, with mask {update_mask}.
DELETE /v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId} Remove a context from a session · Dialogflow projects agent sessions contexts delete #
Ask an LLM
“Can I delete a single context from a global agent session?”
“Will removing one context from a default-location session affect other contexts?”
Tell an agent destructive · confirm first
Delete context {context} from session {session} of the global agent in project {project}.
Drop default-location context {context} from session {session} in project {project}.

Documentation

Specifications

Other Resources

🔗
Discovery
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/discovery/google-dialogflow-v3.json
🔗
Discovery
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/discovery/google-dialogflow-v3beta1.json
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/cx-v3/session.proto
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/cx-v3/agent.proto
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/cx-v3/webhook.proto
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/cx-v3/tool.proto
🔗
Pricing
https://cloud.google.com/dialogflow/pricing
🔗
Console
https://dialogflow.cloud.google.com/cx
🔗
Webhooks
https://cloud.google.com/dialogflow/cx/docs/concept/webhook
🔗
Discovery
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/discovery/google-dialogflow-v2.json
🔗
Discovery
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/discovery/google-dialogflow-v2beta1.json
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/v2/session.proto
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/v2/agent.proto
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/v2/intent.proto
🔗
Protobuf
https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/grpc/v2/webhook.proto
🔗
Console
https://dialogflow.cloud.google.com/
🔗
Webhooks
https://cloud.google.com/dialogflow/es/docs/fulfillment-webhook

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-dialogflow:google-dialogflow-contexts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-dialogflow-contexts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dialogflow ES API (v2) Contexts API
  version: v2
  description: Dialogflow ES (Essentials) builds conversational interfaces with intents, entity types, contexts, sessions, knowledge bases, conversation profiles and Agent Assist. This OpenAPI is a mechanical conversion of the first-party Google Discovery Document served by dialogflow.googleapis.com.
  contact:
    name: Google Cloud
    url: https://cloud.google.com/dialogflow/
  termsOfService: https://cloud.google.com/terms
  license:
    name: Google APIs Terms of Service
    url: https://developers.google.com/terms
  x-discovery-source: https://dialogflow.googleapis.com/$discovery/rest?version=v2
  x-discovery-revision: '20260825'
  x-discovery-id: dialogflow:v2
servers:
- url: https://dialogflow.googleapis.com
  description: Dialogflow API
security:
- OAuth2:
  - https://www.googleapis.com/auth/dialogflow
  - https://www.googleapis.com/auth/cloud-platform
- BearerAuth: []
tags:


# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/google-dialogflow/refs/heads/main/openapi/google-dialogflow-contexts-api-openapi.yml