# Uscreen

> Run your Uscreen video membership: invite and update customers, grant and revoke access, start and cancel subscriptions, manage groups, read invoices, offers and video views, and publish content.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/uscreen

## Actions

### Add group member

Add someone to a group by email, as a member or a manager. Someone new to the store becomes a customer.

**Inputs**

- Group (`group_id`, text, required): The group. Pick one, or give its id from an earlier step.
- Email (`email`, text, required): The member's email address.
- Name (`name`, text, required): The member's full name.
- Role (`role`, text): Member, or manager, who can manage the group. Defaults to member. One of: `member` (Member (default)), `manager`.
- Skip automations (`skip_automations`, true/false): Turn on so this doesn't start the store's Uscreen automations (such as welcome emails) that it otherwise would.

**Outputs**

- `member` (object): The member

**Example output**

```json
{
  "member": {
    "email": "john.doe@example.com",
    "id": 124,
    "joined_on": 1720186565,
    "name": "John Doe",
    "role": "member"
  }
}
```

### Cancel subscription

Cancel a customer's active subscription. Subscriptions bought in the Apple, Google, Roku or Amazon app stores can't be canceled here.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.

**Outputs**

- `canceled` (true/false): False when there was no active subscription
- `subscription` (object): The canceled subscription, empty if none

**Example output**

```json
{
  "canceled": true,
  "subscription": {
    "canceled_at": 1720190000,
    "cover_fees": false,
    "covered_fees": null,
    "created_at": 1720186565,
    "currency": "USD",
    "duration": 30,
    "id": 790,
    "origin": "assigned_from_publisher_api",
    "pauses_at": null,
    "perform_action_at": 1722778565,
    "platform": "web",
    "price": 1500,
    "product_id": 456,
    "product_type": "recurring",
    "resumes_at": null,
    "trial": false,
    "trial_period": 0,
    "with_manual_billing": true
  }
}
```

### Create customer

Add a customer to the store. Uscreen emails them an invite unless told not to; it gives no access until you grant some.

**Inputs**

