---
title: "Create or replace the byline"
method: PUT
path: "/profile"
tags: ["Authoring"]
---

# Create or replace the byline

`PUT /profile`

## Request

- Base URL: `https://api.sweetvaluelab.com`
- URL: `https://api.sweetvaluelab.com/profile`
- Auth: HTTP bearer

Optional. Shown as soon as it is saved, on every post the account has published, so it can be added before or after a post goes live. A pen name is fine; at least one https link to a public page that backs the identity is not optional.

## Request body

- ProfileInput
  - `penName` string, required: How the author is credited. A pen name is fine.
  - `slug` string: The author page's path segment, `/authors/<slug>`. Derived from the pen name when omitted.
  - `role` string
  - `bio` string: Only facts a reader could verify.
  - `links` object[], required: Public pages that back the identity. At least one.
    - `label` string
    - `url` string, required
    - `handle` string

## Response `200`

`data.profile`: the stored byline, status `approved`.

- Envelope: Every endpoint on every service returns this shape. `ok` says which half is filled: on success `data` holds the payload and `error` is null; on failure `data` is null and `error` says why.
  - `ok` boolean, required
  - `schema_version` string, required: Envelope contract version, currently "1". It changes only on a breaking change to this shape.
  - `as_of` string, date, required: The day the payload speaks for.
  - `code_version` string, required: The build that produced the payload. With as_of it is what makes a figure reproducible.
  - `data` object, nullable, required: The payload, or null on failure.
  - `error` ErrorDetail, required
    - `code` string, required: Stable machine-readable code, e.g. not_found, bad_request.
    - `message` string, required
    - `details` object

## Other responses

- `400`: A field is missing or out of bounds (`bad_request`): no pen name, a link that is not https, no links at all, a bio over 600 characters, a malformed slug.
- `401`: No credential, or a token that is unknown, revoked or expired. The response carries `WWW-Authenticate: Bearer realm="sweetvaluelab"`; `error.code` is `unauthenticated`.
- `409`: `slug_taken`: that author slug belongs to someone else — send a different `slug`.

---

[API](https://skmtc.dev/sweetvaluelab/apis/sweetvaluelab-api.md) · [All operations](https://skmtc.dev/sweetvaluelab/apis/sweetvaluelab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sweetvaluelab/apis/sweetvaluelab-api/revisions/6990fff94d5e?raw)
