---
title: "Create a group"
description: "Files that go out together (a carousel), with the title, caption and metadata drafted for them. Empty is fine: upload or import into it with groupId.\n\nNeeds the **groups** permission."
---

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

Path: mixetape API › Groups

`POST /api/v1/groups`

Files that go out together (a carousel), with the title, caption and metadata drafted for them. Empty is fine: upload or import into it with groupId.

Needs the **groups** permission.

## Authentication

- `apiKey`, http, header `Authorization`

## Request body

_Required._

- `createGroup.title` (string, optional) — Title where the platform has one (YouTube, Pinterest)
- `createGroup.caption` (string, optional) — The post text; the default on every platform
- `createGroup.description` (string, optional) — Longer description where the platform has one
- `createGroup.fileIds` (array<string>, optional) — Files from storage, in order — a carousel's order. Each must be ready (its upload finished); a file in another group moves here. On update this replaces the group's files; the ones left out stay in storage.
- `createGroup.metadata` (object, optional) — Fields every platform shares (tags, thumbnailUrl, firstComment, …) and platforms: { youtube: { … }, instagram: { … } } with each platform's overrides (the same fields as a post's metadata on that platform; a caption there replaces the caption on that platform). On update it is merged; null clears a field or a platform.

## Example request

```json
{
  "title": "string",
  "caption": "string",
  "description": "string",
  "fileIds": [
    "string"
  ],
  "metadata": {}
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://mixetape.com/api/v1/groups \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "string",
  "caption": "string",
  "description": "string",
  "fileIds": [
    "string"
  ],
  "metadata": {}
}
'
```

### TypeScript