- Name (`name`, text, required): The customer's full name.
- Email (`email`, text, required): The customer's email address. It must not be in use already.
- Password (`password`, text): At least 8 characters. Leave empty and Uscreen makes one; the invite email lets them set their own.
- Don't send the invite email (`skip_invite`, true/false): Turn on to add the customer without Uscreen emailing them an invite.
- News and updates emails (`opted_in_for_news_and_updates`, text): Whether the customer gets news and updates emails. Leave empty for opted in. One of: `yes` (Opted in), `no` (Opted out).
- Community updates emails (`opted_in_for_community_updates`, text): Whether the customer gets community updates emails. Leave empty for opted in. One of: `yes` (Opted in), `no` (Opted out).
- Tags (`tags`, list): Up to 25 tags, lowercase letters, digits and dashes only, such as annual-member.
- External ID (`legacy_id`, text): Your own id for the customer in another system.
- Stripe customer ID (`payment_user_id`, text): The customer's Stripe customer ID, such as cus_QPjOM8A4KUf7H0, to match an existing Stripe customer.
- Custom field 1 (`field_1`, text): The value of the store's custom sign-up field 1, if it has one.
- Custom field 2 (`field_2`, text): The value of the store's custom sign-up field 2, if it has one.
- Custom field 3 (`field_3`, text): The value of the store's custom sign-up field 3, if it has one.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "avatar_url": "",
    "created_at": 1720186565,
    "custom_fields": {},
    "email": "jo@example.com",
    "id": 123,
    "legacy_id": null,
    "name": "Jo Bloggs",
    "opted_in_for_community_updates": true,
    "opted_in_for_news_and_updates": true,
    "origin": "publisher_api",
    "referrer": "",
    "subscribed_topic_ids": [
      12
    ],
    "subscriber": false,
    "tags": [
      "annual-member"
    ],
    "utm_params": {
      "utm_campaign": "",
      "utm_content": "",
      "utm_medium": "",
      "utm_source": "",
      "utm_term": ""
    }
  }
}
```

### Create group

Create a group on a subscription plan, so its members share it, with an optional limit on seats.

**Inputs**

- Name (`name`, text, required): The group's name.
- Billing email (`billing_email`, text, required): The email address the group is billed to.
- Subscription plan (`plan_id`, text, required): The subscription plan. Pick one, or give its offer id.
- Seats (`number_of_seats`, number): How many members it can have. Leave empty for no limit. At least 1.

**Outputs**

- `group` (object): The new group

**Example output**

```json
{
  "group": {
    "billing_email": "billing@example.org",
    "created_at": 1720186565,
    "id": 2333,
    "name": "Team Subscription",
    "number_of_seats": 15,
    "perform_action_at": 1722778565,
    "plan_id": 74,
    "plan_title": "Monthly",
    "status": "active",
    "updated_at": 1720186565,
    "used_seats": 3
  }
}
```

### Create sign-in link

Make a one-time link that signs a customer straight into the store, with no password (single sign-on).

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.

**Outputs**

- `url` (text): The one-time link

**Example output**

```json
{
  "url": "https://example.uscreen.io/sso?token=abc123"
}
```

### Delete group

Delete a group.

**Inputs**

- Group (`group_id`, text, required): The group. Pick one, or give its id from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `group_id` (text): The group deleted

**Example output**

```json
{
  "deleted": true,
  "group_id": "2333"
}
```

### Get content

Get one video, collection or live event with its release stage, prices, categories, tags and author.

**Inputs**

- Content (`content_id`, text, required): The video, collection or live event. Pick one, or give its id from an earlier step.

**Outputs**

- `content` (object): The content

**Example output**

```json
{
  "content": {
    "author": {
      "description": "",
      "id": 10,
      "image": "",
      "permalink": "sam-lee",
      "title": "Sam Lee"
    },
    "categories": [
      {
        "id": 5,
        "legacy_id": null,
        "permalink": "yoga",
        "public": true,
        "title": "Yoga"
      }
    ],
    "content_type": "video",
    "created_at": 1720186565,
    "description": "<p>A gentle start.</p>",
    "downloadable": false,
    "duration": 1800,
    "event_launch_date": null,
    "event_state": null,
    "free": false,
    "id": 247,
    "legacy_id": null,
    "main_poster_url": "",
    "part_of_subscription": true,
    "permalink": "morning-yoga",
    "price_cents": 1500,
    "published_at": 1720186565,
    "release_at": null,
    "release_stage": "published",
    "rental_period": null,
    "rental_price_cents": null,
    "secondary_poster_url": "",
    "short_description": "A gentle start.",
    "square_poster_url": "",
    "tags": [
      "yoga"
    ],
    "title": "Morning yoga",
    "video_count": null
  }
}
```

### Get customer

Get one customer by id or email: name, tags, opt-ins, sign-up source and whether they have an active subscription.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "avatar_url": "",
    "created_at": 1720186565,
    "custom_fields": {},
    "email": "jo@example.com",
    "id": 123,
    "legacy_id": null,
    "name": "Jo Bloggs",
    "opted_in_for_community_updates": true,
    "opted_in_for_news_and_updates": true,
    "origin": "publisher_api",
    "referrer": "",
    "subscribed_topic_ids": [
      12
    ],
    "subscriber": false,
    "tags": [
      "annual-member"
    ],
    "utm_params": {
      "utm_campaign": "",
      "utm_content": "",
      "utm_medium": "",
      "utm_source": "",
      "utm_term": ""
    }
  }
}
```

### Get customer subscription

Get a customer's active subscription: plan, price, next billing date, trial and pause. Says so when they have none.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.

**Outputs**

- `has_subscription` (true/false): False when the customer has no active subscription
- `subscription` (object): The subscription, empty when there is none

**Example output**

```json
{
  "has_subscription": true,
  "subscription": {
    "canceled_at": null,
    "cover_fees": false,
    "covered_fees": null,
    "created_at": 1720186565,
    "currency": "USD",
    "duration": 30,
    "id": 790,
    "origin": "assigned_from_publisher_api",
    "pauses_at": null,
    "perform_action_at": 1722778565,
    "platform": "web",
    "price": 1500,
    "product_id": 456,
    "product_type": "recurring",
    "resumes_at": null,
    "trial": false,
    "trial_period": 0,
    "with_manual_billing": true
  }
}
```

