---
title: "Submit Portal Credentials"
method: POST
path: "/tenants/portal-credentials"
tags: ["authenticated", "service-titan-tenant"]
---

# Submit Portal Credentials

`POST /tenants/portal-credentials`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/tenants/portal-credentials`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Store the portal login for the caller's own connected tenant and test it.

The tenant is the organization's, never the client's. The values go straight to
service-titan-service, which merges them into the tenant's existing secret and
runs the login; nothing here logs, stores or echoes them.

## Headers

- `organization-id` string, nullable
- `x-user-id` string, nullable
- `timezone` string
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Request body

- PortalCredentialsRequest: The go.servicetitan.com login for the dedicated UpSmith seat. ``SecretStr`` keeps the values out of every repr, so a frame-locals dump or a logged model never shows them.
  - `username` string, password, required
  - `password` string, password, required
  - `totp_seed` string, password, required

## Response `200`

Successful Response

- ServiceTitanPortalCredentialsStatus: Response from customer-facing ``POST /tenants/portal-credentials``. Status only. The submitted values live in the tenant's secret and are never returned; ``error`` is the test-login outcome the customer can act on.
  - `configured` boolean, required
  - `working` boolean, required
  - `error` string, nullable
  - `last_validated_at` string, nullable
  - `outcome` 'working' | 'rejected' | 'untested', nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/upsmith/apis/upsmith-api.md) - [All operations](https://skmtc.dev/upsmith/apis/upsmith-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upsmith/apis/upsmith-api/revisions/86e2c2bd93af?raw)
