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

# Atualizar uma conta de médico

> Copie para o Cursor/Claude/Copilot para gerar uma integração PATCH /v1/institutional/accounts/{account_id}.

Cole este prompt no seu assistente de programação com IA. Ele já inclui o contrato, a autenticação e o envelope de erros, para que o código gerado corresponda à API de produção.

```text Prompt theme={null}
Você está integrando a API pública da Telepatia Synapse.

Endpoint: PATCH /v1/institutional/accounts/{account_id}
Base URL: https://scribe-api.telepatia.ai
Auth: Authorization: Bearer ${SYNAPSE_API_KEY}
Chave: somente chave de API institucional. Uma chave de API de médico recebe 403 permission_denied.

Requisição:
- account_id [path]: string (obrigatório)
- nameFull [body]: string (opcional, minLength=1, maxLength=500)
- doctorSpecialties [body]: array<MedicalSpecialty> (opcional, minItems=1) — Replaces the account's specialties. Accepts either the specialty key ('CARDIOLOGY') or value ('cardiology'); always persisted as the value.
- internalCode [body]: string (opcional, minLength=1, maxLength=128) — Your institution's code for this account. It can be set only on an account that has no internalCode, for example an account created through an invitation. Sending the stored value again changes nothing. A different value returns 409: contact Telepatia support to change a stored code. Each internalCode identifies one account of your institution.

Sucesso 200:
- id: string
- email: string
- nameFull?: string
- doctorSpecialties: array<MedicalSpecialty>
- enabled: boolean
- internalCode?: string
- roles?: array<string>
- createdAt: string

Erros (envelope: { error: { type, code, message, param? } }):
- 400: parameter_missing, parameter_invalid, account_invalid
- 401: authentication_required
- 403: permission_denied, permission_denied_role
- 404: resource_not_found
- 409: resource_conflict
- 503: service_unavailable

Gere código na linguagem do arquivo atual que:
1. Leia SYNAPSE_API_KEY do ambiente (não fixe o valor no código).
2. Chame o endpoint com requisição e resposta tipadas.
3. Mapeie o envelope de erros para exceções tipadas por código de status.
4. Adicione um teste de caminho feliz usando o token Bearer.
```

```bash curl theme={null}
curl -X PATCH https://scribe-api.telepatia.ai/v1/institutional/accounts/{account_id} \
  -H "Authorization: Bearer $SYNAPSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "doctorSpecialties": [
    "cardiology"
  ],
  "internalCode": "DOC-001",
  "nameFull": "Dr. Juan P\u00e9rez"
}'
```


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