> ## Documentation Index
> Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# Set typing in a Space

> Set typing in a Space: setSpaceTyping in the TypeScript, Python, Rust and Go clients.

`POST /v1/projects/{id}/spaces/{spaceId}/typing`

Saves one transient typing update as an authorized Agent in this Space. Returns the dispatched Message with HTTP 202. Successful provider handoff ends in accepted; rejection or expiry ends in failed. Repeat true to refresh; false stops where supported. Callers control refreshes. Unsupported platforms return OPERATION\_UNAVAILABLE.

**TypeScript**

```typescript TypeScript theme={null}
photon.projects.setSpaceTyping(input: SetSpaceTypingInput, options?: RequestOptions): Promise<SetSpaceTypingOutput>
```

**Python**

```python Python theme={null}
photon.projects.set_space_typing(input: SetSpaceTypingInput) -> models.SetSpaceTypingResponse
```

**Rust**

```rust Rust theme={null}
client.set_space_typing(id: String, space_id: String, body: &types::SetSpaceTypingRequest).await -> Result<ResponseValue<types::SetSpaceTypingResponse>, Error<SetSpaceTypingError>>
```

**Go**

```go Go theme={null}
client.Projects.SetSpaceTyping(ctx context.Context, params *SetSpaceTypingParams, opts ...RequestOption) (*SetSpaceTypingResponse, error)
```

```typescript TypeScript theme={null}
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.setSpaceTyping({
  path: {
    id: "id",
    spaceId: "spaceId",
  },
  body: {
    senderId: "senderId",
    typing: true,
  },
});
```

```python Python theme={null}
import os

from photon_api import Photon
from photon_api.rpc_generated import SetSpaceTypingInput

photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.set_space_typing(
    SetSpaceTypingInput.model_validate({
        "path": {
            "id": "id",
            "spaceId": "spaceId",
        },
        "body": {
            "senderId": "senderId",
            "typing": True,
        },
    })
)
```

```rust Rust theme={null}
use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};

let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
    .credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
    .build()?;
let result = client
    .set_space_typing(
        "id".to_owned(),
        "spaceId".to_owned(),
        &serde_json::from_value(serde_json::json!({
            "senderId": "senderId",
            "typing": true,
        }))?,
    )
    .await
    .map_err(|error| format!("{error:?}"))?
    .into_inner();
```

```go Go theme={null}
import (
	"context"
	"encoding/json"
	"os"

	photonapi "github.com/photon-hq/api/packages/go"
)

ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
var body photonapi.SetSpaceTypingRequest
if err := json.Unmarshal([]byte(`{
	"senderId": "senderId",
	"typing": true
}`), &body); err != nil {
	return err
}
result, err := client.Projects.SetSpaceTyping(ctx, &photonapi.SetSpaceTypingParams{
	ID: "id",
	SpaceID: "spaceId",
	Body: body,
})
if err != nil {
	return err
}
_ = result
```

```json 202 theme={null}
{
  "content": {
    "type": "space.typing.update",
    "typing": true
  },
  "createdAt": "2026-01-01T00:00:00.000Z",
  "id": "pho_msg_00000000000000000000000001",
  "metadata": {},
  "platform": "whatsapp",
  "projectId": "pho_prj_00000000000000000000000001",
  "sentBy": {
    "details": {
      "resourceId": "pho_res_00000000000000000000000001",
      "type": "dedicated"
    },
    "handle": "+14155550123",
    "id": "pho_usr_00000000000000000000000001",
    "kind": "agent",
    "metadata": {},
    "platform": "whatsapp",
    "projectId": "pho_prj_00000000000000000000000001"
  },
  "space": {
    "details": {},
    "id": "pho_spc_00000000000000000000000001",
    "kind": "direct",
    "metadata": {},
    "participantIds": [
      "pho_usr_00000000000000000000000001",
      "pho_usr_00000000000000000000000002"
    ],
    "platform": "whatsapp",
    "projectId": "pho_prj_00000000000000000000000001"
  },
  "status": "dispatched",
  "timestamps": {
    "dispatchedAt": "2026-01-01T00:00:00.000Z"
  },
  "updatedAt": "2026-01-01T00:00:00.000Z"
}
```

## Parameters

**id** `string` *required*

**spaceId** `string` *required*

## Body

**senderId** `string` *required*

**typing** `boolean` *required*

True starts or refreshes typing; false stops it.

## Returns

**`202`** The typing Message was dispatched. SetSpaceTypingResponse

Headers: `Cache-Control`. The raw response carries these headers; see [Raw responses](https://docs.photon.codes/docs/beta/api-client/raw-responses.md).

**acceptance** `object` *required*

**addressedTo** `UserSnapshot`

**content** `SetSpaceTypingContent` *required*

**createdAt** `string (date-time)` *required*

When Photon first persisted this resource.

**failure** `MessageFailure` *required*

**id** `string` *required*

**metadata** `ResourceMetadata` *required*

**parentMessageId** `string`

**platform** `"telegram"` *required*

**projectId** `string` *required*

**receivedBy** `UserSnapshot`

**sentBy** `UserSnapshot` *required*

**space** `SpaceSnapshot` *required*

**status** `"dispatched"` *required*

**timestamp** `object`

**timestamps** `FailedMessageTimestamps` *required*

**updatedAt** `string (date-time)` *required*

When Photon last persisted a change to this resource's public state.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.