### Get invoice

Get one invoice with its amounts (in cents), discount, taxes, status and the customer's id.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or a trigger.

**Outputs**

- `invoice` (object): The invoice

**Example output**

```json
{
  "invoice": {
    "amount": 1500,
    "coupon": null,
    "created_at": 1720186565,
    "currency": "USD",
    "discount": 0,
    "gift_amount": 0,
    "id": 198,
    "localized_amount": 1500,
    "localized_currency": "USD",
    "localized_discount": 0,
    "localized_gift_amount": 0,
    "localized_original_price": 1500,
    "origin": "stripe",
    "original_price": 1500,
    "paid_at": 1720186565,
    "product_id": 443,
    "product_type": "recurring",
    "status": "paid",
    "taxes": [
      {
        "amount": 128,
        "country_code": "US",
        "description": "",
        "display_name": "Sales Tax",
        "inclusive": false,
        "jurisdiction": "California",
        "percentage": 8.5,
        "state": "CA",
        "tax_type": "sales_tax"
      }
    ],
    "trial": false,
    "updated_at": 1720186565,
    "user_id": 123
  }
}
```

### Get total watch time

Add up the time spent watching, for one customer, one piece of content or both, over the last 12 months or a shorter period.

**Inputs**

- Customer (`customer`, text): Only this customer's views, by id or email address.
- Content (`content_id`, text): Only views of this video, collection or live event.
- From (`from_time`, date and time): Start of the period, within the last 12 months. Defaults to 12 months ago.
- To (`to_time`, date and time): End of the period. Defaults to now.

**Outputs**

- `hours` (number): The same, in hours
- `total_watch_time` (number): Seconds watched

**Example output**

```json
{
  "hours": 1.5,
  "total_watch_time": 5400
}
```

### Grant access

Give a customer access to an offer (a subscription, bundle, rental or free offer) or to a single video or collection, without charging them.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.
- Offer (`product_id`, text, required): The offer to give access to. Pick one, or give its id; for a single video or collection, give the content's id and choose its product type.
- Product type (`product_type`, text): What kind of product it is. Leave empty to have it read from the offer. One of: `recurring` (Subscription), `fixed_price` (One-time purchase or bundle), `rent` (Rental), `freebie` (Free offer), `program` (Single video or collection).
- Access until or next renewal (`access_until`, date and time): For a rental, when access ends; for a subscription, its next billing date. Leave empty for Uscreen's own.
- Billed outside Uscreen (`with_manual_billing`, true/false): Turn on if you charge the customer yourself, so Uscreen never bills them. Leave the date empty then.
- Skip automations (`skip_automations`, true/false): Turn on so this doesn't start the store's Uscreen automations (such as welcome emails) that it otherwise would.

**Outputs**

- `access` (object): The access granted

**Example output**

```json
{
  "access": {
    "canceled_at": null,
    "created_at": 1720186565,
    "id": 789,
    "origin": "assigned_from_publisher_api",
    "perform_action_at": 1720187272,
    "product_id": 456,
    "product_type": "freebie",
    "with_manual_billing": false
  }
}
```

### List content

List videos, collections and live events with their release stage, prices, categories and author. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Type (`content_type`, text): Only videos, collections or live events. Leave empty for all. One of: `video` (Videos), `collection` (Collections), `live_event` (Live events).
- From (`from_time`, date and time): Only content created on or after this time.
- To (`to_time`, date and time): Only content created on or before this time.
- Page (`page`, number): Which page to get, from 1. Use the 'next_page' an earlier run gave. At least 1.

**Outputs**

- `contents` (list): The content
- `count` (number): How many on this page
- `next_page` (number): Pass as 'Page' for the next page; 0 on the last one
- `page` (number): The page read
- `total_count` (text): How many match in all, as Uscreen counts them

**Example output**

