Skip to content

feat: add App API content & sender utility methods — snippets, sender identities, messages#244

Merged
mike-engel merged 2 commits into
cdp-6276from
cdp-6277
Jul 15, 2026
Merged

feat: add App API content & sender utility methods — snippets, sender identities, messages#244
mike-engel merged 2 commits into
cdp-6276from
cdp-6277

Conversation

@mike-engel

@mike-engel mike-engel commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Another set of the App API backfill which follows #243 and adds 4 snippet, 3 sender-identity, and 3 message-log methods to APIClient:

Method Endpoint
getSnippets GET /v1/snippets
createSnippet POST /v1/snippets
updateSnippet PUT /v1/snippets (upsert)
deleteSnippet DELETE /v1/snippets/{name} (204)
getSenderIdentities GET /v1/sender_identities
getSenderIdentity GET /v1/sender_identities/{id}
getSenderIdentityUsedBy GET /v1/sender_identities/{id}/used_by
getMessages GET /v1/messages
getMessage GET /v1/messages/{id}
getArchivedMessage GET /v1/messages/{id}/archived_message

Assisted by AI 🤖


Note

Medium Risk
createImport can start bulk profile/data loads from a remote CSV; otherwise changes are additive HTTP wrappers with standard validation and no core transport changes.

Overview
Extends APIClient with another App API backfill slice: snippets (list/create/upsert/delete), sender identities (list, get, used-by), and workspace-wide message lookups (getMessages, getMessage, getArchivedMessage) with typed option objects and the same MissingParamError / buildQueryString patterns as existing methods.

The diff also adds CSV imports (createImport posts { import: … }, getImport), data index batch metadata updates (batchUpdateAttributes, batchUpdateEvents), plus listWorkspaces and getIpAddresses.

docs/app.md documents the new sections (content & sender utilities, imports/data index/workspace info). test/api.ts adds stubbed URL/query/body tests; test/integration/live.ts adds smoke round-trips (optional CIO_TEST_IMPORT_CSV_URL for imports).

Reviewed by Cursor Bugbot for commit 83bc764. Bugbot is set up for automated code reviews on this repo. Configure here.

… identities, messages (CDP-6277)

Batch 13 (stacked on Batch 12). Adds 4 snippet, 3 sender-identity, and 3
message-log methods to APIClient.

Contracts verified against the backend, not the OpenAPI spec:
- Snippets are keyed by name (create + upsert both take { name, value };
  delete is by name in the path; DELETE returns 204).
- Sender identities use integer ids; list supports start/limit/sort/hidden;
  used_by returns campaign + newsletter usage.
- Messages are the workspace-wide delivery log: list supports the full
  filter set (channel, metric, drafts, resource-id scopes, time window,
  associations, tracked responses); a single message id is a delivery id
  string, with optional archived_message/associations expansions plus a
  dedicated archived_message endpoint.

Includes unit tests (100% coverage), live round-trip/read coverage, and docs.
@mike-engel mike-engel changed the title feat: add App API content & sender utility methods — snippets, sender identities, messages (CDP-6277) feat: add App API content & sender utility methods — snippets, sender identities, messages Jul 15, 2026
@mike-engel mike-engel self-assigned this Jul 15, 2026
@mike-engel
mike-engel merged commit d4b9893 into cdp-6276 Jul 15, 2026
10 checks passed
@mike-engel
mike-engel deleted the cdp-6277 branch July 15, 2026 13:09
@mike-engel mike-engel mentioned this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants