GET
/
v1
/
agent
/
context
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.agentGetContext()
{
  "user": {
    "id": "<string>",
    "email": "<string>"
  },
  "organizations": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "teams": [
    {
      "id": "<string>",
      "organizationId": "<string>",
      "name": "<string>"
    }
  ],
  "defaultOrganizationId": "<string>",
  "defaultTeamId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Success

user
object
required
organizations
object[]
required
teams
object[]
required
defaultOrganizationId
string | null
required
defaultTeamId
string | null
required