```json
{
  "contents": [
    {
      "author": {
        "description": "",
        "id": 10,
        "image": "",
        "permalink": "sam-lee",
        "title": "Sam Lee"
      },
      "categories": [
        {
          "id": 5,
          "legacy_id": null,
          "permalink": "yoga",
          "public": true,
          "title": "Yoga"
        }
      ],
      "content_type": "video",
      "created_at": 1720186565,
      "description": "<p>A gentle start.</p>",
      "downloadable": false,
      "duration": 1800,
      "event_launch_date": null,
      "event_state": null,
      "free": false,
      "id": 247,
      "legacy_id": null,
      "main_poster_url": "",
      "part_of_subscription": true,
      "permalink": "morning-yoga",
      "price_cents": 1500,
      "published_at": 1720186565,
      "release_at": null,
      "release_stage": "published",
      "rental_period": null,
      "rental_price_cents": null,
      "secondary_poster_url": "",
      "short_description": "A gentle start.",
      "square_poster_url": "",
      "tags": [
        "yoga"
      ],
      "title": "Morning yoga",
      "video_count": null
    }
  ],
  "count": 1,
  "next_page": 0,
  "page": 1,
  "total_count": "1"
}
```

### List customer's access

List the offers and content a customer has access to, and how each was granted. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.
- From (`from_time`, date and time): Only access granted on or after this time.
- To (`to_time`, date and time): Only access granted on or before this time.
- Page (`page`, number): Which page to get, from 1. Use the 'next_page' an earlier run gave. At least 1.

**Outputs**

- `accesses` (list): The customer's access
- `count` (number): How many on this page
- `next_page` (number): Pass as 'Page' for the next page; 0 on the last one
- `page` (number): The page read
- `total_count` (text): How many match in all, as Uscreen counts them

**Example output**

```json
{
  "accesses": [
    {
      "canceled_at": null,
      "created_at": 1720186565,
      "id": 789,
      "origin": "assigned_from_publisher_api",
      "perform_action_at": 1720187272,
      "product_id": 456,
      "product_type": "freebie",
      "with_manual_billing": false
    }
  ],
  "count": 1,
  "next_page": 0,
  "page": 1,
  "total_count": "1"
}
```

### List customers

List the store's customers, optionally created or changed in a date range. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- From (`from_time`, date and time): Only customers on or after this time.
- To (`to_time`, date and time): Only customers on or before this time.
- Dates compare (`date_field`, text): Whether From and To compare when each was created or last changed. Defaults to when created. One of: `created_at` (When created (default)), `updated_at` (When last changed).
- Page (`page`, number): Which page to get, from 1. Use the 'next_page' an earlier run gave. At least 1.

**Outputs**

- `count` (number): How many on this page
- `customers` (list): The customers
- `next_page` (number): Pass as 'Page' for the next page; 0 on the last one
- `page` (number): The page read
- `total_count` (text): How many match in all, as Uscreen counts them

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "avatar_url": "",
      "created_at": 1720186565,
      "custom_fields": {},
      "email": "jo@example.com",
      "id": 123,
      "legacy_id": null,
      "name": "Jo Bloggs",
      "opted_in_for_community_updates": true,
      "opted_in_for_news_and_updates": true,
      "origin": "publisher_api",
      "referrer": "",
      "subscribed_topic_ids": [
        12
      ],
      "subscriber": false,
      "tags": [
        "annual-member"
      ],
      "utm_params": {
        "utm_campaign": "",
        "utm_content": "",
        "utm_medium": "",
        "utm_source": "",
        "utm_term": ""
      }
    }
  ],
  "next_page": 0,
  "page": 1,
  "total_count": "1"
}
```

### List groups

List the store's groups (group subscriptions) with their plan, seats and status. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- From (`from_time`, date and time): Only groups on or after this time.
- To (`to_time`, date and time): Only groups on or before this time.
- Dates compare (`date_field`, text): Whether From and To compare when each was created or last changed. Defaults to when created. One of: `created_at` (When created (default)), `updated_at` (When last changed).
- Page (`page`, number): Which page to get, from 1. Use the 'next_page' an earlier run gave. At least 1.

**Outputs**

- `count` (number): How many on this page
- `groups` (list): The groups
- `next_page` (number): Pass as 'Page' for the next page; 0 on the last one
- `page` (number): The page read
- `total_count` (text): How many match in all, as Uscreen counts them

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "billing_email": "billing@example.org",
      "created_at": 1720186565,
      "id": 2333,
      "name": "Team Subscription",
      "number_of_seats": 15,
      "perform_action_at": 1722778565,
      "plan_id": 74,
      "plan_title": "Monthly",
      "status": "active",
      "updated_at": 1720186565,
      "used_seats": 3
    }
  ],
  "next_page": 0,
  "page": 1,
  "total_count": "1"
}
```

