Update agent profile
Update agent profile: updateAgentProfile in the TypeScript, Python, Rust and Go clients.
PATCH /v1/projects/{projectId}/agent-profile
Updates the supplied firstName and lastName fields in the project's agent profile and returns the updated profile. Avatar upload, commit and reset are separate operations. The caller must be authorized to change configuration for the selected project. Supply the required Idempotency-Key header.
photon.projects.agentProfile.update(input: UpdateAgentProfileInput, options?: RequestOptions): Promise<UpdateAgentProfileOutput>photon.projects.agent_profile.update(input: UpdateAgentProfileInput, *, options: RequestOptions | None = None) -> models.AgentProfileclient.update_agent_profile(idempotency_key: String, project_id: String, body: &types::UpdateAgentProfileRequest).await -> Result<ResponseValue<types::AgentProfile>, Error<UpdateAgentProfileError>>client.Projects.AgentProfile.Update(ctx context.Context, params *UpdateAgentProfileParams, opts ...RequestOption) (*AgentProfile, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.agentProfile.update({
path: {
projectId: "projectId",
},
headers: {
idempotencyKey: "idempotencyKey",
},
body: {},
});import os
from photon_api import Photon
from photon_api.rpc_generated import UpdateAgentProfileInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.agent_profile.update(
UpdateAgentProfileInput.model_validate({
"path": {
"projectId": "projectId",
},
"headers": {
"Idempotency-Key": "idempotencyKey",
},
"body": {},
})
)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
.update_agent_profile(
"idempotencyKey".to_owned(),
"projectId".to_owned(),
&serde_json::from_value(serde_json::json!({}))?,
)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();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.UpdateAgentProfileRequest
if err := json.Unmarshal([]byte(`{}`), &body); err != nil {
return err
}
result, err := client.Projects.AgentProfile.Update(ctx, &photonapi.UpdateAgentProfileParams{
IdempotencyKey: "idempotencyKey",
ProjectID: "projectId",
Body: body,
})
if err != nil {
return err
}
_ = result{
"avatarUrl": "https://example.com",
"firstName": "string",
"lastName": null
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Identifies one logical mutation across retries.
Body
Returns
200 The updated agent profile. AgentProfile
Headers: Photon-Version. The raw response carries these headers; see Raw responses.