# Omnisend

> Omnisend email and SMS marketing - contacts, events, products, carts, orders and campaigns.

Lets an agent manage your Omnisend store data and marketing - contacts and tags, customer events, products and categories, carts, orders, and email/SMS campaigns.

## What it can do

| Method | What it does |
| --- | --- |
| `omnisend_list_contacts` | List contacts; filter by email, status, segment or tag. |
| `omnisend_get_contact` | Get a contact by id. |
| `omnisend_create_contact` | Create or update a contact from identifiers. |
| `omnisend_update_contact` | Update a contact by id. |
| `omnisend_update_contact_by_email` | Update a contact by email. |
| `omnisend_add_contact_tags` | Batch add tags to contacts. |
| `omnisend_remove_contact_tags` | Batch remove tags from contacts. |
| `omnisend_send_event` | Send a customer event to trigger an automation. |
| `omnisend_list_products` | List products. |
| `omnisend_get_product` | Get a product by id. |
| `omnisend_create_product` | Create a product. |
| `omnisend_replace_product` | Replace a product. |
| `omnisend_delete_product` | Delete a product. |
| `omnisend_list_categories` | List product categories. |
| `omnisend_get_category` | Get a product category by id. |
| `omnisend_create_category` | Create a product category. |
| `omnisend_update_category` | Update a product category. |
| `omnisend_delete_category` | Delete a product category. |
| `omnisend_list_carts` | List carts. |
| `omnisend_get_cart` | Get a cart by id. |
| `omnisend_create_cart` | Create a cart (triggers abandoned-cart automations). |
| `omnisend_replace_cart` | Replace a cart. |
| `omnisend_delete_cart` | Delete a cart. |
| `omnisend_add_cart_product` | Add a product line item to a cart. |
| `omnisend_update_cart_product` | Update a product line item in a cart. |
| `omnisend_delete_cart_product` | Remove a product line item from a cart. |
| `omnisend_list_orders` | List orders created via the API. |
| `omnisend_get_order` | Get an order by id. |
| `omnisend_create_order` | Create an order (triggers order-confirmation automations). |
| `omnisend_replace_order` | Replace an order. |
| `omnisend_update_order_status` | Update an order's payment/fulfillment status. |
| `omnisend_list_campaigns` | List campaigns. |
| `omnisend_get_campaign` | Get a campaign by id. |
| `omnisend_create_campaign` | Create a campaign draft. |
| `omnisend_update_campaign` | Update a campaign draft. |
| `omnisend_delete_campaign` | Delete a campaign. |
| `omnisend_send_campaign` | Send or schedule a campaign. |
| `omnisend_copy_campaign` | Copy a campaign. |
| `omnisend_cancel_campaign` | Cancel a sending or scheduled campaign. |
| `omnisend_get_campaign_utm` | Get a campaign's UTM settings. |
| `omnisend_update_campaign_utm` | Update a campaign's UTM settings. |
| `omnisend_ab_test_winner` | Select an A/B test winner. |
| `omnisend_ab_test_stop` | Stop a running A/B test. |
| `omnisend_ab_test_resume` | Resume a paused A/B test. |
| `omnisend_list_batches` | List bulk-operation batches. |
| `omnisend_get_batch` | Get a batch's status by id. |
| `omnisend_get_batch_items` | Get the items processed by a batch. |
| `omnisend_create_batch` | Create a batch (bulk create/update/delete). |
| `omnisend_list_segments` | List segments (discover segment ids for campaign targeting). |
| `omnisend_get_segment` | Get a segment by id. |
| `omnisend_create_segment` | Create a segment from condition groups. |
| `omnisend_update_segment` | Update a segment's name or condition groups. |
| `omnisend_delete_segment` | Delete a segment. |
| `omnisend_get_segment_statistics` | Get a segment's statistics. |
| `omnisend_list_automations` | List automation workflows. |
| `omnisend_get_automation` | Get an automation by id. |
| `omnisend_create_automation` | Create an automation workflow. |
| `omnisend_update_automation` | Update an automation (disable first). |
| `omnisend_delete_automation` | Delete an automation. |
| `omnisend_enable_automation` | Enable an automation. |
| `omnisend_disable_automation` | Disable an automation. |
| `omnisend_copy_automation` | Copy an automation. |
| `omnisend_get_automation_utm` | Get an automation's aggregated UTM tags. |
| `omnisend_get_automation_block_utm` | Get UTM tags for one automation block. |
| `omnisend_update_automation_block_utm` | Set UTM tags for one automation block. |
| `omnisend_replace_automation_blocks` | Replace an automation's full block tree. |
| `omnisend_list_email_templates` | List email templates (discover template ids). |
| `omnisend_get_email_template` | Get an email template by id. |
| `omnisend_create_email_template` | Create an email template. |
| `omnisend_replace_email_template` | Replace an email template. |
| `omnisend_delete_email_template` | Delete an email template. |
| `omnisend_render_email_template` | Render an email template to HTML. |
| `omnisend_import_email_template` | Import an email template from raw HTML. |
| `omnisend_analytics_report` | Generate an analytics report (grouped by send date). |
| `omnisend_analytics_statistics` | Generate analytics statistics (grouped by event date). |

## How to get credentials

1. Sign in to [Omnisend](https://app.omnisend.com/).
2. Open [Store settings > Integrations & API > API keys](https://app.omnisend.com/#/my-account/integrations/api-keys).
3. Click **Create API key**, name it (e.g. *FlyMyAI Agent*).
4. Copy the generated key - it is sent to the Omnisend API in the `X-API-KEY` header.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `OMNISEND_API_KEY` | Store settings -> Integrations & API -> API keys |

## Links

- [Create an API key](https://app.omnisend.com/#/my-account/integrations/api-keys)
- [API reference](https://api-docs.omnisend.com/)