### List invoices

List invoices with their amounts, status and payment provider, optionally created or changed in a date range. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- From (`from_time`, date and time): Only invoices on or after this time.
- To (`to_time`, date and time): Only invoices on or before this time.
- Dates compare (`date_field`, text): Whether From and To compare when each was created or last changed. Defaults to when created. One of: `created_at` (When created (default)), `updated_at` (When last changed).
- Page (`page`, number): Which page to get, from 1. Use the 'next_page' an earlier run gave. At least 1.

**Outputs**

- `count` (number): How many on this page
- `invoices` (list): The invoices
- `next_page` (number): Pass as 'Page' for the next page; 0 on the last one
- `page` (number): The page read
- `total_count` (text): How many match in all, as Uscreen counts them

**Example output**

```json
{
  "count": 1,
  "invoices": [
    {
      "amount": 1500,
      "coupon": null,
      "created_at": 1720186565,
      "currency": "USD",
      "discount": 0,
      "gift_amount": 0,
      "id": 198,
      "localized_amount": 1500,
      "localized_currency": "USD",
      "localized_discount": 0,
      "localized_gift_amount": 0,
      "localized_original_price": 1500,
      "origin": "stripe",
      "original_price": 1500,
      "paid_at": 1720186565,
      "product_id": 443,
      "product_type": "recurring",
      "status": "paid",
      "taxes": [
        {
          "amount": 128,
          "country_code": "US",
          "description": "",
          "display_name": "Sales Tax",
          "inclusive": false,
          "jurisdiction": "California",
          "percentage": 8.5,
          "state": "CA",
          "tax_type": "sales_tax"
        }
      ],
      "trial": false,
      "updated_at": 1720186565,
      "user_id": 123
    }
  ],
  "next_page": 0,
  "page": 1,
  "total_count": "1"
}
```

### List offers

List the store's offers: subscription plans, bundles, rentals and free offers, with prices and checkout links. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- From (`from_time`, date and time): Only offers created on or after this time.
- To (`to_time`, date and time): Only offers created on or before this time.
- Page (`page`, number): Which page to get, from 1. Use the 'next_page' an earlier run gave. At least 1.

**Outputs**

- `count` (number): How many on this page
- `next_page` (number): Pass as 'Page' for the next page; 0 on the last one
- `offers` (list): The offers
- `page` (number): The page read
- `total_count` (text): How many match in all, as Uscreen counts them

**Example output**

```json
{
  "count": 1,
  "next_page": 0,
  "offers": [
    {
      "created_at": 1720186565,
      "description": "Everything, billed monthly.",
      "id": 231,
      "main_image_url": "",
      "price_cents": 1500,
      "price_mode": "fixed",
      "private": false,
      "rental_period": null,
      "rental_price_cents": null,
      "rental_price_mode": null,
      "title": "Monthly",
      "type": "recurring",
      "url": "https://example.uscreen.io/checkout/new?o=231"
    }
  ],
  "page": 1,
  "total_count": "1"
}
```

### List video views

List who watched what in the last 12 months, for one customer, one piece of content or a period, with watch time and device. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Customer (`customer`, text): Only this customer's views, by id or email address.
- Content (`content_id`, text): Only views of this video, collection or live event.
- From (`from_time`, date and time): Start of the period, within the last 12 months. Defaults to 12 months ago.
- To (`to_time`, date and time): End of the period. Defaults to now.
- Page size (`per_page`, number): How many to return, 1 to 100. Uscreen's default is 10. From 1 to 100.
- Page (`page`, number): Which page to get, from 1. Use the 'next_page' an earlier run gave. At least 1.

**Outputs**

