> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Outreach: Create Mailing

> Create an email in Outreach to send to a prospect from one of your mailboxes. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Create an email in Outreach to send to a prospect from one of your mailboxes.

> [!NOTE]
>
> Tool ID: `outreach_create_mailing`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'outreach_create_mailing',
  {
    "data": {
      "type": "mailing"
    }
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute outreach_create_mailing --input '{
  "data": {
    "type": "mailing"
  }
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": {
      "attributes": {
        "bodyHtml": "example",
        "bodyText": "example",
        "bouncedAt": "2026-01-15T12:00:00Z"
      },
      "id": 123,
      "relationships": {
        "attachments": {
          "links": {}
        },
        "bccEntitiesId": "bcc_entities_123",
        "calendar": {
          "data": {},
          "links": {}
        }
      }
    }
  }
}
```

Use `deepline describe outreach_create_mailing --json` for the latest machine-readable contract.

## Input reference

Create a New Mailing

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.data` | `object` | Yes | — | — |
| `payload.include` | `string` | No | — | Comma-separated related resources to include. |
| `payload.fields` | `object` | No | — | Sparse fieldsets keyed by JSON:API resource type, sent as fields\[resource]. |

> [!NOTE]
>
> This input schema is too large for an inline display. Read the complete live contract with `deepline describe outreach_create_mailing --json`.

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `object` | No | — | — |
| `result.data.data.attributes` | `object` | No | — | A representation of a platform-related email. |
| `result.data.data.attributes.bodyHtml` | `string \| null` | No | — | The mailing's custom email body, represented in HTML. If provided this field will override any associated template. |
| `result.data.data.attributes.bodyText` | `string \| null` | No | — | The plain-text representation of the 'bodyHTML' field. |
| `result.data.data.attributes.bouncedAt` | `string \| null` | No | — | The date and time the email was bounced. Format: `date-time`. |
| `result.data.data.attributes.clickCount` | `integer \| null` | No | — | The total number of times links within the email were clicked (if the message is tracking links). |
| `result.data.data.attributes.clickedAt` | `string \| null` | No | — | The most recent date and time a link was clicked (if the message is tracking links). Format: `date-time`. |
| `result.data.data.attributes.createdAt` | `string \| null` | No | — | The date and time the mailing was created. Format: `date-time`. |
| `result.data.data.attributes.deliveredAt` | `string \| null` | No | — | The date and time the email was delivered. Format: `date-time`. |
| `result.data.data.attributes.errorBacktrace` | `string \| null` | No | — | Technical details explaining the mailing's error. |
| `result.data.data.attributes.errorReason` | `string \| null` | No | — | A summary explaining the mailing's error. Maximum length: 255. |
| `result.data.data.attributes.followUpTaskScheduledAt` | `string \| null` | No | — | The date and time of when a follow-up task should be due for this mailing. Format: `date-time`. |
| `result.data.data.attributes.followUpTaskType` | `string \| null` | No | — | The type of follow-up task to create. Possible values are 'follow\_up' or 'no\_reply'. Maximum length: 255. |
| `result.data.data.attributes.mailboxAddress` | `string \| null` | No | — | The email address the mailing was sent from. |
| `result.data.data.attributes.mailingType` | `string \| null` | No | — | A description of the type of the emailing (e.g. "sequence", "single", "campaign"). Maximum length: 255. |
| `result.data.data.attributes.markedAsSpamAt` | `string \| null` | No | — | The date and time the email was marked as spam. Format: `date-time`. |
| `result.data.data.attributes.messageId` | `string \| null` | No | — | The MIME content Message-ID of the delivered message. Maximum length: 255. |
| `result.data.data.attributes.notifyThreadCondition` | `string \| null` | No | — | The condition of when to bump this mailing to the top of the user's inbox. Possible values are 'always' or 'no\_reply'. Maximum length: 255. |
| `result.data.data.attributes.notifyThreadScheduledAt` | `string \| null` | No | — | The date and time of when this mailing should be bumped to the top of the user's inbox. Format: `date-time`. |
| `result.data.data.attributes.notifyThreadStatus` | `string \| null` | No | — | The status of the bump. Possible values are 'pending', 'sent' or 'skipped'. Maximum length: 255. |
| `result.data.data.attributes.openCount` | `integer \| null` | No | — | The total number of times the email was opened (if the message is tracking opens). |
| `result.data.data.attributes.openedAt` | `string \| null` | No | — | The most recent date and time the email was opened (if the message is tracking opens). Format: `date-time`. |
| `result.data.data.attributes.overrideSafetySettings` | `boolean \| null` | No | — | A boolean value whether users can override submission if template variables have not all been replaced. |
| `result.data.data.attributes.references` | `array \| null` | No | — | A list of references for the mailing taken from the email header. |
| `result.data.data.attributes.repliedAt` | `string \| null` | No | — | The date and time the email was replied to. Format: `date-time`. |
| `result.data.data.attributes.retryAt` | `string \| null` | No | — | The date and time the email will rety to send. Format: `date-time`. |
| `result.data.data.attributes.retryCount` | `integer \| null` | No | — | The number of times the email has been retried to send. |
| `result.data.data.attributes.retryInterval` | `integer \| null` | No | — | The amount of time in seconds between retry attempts. |
| `result.data.data.attributes.scheduledAt` | `string \| null` | No | — | The date and time the email is scheduled to send. Format: `date-time`. |
| `result.data.data.attributes.state` | `string \| null` | No | — | The current state of the mailing. Can be 'bounced', 'delivered', 'delivering', 'drafted', 'failed', 'opened', 'placeholder', 'queued', 'replied', or 'scheduled'. Maximum length: 255. |
| `result.data.data.attributes.stateChangedAt` | `string \| null` | No | — | The date and time the state last changed. Format: `date-time`. |
| `result.data.data.attributes.subject` | `string \| null` | No | — | The subject line of the email. |
| `result.data.data.attributes.trackLinks` | `boolean \| null` | No | — | A boolean value whether the mailing is tracking link clicks. |
| `result.data.data.attributes.trackOpens` | `boolean \| null` | No | — | A boolean value whether the mailing is tracking email opens. |
| `result.data.data.attributes.unsubscribedAt` | `string \| null` | No | — | The date and time the recepient unsubscribed from the mailing's sequence. Format: `date-time`. |
| `result.data.data.attributes.updatedAt` | `string \| null` | No | — | The date and time the mailing was last updated. Format: `date-time`. |
| `result.data.data.id` | `integer` | No | — | — |
| `result.data.data.relationships` | `object` | No | — | — |
| `result.data.data.relationships.attachments` | `object` | No | — | All attachments attached to this mailing. |
| `result.data.data.relationships.attachments.data` | `array` | No | — | — |
| `result.data.data.relationships.attachments.data[].id` | `integer` | No | — | — |
| `result.data.data.relationships.attachments.data[].type` | `"attachment"` | No | — | Allowed: `attachment`. |
| `result.data.data.relationships.attachments.links` | `object` | No | — | — |
| `result.data.data.relationships.attachments.links.related` | `string` | No | — | Format: `uri`. |
| `result.data.data.relationships.bccEntitiesId` | `unknown` | No | — | — |
| `result.data.data.relationships.calendar` | `object` | No | — | The calendar associated with any event invites contained in this mailing. |
| `result.data.data.relationships.calendar.data` | `object \| null` | No | — | — |
| `result.data.data.relationships.calendar.data.id` | `integer` | No | — | — |
| `result.data.data.relationships.calendar.data.type` | `"calendar"` | No | — | Allowed: `calendar`. |

The table shows the first 50 fields. Use the live contract below for every field.

> [!NOTE]
>
> This output schema is too large for an inline display. Read the complete live contract with `deepline describe outreach_create_mailing --json`.

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Outreach provider guide](https://deepline.com/docs/providers/outreach/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.