# Send Analytics Publication

Send a publication right now, outside its schedule. It reaches every recipient, outside addresses included, and cannot be taken back. A second call in the same minute is refused, so a retry never sends twice. Follow the send with List Analytics Publication Runs.

`POST https://connect.mindcloud.co/v2/analytics/pages/:pageId/publications/:publicationId/send`

Permissions: `analytics:page:create`.

## Parameters

### Path

- `pageId` (string, required): The page id, from List Analytics Pages.
- `publicationId` (string, required): The publication id, from List Analytics Publications.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

## Example request

```bash
curl --request POST \
  --url 'https://connect.mindcloud.co/v2/analytics/pages/Pq7Lm2Xc9RtA/publications/Pb5Ty3Ws7KdM/send' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

## Response fields

- `id` (string): The send's id.
- `publicationId` (string): The publication it sent, from List Analytics Publications.
- `pageId` (string): The page it sent, from List Analytics Pages.
- `isManual` (boolean): True for a Send now, false for a scheduled send.
- `status` (string): How it went.
  Allowed values:
    - `claimed`: Starting.
    - `sending`: Being delivered.
    - `sent`: Delivered.
    - `failed`: Could not be delivered; errorCode and errorMessage say why.
    - `missed`: Its scheduled time passed without a send.
- `statusOn` (date): When it reached its status.
- `recipientCount` (number): How many members it went to. Null before it is delivered.
- `externalRecipientCount` (number): How many outside addresses it went to. Null before it is delivered or with none.
- `errorCode` (string): Why it failed. Null unless it failed.
- `errorMessage` (string): What went wrong, in words. Null unless it failed.
- `createdOn` (date): When it started.