- `count` (number): How many on this page
- `next_page` (number): Pass as 'Page' for the next page; 0 on the last one
- `page` (number): The page read
- `total_count` (text): How many match in all, as Uscreen counts them
- `views` (list): The views

**Example output**

```json
{
  "count": 1,
  "next_page": 0,
  "page": 1,
  "total_count": "1",
  "views": [
    {
      "author_id": "10",
      "author_name": "Sam Lee",
      "browser": "Chrome",
      "content_id": 247,
      "content_title": "Morning yoga",
      "content_type": "video",
      "country_code": "US",
      "duration": 600,
      "os": "macOS",
      "platform": "web",
      "user_id": 123,
      "user_name": "Jo Bloggs",
      "video_id": 232,
      "view_end": 600,
      "view_start": 0
    }
  ]
}
```

### Publish content

Publish a video, collection or live event so members can see it. For a live event, members can then register, and a start time can be set.

**Inputs**

- Content (`content_id`, text, required): The video, collection or live event. Pick one, or give its id from an earlier step.
- Live event start (`event_launch_at`, date and time): Live events only: when it starts, in the future. Leave empty for anything else.

**Outputs**

- `content` (object): The content

**Example output**

```json
{
  "content": {
    "author": {
      "description": "",
      "id": 10,
      "image": "",
      "permalink": "sam-lee",
      "title": "Sam Lee"
    },
    "categories": [
      {
        "id": 5,
        "legacy_id": null,
        "permalink": "yoga",
        "public": true,
        "title": "Yoga"
      }
    ],
    "content_type": "video",
    "created_at": 1720186565,
    "description": "<p>A gentle start.</p>",
    "downloadable": false,
    "duration": 1800,
    "event_launch_date": null,
    "event_state": null,
    "free": false,
    "id": 247,
    "legacy_id": null,
    "main_poster_url": "",
    "part_of_subscription": true,
    "permalink": "morning-yoga",
    "price_cents": 1500,
    "published_at": 1720186565,
    "release_at": null,
    "release_stage": "published",
    "rental_period": null,
    "rental_price_cents": null,
    "secondary_poster_url": "",
    "short_description": "A gentle start.",
    "square_poster_url": "",
    "tags": [
      "yoga"
    ],
    "title": "Morning yoga",
    "video_count": null
  }
}
```

### Remove group member

Remove someone from a group, by their customer id.

**Inputs**

- Group (`group_id`, text, required): The group. Pick one, or give its id from an earlier step.
- Member ID (`member_id`, text, required): The member's customer id, from 'Add group member' or 'Get customer'.

**Outputs**

- `group_id` (text): The group
- `member_id` (text): The member removed
- `removed` (true/false): Always true once removed

**Example output**

```json
{
  "group_id": "2333",
  "member_id": "124",
  "removed": true
}
```

### Revoke access

End one of a customer's accesses at once, by its id from 'List customer's access' or 'Grant access'.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.
- Access ID (`access_id`, text, required): The access's id, from 'List customer's access' or 'Grant access'.

**Outputs**

- `access_id` (text): The access revoked
- `revoked` (true/false): Always true once revoked

**Example output**

```json
{
  "access_id": "789",
  "revoked": true
}
```

### Start subscription

Put a customer on a subscription plan, billed by Uscreen from the date given or by you outside Uscreen.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.
- Subscription plan (`plan_id`, text, required): The subscription plan. Pick one, or give its offer id.
- Next billing date (`next_billing_at`, date and time): When Uscreen next bills them. Leave empty for the plan's own.
- Billed outside Uscreen (`with_manual_billing`, true/false): Turn on if you charge the customer yourself, so Uscreen never bills them. Leave the date empty then.
- Currency (`currency`, text): A three-letter code such as USD, one of the store's currencies. Leave empty for the store's default.
- Customer covers fees (`cover_fees`, true/false): Turn on to add the payment fees to the price, if the store allows it.
- Skip automations (`skip_automations`, true/false): Turn on so this doesn't start the store's Uscreen automations (such as welcome emails) that it otherwise would.

**Outputs**

- `subscription` (object): The new subscription

**Example output**

