I am bit confused about the implementation of RESTful best practices.

I have a `customer` resource and `license` resource. Customer is required for license creation. My doubt is can I combine the customer object in the `license` creation request so that service will check the existence and create customer conditionally and then create the license for the customer.

Scenario 1 - Create Customer and then Create License separately with customer identifier.

`POST /customers`

```
{
   'email': 'user-1@example.com',
   'mobile': '9876543210'
}

```

`POST /licenses`

```
{
   'customer': {
        'email': 'user-1@example.com',
    },
    'expire_at': '2021-12-31'
}

```

Scenario 2 - Create License with customer details. (Customer will be created automatically if not exists)

`POST /licenses`

```
{
   'customer': {
        'email': 'user-2@example.com',
        'mobile': '9876543210'
    },
    'expire_at': '2021-12-31'
}

```

Is scenario 2 violating the RESTful concept?

Thanks