> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/internal/extensions/marketing-automation/cm.com-connection.md).

# CM.com connection

## GET /api/{tenantId}/admin/extensions/cmcom

> Get the CM.com connection

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"CmCom"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.cmcom.settings:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"CmComSettingsResponse":{"required":["account","channels"],"type":"object","properties":{"account":{"type":"string","description":"Name of the CM.com account the tenant uses."},"channels":{"type":"array","items":{"description":"A channel of the CM.com account that the tenant sends from.","$ref":"#/components/schemas/CmComTenantChannel"},"description":"The channels the tenant sends from; empty until chosen."}},"additionalProperties":false,"description":"The tenant's CM.com connection."},"CmComTenantChannel":{"required":["channelId","type"],"type":"object","properties":{"type":{"minLength":1,"pattern":"^[A-Za-z]{1,32}$","type":"string","description":"The channel type as the account's channel list names it, e.g. `rcs` or `whatsApp`."},"channelId":{"maxLength":100,"minLength":1,"type":"string","description":"The `channelID` of the channel in the account's channel list."},"name":{"maxLength":100,"minLength":0,"type":["null","string"],"description":"A name for the channel, at most 100 characters. Omitted or blank leaves it unnamed."}},"additionalProperties":false,"description":"A channel of the CM.com account that the tenant sends from."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/cmcom":{"get":{"tags":["CmCom"],"summary":"Get the CM.com connection","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Connection returned.","content":{"text/plain":{"schema":{"description":"The tenant's CM.com connection.","$ref":"#/components/schemas/CmComSettingsResponse"}},"application/json":{"schema":{"description":"The tenant's CM.com connection.","$ref":"#/components/schemas/CmComSettingsResponse"}},"text/json":{"schema":{"description":"The tenant's CM.com connection.","$ref":"#/components/schemas/CmComSettingsResponse"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the `tenant.cmcom.settings:read` scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"CM.com is not configured for this tenant.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Set the CM.com connection (global administrators only)

> Replaces the account and the channels. The account must be one the platform holds; it serves several tenants,\
> so only a global administrator can bind a tenant to it and list its channels to pick them.

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"CmCom"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}}},"schemas":{"PutCmComSettingsRequest":{"required":["account"],"type":"object","properties":{"account":{"minLength":1,"pattern":"^[a-z0-9-]{1,64}$","type":"string","description":"Name of the CM.com account the platform holds, lowercase letters, digits and dashes."},"channels":{"type":"array","items":{"description":"A channel of the CM.com account that the tenant sends from.","$ref":"#/components/schemas/CmComTenantChannel"},"description":"The channels the tenant sends from, at most 20, each listed once. Omitted or empty clears them."}},"additionalProperties":false,"description":"Request body to set the tenant's CM.com connection."},"CmComTenantChannel":{"required":["channelId","type"],"type":"object","properties":{"type":{"minLength":1,"pattern":"^[A-Za-z]{1,32}$","type":"string","description":"The channel type as the account's channel list names it, e.g. `rcs` or `whatsApp`."},"channelId":{"maxLength":100,"minLength":1,"type":"string","description":"The `channelID` of the channel in the account's channel list."},"name":{"maxLength":100,"minLength":0,"type":["null","string"],"description":"A name for the channel, at most 100 characters. Omitted or blank leaves it unnamed."}},"additionalProperties":false,"description":"A channel of the CM.com account that the tenant sends from."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/cmcom":{"put":{"tags":["CmCom"],"summary":"Set the CM.com connection (global administrators only)","description":"Replaces the account and the channels. The account must be one the platform holds; it serves several tenants,\nso only a global administrator can bind a tenant to it and list its channels to pick them.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Request body to set the tenant's CM.com connection.","$ref":"#/components/schemas/PutCmComSettingsRequest"}},"text/json":{"schema":{"description":"Request body to set the tenant's CM.com connection.","$ref":"#/components/schemas/PutCmComSettingsRequest"}},"application/*+json":{"schema":{"description":"Request body to set the tenant's CM.com connection.","$ref":"#/components/schemas/PutCmComSettingsRequest"}}},"required":true},"responses":{"204":{"description":"Connection saved."},"400":{"description":"The account is not one the platform holds, a channel has no type or id, there are over 20 channels, or a channel is listed twice.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller does not hold the required role.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"The tenant does not exist, or the endpoint is not available to it.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## List the channels of the CM.com account (global administrators only)

> Every channel of the account the tenant is set to use, so the right \`channelId\` can be copied. The\
> account serves several tenants: other tenants' administrators cannot call this.

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"CmCom"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}}},"schemas":{"CmComChannelResponse":{"required":["channelId","countries","isPending","type"],"type":"object","properties":{"type":{"type":"string","description":"The channel type as CM.com groups them, e.g. `rcs`."},"channelId":{"type":"string","description":"The value to store as the tenant's channel."},"name":{"type":["null","string"],"description":"The channel's name in CM.com; null when CM.com gives none (only RCS agents carry one today)."},"countries":{"type":"array","items":{"type":"string"},"description":"The countries the channel is live in, as CM.com reports them; empty when it reports none."},"isPending":{"type":"boolean","description":"Whether the channel is still being set up."},"stage":{"type":["null","string"],"description":"The last step CM.com reports for the channel, e.g. `active`; null when it reports none."},"createdOn":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"When the channel was requested, UTC. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."}},"additionalProperties":false,"description":"A channel of the CM.com account."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/cmcom/channels":{"get":{"tags":["CmCom"],"summary":"List the channels of the CM.com account (global administrators only)","description":"Every channel of the account the tenant is set to use, so the right `channelId` can be copied. The\naccount serves several tenants: other tenants' administrators cannot call this.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Channels returned.","content":{"text/plain":{"schema":{"type":"array","items":{"description":"A channel of the CM.com account.","$ref":"#/components/schemas/CmComChannelResponse"}}},"application/json":{"schema":{"type":"array","items":{"description":"A channel of the CM.com account.","$ref":"#/components/schemas/CmComChannelResponse"}}},"text/json":{"schema":{"type":"array","items":{"description":"A channel of the CM.com account.","$ref":"#/components/schemas/CmComChannelResponse"}}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller does not hold the required role.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"CM.com is not configured for this tenant, or the platform holds no account of that name.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"502":{"description":"CM.com did not answer the request."}}}}}}
```

## List the messages sent over the tenant's channels

> The account's CM.com messages (campaigns) sent over any of the tenant's channels, newest first.

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"CmCom"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.cmcom.sync:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"CmComMessageResponse":{"required":["id","name","status"],"type":"object","properties":{"id":{"type":"string","description":"CM.com's identifier of the message."},"name":{"type":"string","description":"The name given in CM.com."},"status":{"type":"string","description":"CM.com's status, e.g. `draft` or `sent`."},"createdOn":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"When it was created in CM.com, UTC. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."},"scheduledOn":{"oneOf":[{"type":"string","format":"date-time"},{"type":"integer","format":"int64"}],"description":"When it is or was scheduled to start, UTC; null for a draft. Accepts ISO 8601 date-time string or Unix epoch seconds in request inputs. Responses are serialized as ISO 8601 date-time strings."},"recipients":{"type":["null","integer"],"description":"How many recipients CM.com reports; null when it reports none yet.","format":"int64"},"linkFieldId":{"type":["null","integer"],"description":"The address-book field whose value is the link of the message's button; null when no button opens a field,\nin which case the message's deliveries cannot be synchronized.","format":"int32"}},"additionalProperties":false,"description":"A message sent over one of the tenant's channels: what CM.com calls a campaign."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/cmcom/messages":{"get":{"tags":["CmCom"],"summary":"List the messages sent over the tenant's channels","description":"The account's CM.com messages (campaigns) sent over any of the tenant's channels, newest first.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Messages returned.","content":{"text/plain":{"schema":{"type":"array","items":{"description":"A message sent over one of the tenant's channels: what CM.com calls a campaign.","$ref":"#/components/schemas/CmComMessageResponse"}}},"application/json":{"schema":{"type":"array","items":{"description":"A message sent over one of the tenant's channels: what CM.com calls a campaign.","$ref":"#/components/schemas/CmComMessageResponse"}}},"text/json":{"schema":{"type":"array","items":{"description":"A message sent over one of the tenant's channels: what CM.com calls a campaign.","$ref":"#/components/schemas/CmComMessageResponse"}}}}},"400":{"description":"The tenant has not chosen a channel yet.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the `tenant.cmcom.sync:read` scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"CM.com is not configured for this tenant, or the platform holds no account of that name.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"502":{"description":"CM.com did not answer the request."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/api-reference/internal/extensions/marketing-automation/cm.com-connection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