```json
{
  "subscription": {
    "canceled_at": null,
    "cover_fees": false,
    "covered_fees": null,
    "created_at": 1720186565,
    "currency": "USD",
    "duration": 30,
    "id": 790,
    "origin": "assigned_from_publisher_api",
    "pauses_at": null,
    "perform_action_at": 1722778565,
    "platform": "web",
    "price": 1500,
    "product_id": 456,
    "product_type": "recurring",
    "resumes_at": null,
    "trial": false,
    "trial_period": 0,
    "with_manual_billing": true
  }
}
```

### Unpublish content

Hide a video, collection or live event from members.

**Inputs**

- Content (`content_id`, text, required): The video, collection or live event. Pick one, or give its id from an earlier step.

**Outputs**

- `content` (object): The content

**Example output**

```json
{
  "content": {
    "author": {
      "description": "",
      "id": 10,
      "image": "",
      "permalink": "sam-lee",
      "title": "Sam Lee"
    },
    "categories": [
      {
        "id": 5,
        "legacy_id": null,
        "permalink": "yoga",
        "public": true,
        "title": "Yoga"
      }
    ],
    "content_type": "video",
    "created_at": 1720186565,
    "description": "<p>A gentle start.</p>",
    "downloadable": false,
    "duration": 1800,
    "event_launch_date": null,
    "event_state": null,
    "free": false,
    "id": 247,
    "legacy_id": null,
    "main_poster_url": "",
    "part_of_subscription": true,
    "permalink": "morning-yoga",
    "price_cents": 1500,
    "published_at": 1720186565,
    "release_at": null,
    "release_stage": "unpublished",
    "rental_period": null,
    "rental_price_cents": null,
    "secondary_poster_url": "",
    "short_description": "A gentle start.",
    "square_poster_url": "",
    "tags": [
      "yoga"
    ],
    "title": "Morning yoga",
    "video_count": null
  }
}
```

### Update customer

Change a customer's name, email, password, email opt-ins, custom fields or Stripe customer, and add or remove tags. Only the fields given change.

**Inputs**

- Customer (`customer`, text, required): The customer's Uscreen id or email address.
- Name (`name`, text): A new name. Leave empty to keep it.
- Email (`email`, text): A new email address. Leave empty to keep it.
- Password (`password`, text): A new password of at least 8 characters. Leave empty to keep it.
- News and updates emails (`opted_in_for_news_and_updates`, text): Whether the customer gets news and updates emails. Leave empty to keep it as is. One of: `yes` (Opted in), `no` (Opted out).
- Community updates emails (`opted_in_for_community_updates`, text): Whether the customer gets community updates emails. Leave empty to keep it as is. One of: `yes` (Opted in), `no` (Opted out).
- Add tags (`add_tags`, list): Tags to add; the customer's other tags stay. A new name creates the tag and starts automations that watch for it.
- Remove tags (`remove_tags`, list): Tags to take off the customer; their other tags stay.
- Stripe customer ID (`payment_user_id`, text): A Stripe customer ID to match. Uscreen refuses it while the customer has an active subscription.
- Custom field 1 (`field_1`, text): The value of the store's custom sign-up field 1, if it has one. Leave empty to keep it.
- Custom field 2 (`field_2`, text): The value of the store's custom sign-up field 2, if it has one. Leave empty to keep it.
- Custom field 3 (`field_3`, text): The value of the store's custom sign-up field 3, if it has one. Leave empty to keep it.

**Outputs**

- `customer` (object): The customer

**Example output**

```json
{
  "customer": {
    "avatar_url": "",
    "created_at": 1720186565,
    "custom_fields": {},
    "email": "jo@example.com",
    "id": 123,
    "legacy_id": null,
    "name": "Jo Bloggs",
    "opted_in_for_community_updates": true,
    "opted_in_for_news_and_updates": true,
    "origin": "publisher_api",
    "referrer": "",
    "subscribed_topic_ids": [
      12
    ],
    "subscriber": false,
    "tags": [
      "annual-member",
      "vip"
    ],
    "utm_params": {
      "utm_campaign": "",
      "utm_content": "",
      "utm_medium": "",
      "utm_source": "",
      "utm_term": ""
    }
  }
}
```