```typescript
const url = 'https://mixetape.com/api/v1/groups';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    title: 'string',
    caption: 'string',
    description: 'string',
    fileIds: ['string'],
    metadata: {}
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://mixetape.com/api/v1/groups"

payload = {
    "title": "string",
    "caption": "string",
    "description": "string",
    "fileIds": ["string"],
    "metadata": {}
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

The new group.

#### Example

```json
{
  "group": {
    "id": "string",
    "title": "string",
    "caption": "string",
    "description": "string",
    "metadata": {},
    "files": [
      {
        "id": "string",
        "url": "string",
        "publicUrl": "string",
        "name": "string",
        "kind": "video",
        "contentType": "string",
        "size": 0,
        "width": 0,
        "height": 0,
        "durationMs": 0,
        "orientation": "vertical",
        "status": "uploading",
        "groupId": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "expiresAt": "2019-08-24T14:15:22Z"
      }
    ],
    "posts": [
      {
        "id": "string",
        "accountId": "string",
        "provider": "string",
        "status": "string",
        "scheduledAt": "2019-08-24T14:15:22Z",
        "platformUrl": "string"
      }
    ],
    "createdBy": "agent",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
```

- `createGroup.response.201.group` (object, required)
  - `createGroup.response.201.group.id` (string, required)
  - `createGroup.response.201.group.metadata` (object, required)
  - `createGroup.response.201.group.files` (array<object>, required) — Its ready files, in order
    - `createGroup.response.201.group.files.id` (string, required)
    - `createGroup.response.201.group.files.url` (string, required) — r2:// URL: works wherever a post takes a media URL
    - `createGroup.response.201.group.files.name` (string, required)
    - `createGroup.response.201.group.files.kind` (string, required)
      - one of `"video"`, `"image"`, `"other"`
    - `createGroup.response.201.group.files.contentType` (string, required)
    - `createGroup.response.201.group.files.size` (integer, required) — Bytes
    - `createGroup.response.201.group.files.status` (string, required) — uploading: waiting for its upload to finish
      - one of `"uploading"`, `"ready"`
    - `createGroup.response.201.group.files.createdAt` (string, required)
      - format `date-time`
    - `createGroup.response.201.group.files.expiresAt` (string, required) — When storage deletes it, if nothing needs it then
      - format `date-time`
    - `createGroup.response.201.group.files.publicUrl` (string, optional)
    - `createGroup.response.201.group.files.width` (integer | null, optional)
    - `createGroup.response.201.group.files.height` (integer | null, optional)
    - `createGroup.response.201.group.files.durationMs` (integer | null, optional)
    - `createGroup.response.201.group.files.orientation` (string | null, optional)
      - one of `"vertical"`, `"horizontal"`, `"square"`, `null`
    - `createGroup.response.201.group.files.groupId` (string | null, optional)
  - `createGroup.response.201.group.posts` (array<object>, required) — The posts published from it
    - `createGroup.response.201.group.posts.id` (string, optional)
    - `createGroup.response.201.group.posts.accountId` (string, optional)
    - `createGroup.response.201.group.posts.provider` (string, optional)
    - `createGroup.response.201.group.posts.status` (string, optional)
    - `createGroup.response.201.group.posts.scheduledAt` (string, optional)
      - format `date-time`
    - `createGroup.response.201.group.posts.platformUrl` (string | null, optional)
  - `createGroup.response.201.group.createdBy` (string, required) — Who made it
    - one of `"agent"`, `"user"`
  - `createGroup.response.201.group.createdAt` (string, required)
    - format `date-time`
  - `createGroup.response.201.group.updatedAt` (string, required)
    - format `date-time`
  - `createGroup.response.201.group.title` (string | null, optional)
  - `createGroup.response.201.group.caption` (string | null, optional)
  - `createGroup.response.201.group.description` (string | null, optional)

### 400

The request is invalid; error.code says how (invalid_field, missing_field, unknown_field, media_not_supported, …) and error.field which field.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `createGroup.response.400.error` (object, required)
  - `createGroup.response.400.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `createGroup.response.400.error.message` (string, required) — What went wrong, in plain words
  - `createGroup.response.400.error.field` (string, optional) — The input field it is about, if any

### 401

No valid API key.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `createGroup.response.401.error` (object, required)
  - `createGroup.response.401.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `createGroup.response.401.error.message` (string, required) — What went wrong, in plain words
  - `createGroup.response.401.error.field` (string, optional) — The input field it is about, if any

### 403

The key lacks the permission this needs.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `createGroup.response.403.error` (object, required)
  - `createGroup.response.403.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `createGroup.response.403.error.message` (string, required) — What went wrong, in plain words
  - `createGroup.response.403.error.field` (string, optional) — The input field it is about, if any

### 404

Not found, or not yours.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `createGroup.response.404.error` (object, required)
  - `createGroup.response.404.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `createGroup.response.404.error.message` (string, required) — What went wrong, in plain words
  - `createGroup.response.404.error.field` (string, optional) — The input field it is about, if any

### 409

Not possible in its current state: invalid_post_state, account_needs_reconnect, file_not_ready, idempotency_in_progress, …

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `createGroup.response.409.error` (object, required)
  - `createGroup.response.409.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `createGroup.response.409.error.message` (string, required) — What went wrong, in plain words
  - `createGroup.response.409.error.field` (string, optional) — The input field it is about, if any

### 429

Over 120 requests a minute (rate_limited); wait and retry.

#### Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "field": "string"
  }
}
```

- `createGroup.response.429.error` (object, required)
  - `createGroup.response.429.error.code` (string, required) — A stable code to branch on: - `invalid_request`: The request is malformed, e.g. the body is not a JSON object - `invalid_field`: A field has the wrong type or value (see field) - `missing_field`: A required field is missing (see field) - `unknown_field`: A field this endpoint does not take, often a typo (see field) - `unauthorized`: No valid API key - `missing_permission`: The API key lacks the permission this needs - `forbidden`: Not allowed for this caller - `not_found`: Not found, or not yours - `method_not_allowed`: The path exists but not with this method - `invalid_post_state`: The post's status does not allow this, e.g. cancelling a published post - `account_needs_reconnect`: The channel must be connected again before it can post - `file_not_ready`: The file's upload is not finished - `media_not_supported`: The platform cannot take these files as one post - `not_supported_by_platform`: The platform has no such feature - `nothing_to_publish`: The selection or group has no files - `already_exists`: Something with that name already exists - `conflict`: Not possible in the current state - `idempotency_key_reused`: The Idempotency-Key was used before with a different request - `idempotency_in_progress`: A request with this Idempotency-Key is still running - `source_unreachable`: The file at the given URL could not be fetched; check it is public - `platform_error`: The platform refused or failed the call; the message says why - `rate_limited`: Too many requests; wait Retry-After seconds - `platform_unavailable`: mixetape cannot connect that platform yet - `plan_required`: The account has no active plan; choose one at /subscribe - `channel_locked`: The channel is locked: the plan covers fewer channels than are connected - `channel_limit_reached`: Connecting this would go past the channels the plan covers - `daily_limit_reached`: The channel already has the most posts allowed on that day - `internal_error`: Something failed on mixetape's side
    - one of `"invalid_request"`, `"invalid_field"`, `"missing_field"`, `"unknown_field"`, `"unauthorized"`, `"missing_permission"`, `"forbidden"`, `"not_found"`, `"method_not_allowed"`, `"invalid_post_state"`, `"account_needs_reconnect"`, `"file_not_ready"`, `"media_not_supported"`, `"not_supported_by_platform"`, `"nothing_to_publish"`, `"already_exists"`, `"conflict"`, `"idempotency_key_reused"`, `"idempotency_in_progress"`, `"source_unreachable"`, `"platform_error"`, `"rate_limited"`, `"platform_unavailable"`, `"plan_required"`, `"channel_locked"`, `"channel_limit_reached"`, `"daily_limit_reached"`, `"internal_error"`
  - `createGroup.response.429.error.message` (string, required) — What went wrong, in plain words
  - `createGroup.response.429.error.field` (string, optional) — The input field it is about, if any


Source: https://docs.mixetape.com/api/Groups/createGroup/index.md
