Update Story ExternalId
PUT /api/app/story/{id}/externalId
- Authorization: Bearer token with
systemadmin role.
- Query parameters:
tenantId (GUID) is required when calling from host scope; current-tenant calls omit it.
- Request body (
application/json): {"externalId": "ext-123"}. Set externalId to null to clear; whitespace-only values are rejected.
Example
curl -X PUT \
"https://cmsapi.localhost/api/app/story/11111111-1111-1111-1111-111111111111/externalId?tenantId=22222222-2222-2222-2222-222222222222" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "externalId": "game-2026-nyk-bos" }'
Success Response
{
"id": "11111111-1111-1111-1111-111111111111",
"title": "Knicks vs Celtics Recap",
"externalId": "game-2026-nyk-bos",
"status": "Published",
"tenantId": "22222222-2222-2222-2222-222222222222",
"...": "other AdminStoryDto fields"
}
Error Responses
400 Bad Request when externalId duplicates another story in the tenant or is whitespace-only, or when tenantId is missing for host calls.
403 Forbidden when the caller is not a systemadmin.