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

# Send the step as a test email

> Sends this email step as a test to `toEmail`, as the app's Send test does: a real email, sent now from one of your email accounts and written for one contact of the campaign, its {Variable} tokens filled and an AI step written live. It can go to any address except one that opted out of your team's email, which is refused with `RECIPIENT_UNSUBSCRIBED`. It is not a send of the campaign: it creates no scheduled send and no lead, writes no open or click tracking and charges no credits, though like any email the account sends it uses one of the account's daily sends. The account is `fromEmail` when you send one; otherwise the first active account among those the step sends from or, when the step names none, your first active account. The contact is `contactId` when you send one, else the first contact of the campaign's first source list. The step is sent as saved, and every call sends another email. Only the token owner's own campaigns resolve: a campaign delegated to you, one shared by your team's visibility settings, and a deleted one all answer 404. Rate limit: this endpoint has its own cap of 10 requests/minute and 100/day per token owner, the same allowance the app's Send test spends, applied inside the shared campaigns bucket of 30 requests/minute and 1,000/day per token owner (shared by every campaign, scheduled-send, campaign-template and knowledge-hub endpoint).

Errors:
- `404` `CAMPAIGN_NOT_FOUND` — No campaign with this id exists, it belongs to another account (including a campaign delegated to you or shared by your team's visibility settings), or it has been deleted.
- `404` `SEQUENCE_STEP_NOT_FOUND` — No step with this id belongs to this campaign.
- `422` `EMAIL_ACCOUNT_NOT_AVAILABLE` — `fromEmail` is not an active, connected email account of yours or one shared with you: it is unknown, someone else's, paused or disconnected. `param` is `fromEmail`.
- `404` `CONTACT_NOT_FOUND` — `contactId` is not a contact on any of the campaign's source lists. `param` is `contactId`.
- `422` `STEP_NOT_AN_EMAIL` — The step is not an email step (a LinkedIn step or a condition, for example), so it has no email to send.
- `422` `NO_ACTIVE_EMAIL_ACCOUNTS` — No account can send the test: you have no active, connected email account, or no `fromEmail` was sent and none of the accounts the step sends from is active (sending `fromEmail` with one of your active accounts then sends from it instead).
- `422` `CAMPAIGN_HAS_NO_LIST` — The campaign has no source list, so there is no contact to fill the step for.
- `422` `CAMPAIGN_LIST_EMPTY` — There is no contact to fill the step for: the campaign's first source list holds none, or no longer exists. A contact from another of its lists can be sent as `contactId`.
- `422` `STEP_CONTENT_EMPTY` — The step came out with no body or no subject: a manual step without them written, or a reply whose thread's first email has no subject to give it.
- `422` `STEP_GENERATION_FAILED` — The email could not be written for this contact: the AI generation failed (for an AI step, or for the subject a reply takes from an AI first email), or the template could not be rendered. Nothing was sent; a retry can succeed.
- `422` `RECIPIENT_UNSUBSCRIBED` — `toEmail` unsubscribed from the sending account's emails, so nothing was sent. `param` is `toEmail`.
- `422` `EMAIL_ACCOUNT_DISCONNECTED` — The sending account is disconnected. Nothing was sent.
- `422` `EMAIL_ACCOUNT_RATE_LIMITED` — The sending account's provider refused the send because the account reached its own sending limit. Nothing was sent; another account, or a later try, can send it.
- `422` `EMAIL_ACCOUNT_REQUIRES_REAUTH` — The sending account's sign-in expired or was revoked; it must be reconnected in the app. Nothing was sent.
- `422` `VALIDATION_FAILED` — campaignId, stepId or contactId is not a 24-character hex id, toEmail is missing, toEmail or fromEmail is not an email address, or the body carries an unknown field.
- `429` `RATE_LIMITED` — Either this endpoint's own cap (10 requests/minute, 100/day for this token owner, shared with the app's Send test) or the shared campaigns bucket (30/minute, 1,000/day, shared by every /business/campaigns, /business/scheduled-sends, /business/campaign-templates and /business/knowledge-hubs call) was exceeded. The RateLimit-* and Retry-After headers describe the bucket that refused.
- `500` `UNEXPECTED_ERROR` — The account's provider failed the send, one of the step's attachments could not be loaded, or another failure; the detail stays in our logs and is never returned.

Requires one of the following token scopes: campaigns.



## OpenAPI

````yaml /openapi.json post /business/campaigns/{campaignId}/steps/{stepId}/send-test
openapi: 3.1.0
info:
  title: Fuse Business API
  version: 1.0.0
  description: >-
    External API for lists, campaigns, prospect search and contacts.
    Authenticate with your API token as HTTP Basic. All paths are under /api/v1.
servers:
  - url: https://api.tryfuse.ai/api/v1
    description: Production
security:
  - basicAuth: []
tags:
  - name: Lists
  - name: Custom columns
  - name: Smart columns
  - name: Exports
  - name: Campaigns
  - name: Knowledge hubs
  - name: Analytics
  - name: Website intent
  - name: LinkedIn
  - name: Conversations
  - name: Account
  - name: Sending accounts
  - name: Data
  - name: Prospect search
  - name: Campaign steps
  - name: Scheduled sends
  - name: Campaign templates
  - name: Tracking domains
  - name: Agents
  - name: Research
  - name: Company search
  - name: Saved searches
  - name: Folders
  - name: Exclusions
  - name: Contacts
paths:
  /business/campaigns/{campaignId}/steps/{stepId}/send-test:
    post:
      tags:
        - Campaign steps
      summary: Send the step as a test email
      description: >-
        Sends this email step as a test to `toEmail`, as the app's Send test
        does: a real email, sent now from one of your email accounts and written
        for one contact of the campaign, its {Variable} tokens filled and an AI
        step written live. It can go to any address except one that opted out of
        your team's email, which is refused with `RECIPIENT_UNSUBSCRIBED`. It is
        not a send of the campaign: it creates no scheduled send and no lead,
        writes no open or click tracking and charges no credits, though like any
        email the account sends it uses one of the account's daily sends. The
        account is `fromEmail` when you send one; otherwise the first active
        account among those the step sends from or, when the step names none,
        your first active account. The contact is `contactId` when you send one,
        else the first contact of the campaign's first source list. The step is
        sent as saved, and every call sends another email. Only the token
        owner's own campaigns resolve: a campaign delegated to you, one shared
        by your team's visibility settings, and a deleted one all answer 404.
        Rate limit: this endpoint has its own cap of 10 requests/minute and
        100/day per token owner, the same allowance the app's Send test spends,
        applied inside the shared campaigns bucket of 30 requests/minute and
        1,000/day per token owner (shared by every campaign, scheduled-send,
        campaign-template and knowledge-hub endpoint).


        Errors:

        - `404` `CAMPAIGN_NOT_FOUND` — No campaign with this id exists, it
        belongs to another account (including a campaign delegated to you or
        shared by your team's visibility settings), or it has been deleted.

        - `404` `SEQUENCE_STEP_NOT_FOUND` — No step with this id belongs to this
        campaign.

        - `422` `EMAIL_ACCOUNT_NOT_AVAILABLE` — `fromEmail` is not an active,
        connected email account of yours or one shared with you: it is unknown,
        someone else's, paused or disconnected. `param` is `fromEmail`.

        - `404` `CONTACT_NOT_FOUND` — `contactId` is not a contact on any of the
        campaign's source lists. `param` is `contactId`.

        - `422` `STEP_NOT_AN_EMAIL` — The step is not an email step (a LinkedIn
        step or a condition, for example), so it has no email to send.

        - `422` `NO_ACTIVE_EMAIL_ACCOUNTS` — No account can send the test: you
        have no active, connected email account, or no `fromEmail` was sent and
        none of the accounts the step sends from is active (sending `fromEmail`
        with one of your active accounts then sends from it instead).

        - `422` `CAMPAIGN_HAS_NO_LIST` — The campaign has no source list, so
        there is no contact to fill the step for.

        - `422` `CAMPAIGN_LIST_EMPTY` — There is no contact to fill the step
        for: the campaign's first source list holds none, or no longer exists. A
        contact from another of its lists can be sent as `contactId`.

        - `422` `STEP_CONTENT_EMPTY` — The step came out with no body or no
        subject: a manual step without them written, or a reply whose thread's
        first email has no subject to give it.

        - `422` `STEP_GENERATION_FAILED` — The email could not be written for
        this contact: the AI generation failed (for an AI step, or for the
        subject a reply takes from an AI first email), or the template could not
        be rendered. Nothing was sent; a retry can succeed.

        - `422` `RECIPIENT_UNSUBSCRIBED` — `toEmail` unsubscribed from the
        sending account's emails, so nothing was sent. `param` is `toEmail`.

        - `422` `EMAIL_ACCOUNT_DISCONNECTED` — The sending account is
        disconnected. Nothing was sent.

        - `422` `EMAIL_ACCOUNT_RATE_LIMITED` — The sending account's provider
        refused the send because the account reached its own sending limit.
        Nothing was sent; another account, or a later try, can send it.

        - `422` `EMAIL_ACCOUNT_REQUIRES_REAUTH` — The sending account's sign-in
        expired or was revoked; it must be reconnected in the app. Nothing was
        sent.

        - `422` `VALIDATION_FAILED` — campaignId, stepId or contactId is not a
        24-character hex id, toEmail is missing, toEmail or fromEmail is not an
        email address, or the body carries an unknown field.

        - `429` `RATE_LIMITED` — Either this endpoint's own cap (10
        requests/minute, 100/day for this token owner, shared with the app's
        Send test) or the shared campaigns bucket (30/minute, 1,000/day, shared
        by every /business/campaigns, /business/scheduled-sends,
        /business/campaign-templates and /business/knowledge-hubs call) was
        exceeded. The RateLimit-* and Retry-After headers describe the bucket
        that refused.

        - `500` `UNEXPECTED_ERROR` — The account's provider failed the send, one
        of the step's attachments could not be loaded, or another failure; the
        detail stays in our logs and is never returned.


        Requires one of the following token scopes: campaigns.
      operationId: sendCampaignStepTestEmail
      parameters:
        - name: campaignId
          in: path
          required: true
          description: >-
            The campaign's id (24-character hex ObjectId), as returned by POST
            /business/campaigns or as the campaignId of a GET
            /business/campaigns row.
          schema:
            type: string
            description: >-
              The campaign's id (24-character hex ObjectId), as returned by POST
              /business/campaigns or as the campaignId of a GET
              /business/campaigns row.
        - name: stepId
          in: path
          required: true
          description: >-
            The sequence step's id, as returned by GET
            /business/campaigns/{campaignId}/steps (24-character hex ObjectId).
          schema:
            type: string
            description: >-
              The sequence step's id, as returned by GET
              /business/campaigns/{campaignId}/steps (24-character hex
              ObjectId).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                toEmail:
                  type: string
                  format: email
                  description: >-
                    The address the test is sent to. Any address: it does not
                    have to be a contact or one of your own.
                fromEmail:
                  type: string
                  format: email
                  description: >-
                    The email account to send from: the `emailAddress` of an
                    active, connected row of GET
                    /business/accounts?channel=email, an account of yours or one
                    shared with you. Omitted: the first active account among
                    those the step sends from or, when the step names none, your
                    first active account.
                contactId:
                  type: string
                  description: >-
                    The contact whose details fill the step's {Variable} tokens
                    and an AI step's writing: a contact on one of the campaign's
                    source lists, as the `id` of a GET
                    /business/lists/{listId}/rows row (24-character hex
                    ObjectId). Omitted: the first contact of the campaign's
                    first source list.
              required:
                - toEmail
      responses:
        '202':
          description: Success
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: Requests permitted in the current window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: Seconds until the current window resets.
          content:
            application/json:
              schema:
                type: object
                properties:
                  sent:
                    type: boolean
                    description: >-
                      Always true: the email was handed to the account's
                      provider.
                  toEmail:
                    type: string
                    description: The address the test was sent to.
                  fromEmail:
                    type: string
                    description: The email account it was sent from.
                  subject:
                    type: string
                    description: The subject it was sent with, its variables filled.
                required:
                  - sent
                  - toEmail
                  - fromEmail
                  - subject
              example:
                sent: true
                toEmail: maya@northwind.io
                fromEmail: alex@northwind.io
                subject: Quick question about BrightPay's finance hiring
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            doc_url:
              type:
                - string
                - 'null'
            request_id:
              type:
                - string
                - 'null'
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Your API token (`af_…`) as the Basic-auth username, with an empty
        password.

````

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