# ACMA (App Content Management API)

ACMA (App Content Management API) is the API a member who has signed up for your product, that is a *ServiceUser*, uses to work with *Content* and *Media* directly. Think of it as doing the same work a Weegloo User does on CMA, but under a member identity. With ACMA, members create, read, update, and delete *Content* and *Media*. The scope allowed for each action is decided by the *ServiceUserRole*.

ACMA calls use a Bearer token issued by *ServiceLogin*. This token is valid only on ACMA and ACDA and cannot be used on CMA or CDA (for the token issuance flow, see the [Auth API](/api/reference/auth-api.md)). The *Content Type* that frames a member's data is not created or modified on ACMA. *Content Type* is managed by a Weegloo User on CMA, and ACMA has no endpoints for creating or modifying a *Content Type*.
## Differences from CMA {#differences-from-cma}

ACMA mirrors CMA, but the identity, ownership scope, and publish behavior differ.

| Item | ACMA (*ServiceUser*) | CMA (Weegloo User) |
|---|---|---|
| Identity | A *ServiceUser* who signed up through *ServiceLogin*. Permissions come from a *ServiceUserRole*. | A Weegloo User. Permissions come from a SpaceRole. |
| Access scope | The read, update, and delete scope is decided by the *ServiceUserRole* (the same way ACDA scopes per-member reads). When a role rule sets `createdBy` to `:self`, that action is limited to the data the member created, which is the usual setup for updates and deletes. Reads can include other members' data as far as the role allows. | Works with data across the whole *Space*, within what the SpaceRole allows. |
| Publish on create | When you create *Content* or *Media*, it is **published immediately**. There is no separate publish call. | *Content* requires a separate publish call after creation before it reaches the delivery path. |
| Publish on delete | Deleting **automatically unpublishes** as well. There is no need to unpublish first. | Published data is usually unpublished first, then deleted. |
| Own profile | Read it with `GET /me` (not `/spaces/{spaceId}/me`). | `GET /me` (the current Weegloo User). |
| *Content Type* | No create or modify endpoints. The frame is CMA's responsibility. | Creates, modifies, and publishes a *Content Type*. |

To let one member work with data created by other members, build a separate *ServiceUserRole* that carries that permission and set it on that member's `roleOverride`. When a role rule leaves the `createdBy` filter out, that action targets data created by other members as well. Building the two roles separately is covered in [ServiceUserRole](/api/reference/cma/service-user-role.md#admin-role).

> For a detailed explanation of the behavior above (ownership scope, automatic publish on create, automatic unpublish on delete), see [ServiceUser login (concept)](/getting-started/core-concepts/service-users/service-login.md).

## Me {#me}

`GET /me` returns the *ServiceUser* identified by the current token. Unlike CMA, it does not go through a *Space* path; you call `/me` directly.

The following is the response structure of a *ServiceUser*. `sys` holds the identity and sign-up information, and the body holds display properties such as `nickname` and `avatarUrl`.

```json
{
  "sys": {
    "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY",
    "type": "ServiceUser",
    "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
    "provider": "google",
    "email": "alex.morgan@example.com",
    "createdAt": "2026-06-17T09:12:03.114Z",
    "updatedAt": "2026-06-17T09:12:03.114Z"
  },
  "nickname": "Alex",
  "avatarUrl": "https://lh3.googleusercontent.com/a/example-avatar",
  "enableLogin": true
}
```

Key properties:

- `sys.id`: The unique identifier of the *ServiceUser*. The `createdBy` of the *Content* and *Media* a member creates points to this value.
- `sys.type`: The resource kind. For a *ServiceUser* this is always `"ServiceUser"`.
- `sys.space`: A reference pointing to the *Space* this member belongs to.
- `sys.provider`: The provider used to sign in (for example, `google`).
- `sys.email`: The email address supplied by the login provider.
- `nickname`: The member's display name (required).
- `avatarUrl`: The profile image address (optional).
- `roleOverride`: A reference pointing to a different *ServiceUserRole* when applying one to this member only (optional). If not set, the member follows *ServiceLogin*'s default role.
- `enableLogin`: Whether login is allowed.

Only `nickname` and `avatarUrl` can be modified. Values such as `provider`, `email`, and `roleOverride` are not changed by the member directly.

```api-endpoint
{
  "title": "Read my profile",
  "method": "GET",
  "path": "/me",
  "description": "Reads the ServiceUser identified by the current token. It does not go through a Space path; you call /me directly.",
  "responseStatus": 200,
  "baseUrl": "https://acma.weegloo.com/v1",
  "authIdentity": "service-user",
  "pathParameterSchema": {},
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY",
      "type": "ServiceUser",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "provider": "google",
      "email": "alex.morgan@example.com",
      "createdAt": "2026-06-17T09:12:03.114Z",
      "updatedAt": "2026-06-17T09:12:03.114Z"
    },
    "nickname": "Alex",
    "avatarUrl": "https://lh3.googleusercontent.com/a/example-avatar",
    "enableLogin": true
  }
}
```

```api-endpoint
{
  "title": "Update my profile",
  "method": "PUT",
  "path": "/me",
  "description": "Updates the current ServiceUser's nickname and avatarUrl. nickname is required, avatarUrl is optional.",
  "responseStatus": 200,
  "baseUrl": "https://acma.weegloo.com/v1",
  "authIdentity": "service-user",
  "pathParameterSchema": {},
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  },
  "requestBodySchema": {
    "type": "object",
    "required": ["nickname"],
    "properties": {
      "nickname": { "type": "string", "description": "The member's display name" },
      "avatarUrl": { "type": "string", "description": "The profile image address (optional)" }
    },
    "example": {
      "nickname": "Alex",
      "avatarUrl": "https://lh3.googleusercontent.com/a/example-avatar"
    }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY",
      "type": "ServiceUser",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "provider": "google",
      "email": "alex.morgan@example.com",
      "createdAt": "2026-06-17T09:12:03.114Z",
      "updatedAt": "2026-06-17T09:14:50.402Z"
    },
    "nickname": "Alex",
    "avatarUrl": "https://lh3.googleusercontent.com/a/example-avatar",
    "enableLogin": true
  }
}
```

## Content {#content}

*Content* is an individual piece of data that follows a frame called a *Content Type*. For a clothing-store shopping mall, each product that follows the "Product" *Content Type* is a *Content*. On ACMA, a member works with their own *Content* through a path bound to a *Space* and a *Content Type* (`/spaces/{spaceId}/content-types/{contentTypeId}/contents`).

The following is one "Product" *Content* from a demo *Space*.

```json
{
  "sys": {
    "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
    "type": "Content",
    "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
    "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
    "publish": {
      "version": 3,
      "at": "2026-06-18T01:46:58.358Z",
      "firstAt": "2026-06-17T16:59:34.772Z",
      "counter": 3,
      "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } }
    },
    "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
    "createdAt": "2026-06-17T16:58:56.660Z",
    "updatedAt": "2026-06-18T01:46:58.358Z",
    "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
    "version": 4,
    "status": "Published"
  },
  "fields": {
    "price": { "en-US": 18000 },
    "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml." },
    "photo": {},
    "productName": { "en-US": "Stainless Tumbler 500ml" }
  },
  "metadata": { "tags": [] }
}
```
Key properties:

- `sys.id`: The unique identifier of the *Content*. It goes into `{contentId}` in the single-read, update, and delete paths.
- `sys.contentType`: A reference pointing to the *Content Type* this *Content* follows.
- `sys.status`: The publish status. *Content* created on ACMA is published immediately and comes back as `Published`.
- `sys.version`: The resource version, which increments by 1 on every change.
- `sys.publish`: The publish history (`version`, `at`, `firstAt`, `counter`, `by`).
- `fields`: Holds each field's value in the shape `{ apiName: { locale: value } }`. The example above holds `price`, `description`, `photo`, and `productName` under the `en-US` locale. A field with no value (`photo`) is an empty object.
- `metadata.tags`: The list of *Tag*s attached to this *Content*.

The list endpoint accepts the standard query parameters (`limit`, `skip`, `next`, `prev`, `order`, `select`, `include`), and the response returns an `items` array together with `links` (page cursors).

```api-endpoint
{
  "title": "List Content",
  "method": "GET",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents",
  "description": "Lists the Content under one Content Type, page by page. The target is the Content allowed by the ServiceUserRole's read rule.",
  "responseStatus": 200,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true }
  },
  "queryParameterSchema": {
    "limit": { "type": "integer", "description": "Number of items to return per page (1-100)", "default": 15 },
    "skip": { "type": "integer", "description": "Number of items to skip", "default": 0 },
    "next": { "type": "string", "description": "Next page cursor (the value obtained from links.next of the previous response)" },
    "prev": { "type": "string", "description": "Previous page cursor (the value obtained from links.prev of the previous response)" },
    "order": { "type": "string", "description": "Sort criteria. Multiple sorts separated by commas (for example, sys.createdAt,sys.id)" },
    "select": { "type": "string", "description": "Fields to include (sys.id,sys.createdAt) or exclude (-sys.id). Do not mix include and exclude." },
    "include": { "type": "integer", "description": "Level of related resources to include. 0=default, 1=related resources, 2=nested relations, 3=all", "default": 0 }
  },
  "additionalQueryParams": true,
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  },
  "responseExample": {
    "sys": { "type": "TotalPageResponse" },
    "limit": 15,
    "totalCount": 1,
    "items": [
      {
        "sys": {
          "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
          "type": "Content",
          "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
          "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
          "publish": { "version": 3, "at": "2026-06-18T01:46:58.358Z", "firstAt": "2026-06-17T16:59:34.772Z", "counter": 3, "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } } },
          "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
          "createdAt": "2026-06-17T16:58:56.660Z",
          "updatedAt": "2026-06-18T01:46:58.358Z",
          "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
          "version": 4,
          "status": "Published"
        },
        "fields": {
          "price": { "en-US": 18000 },
          "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml." },
          "photo": {},
          "productName": { "en-US": "Stainless Tumbler 500ml" }
        },
        "metadata": { "tags": [] }
      }
    ],
    "links": { "self": "/v1/spaces/tcq4V2Xb/content-types/3trmXRM3RqbgSnifyg7PAmlxvX4fGY/contents" }
  }
}
```

```api-endpoint
{
  "title": "Create Content",
  "method": "POST",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents",
  "description": "Creates a new Content under one Content Type. On ACMA it is published automatically on creation and status comes back as Published. Send fields in the shape { apiName: { locale: value } }.",
  "responseStatus": 201,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  },
  "requestBodySchema": {
    "type": "object",
    "required": ["fields"],
    "properties": {
      "fields": {
        "type": "object",
        "description": "A map of locale values per field, in the shape { apiName: { locale: value } }.",
        "additionalProperties": {
          "type": "object",
          "description": "A map of locale values in the shape { locale: value }"
        }
      },
      "metadata": {
        "type": "object",
        "description": "Additional information (optional)",
        "properties": {
          "tags": { "type": "array", "description": "A list of Tag references", "items": { "type": "object" } }
        }
      }
    },
    "example": {
      "fields": {
        "productName": { "en-US": "Stainless Tumbler 500ml" },
        "price": { "en-US": 18000 },
        "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml." }
      }
    }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
      "type": "Content",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
      "publish": { "version": 3, "at": "2026-06-18T01:46:58.358Z", "firstAt": "2026-06-17T16:59:34.772Z", "counter": 3, "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } } },
      "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "createdAt": "2026-06-17T16:58:56.660Z",
      "updatedAt": "2026-06-18T01:46:58.358Z",
      "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "version": 4,
      "status": "Published"
    },
    "fields": {
      "price": { "en-US": 18000 },
      "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml." },
      "photo": {},
      "productName": { "en-US": "Stainless Tumbler 500ml" }
    },
    "metadata": { "tags": [] }
  }
}
```

```api-endpoint
{
  "title": "Read a single Content",
  "method": "GET",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents/{contentId}",
  "description": "Reads one Content by sys.id.",
  "responseStatus": 200,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true },
    "contentId": { "type": "string", "description": "The sys.id of the Content", "required": true }
  },
  "queryParameterSchema": {
    "include": { "type": "integer", "description": "Level of related resources to include. 0=default, 1=related resources, 2=nested relations, 3=all", "default": 0 },
    "select": { "type": "string", "description": "Fields to include or exclude. Do not mix include and exclude." }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
      "type": "Content",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
      "publish": { "version": 3, "at": "2026-06-18T01:46:58.358Z", "firstAt": "2026-06-17T16:59:34.772Z", "counter": 3, "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } } },
      "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "createdAt": "2026-06-17T16:58:56.660Z",
      "updatedAt": "2026-06-18T01:46:58.358Z",
      "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "version": 4,
      "status": "Published"
    },
    "fields": {
      "price": { "en-US": 18000 },
      "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml." },
      "photo": {},
      "productName": { "en-US": "Stainless Tumbler 500ml" }
    },
    "metadata": { "tags": [] }
  }
}
```

```api-endpoint
{
  "title": "Update Content (full replace)",
  "method": "PUT",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents/{contentId}",
  "description": "Fully replaces the fields of a Content. Send the same fields body as on creation; it is published automatically on update. Send the current sys.version in the X-Weegloo-Version header.",
  "responseStatus": 200,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true },
    "contentId": { "type": "string", "description": "The sys.id of the Content", "required": true }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" },
    "X-Weegloo-Version": { "type": "integer", "description": "The current resource's sys.version (optimistic concurrency control)" }
  },
  "requestBodySchema": {
    "type": "object",
    "required": ["fields"],
    "properties": {
      "fields": {
        "type": "object",
        "description": "A map of locale values per field, in the shape { apiName: { locale: value } }.",
        "additionalProperties": {
          "type": "object",
          "description": "A map of locale values in the shape { locale: value }"
        }
      },
      "metadata": {
        "type": "object",
        "description": "Additional information (optional)",
        "properties": {
          "tags": { "type": "array", "description": "A list of Tag references", "items": { "type": "object" } }
        }
      }
    },
    "example": {
      "fields": {
        "productName": { "en-US": "Stainless Tumbler 500ml" },
        "price": { "en-US": 16500 },
        "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml. Now on a limited-time discount." }
      }
    }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
      "type": "Content",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
      "publish": { "version": 3, "at": "2026-06-18T01:46:58.358Z", "firstAt": "2026-06-17T16:59:34.772Z", "counter": 3, "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } } },
      "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "createdAt": "2026-06-17T16:58:56.660Z",
      "updatedAt": "2026-06-18T01:46:58.358Z",
      "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "version": 4,
      "status": "Published"
    },
    "fields": {
      "price": { "en-US": 16500 },
      "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml. Now on a limited-time discount." },
      "photo": {},
      "productName": { "en-US": "Stainless Tumbler 500ml" }
    },
    "metadata": { "tags": [] }
  }
}
```

```api-endpoint
{
  "title": "Partially update Content (JSON Patch)",
  "method": "PATCH",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents/{contentId}",
  "description": "Modifies only some fields of a Content with RFC 6902 JSON Patch. The request Content-Type header must be application/json-patch+json, and it is published automatically on update.",
  "responseStatus": 200,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true },
    "contentId": { "type": "string", "description": "The sys.id of the Content", "required": true }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" },
    "Content-Type": { "type": "string", "description": "application/json-patch+json (RFC 6902 JSON Patch)" },
    "X-Weegloo-Version": { "type": "integer", "description": "The current resource's sys.version (optimistic concurrency control)" }
  },
  "requestContentType": "application/json-patch+json",
  "requestBodySchema": {
    "type": "array",
    "description": "An array of RFC 6902 JSON Patch operations (op / path / value / from). path is an RFC 6901 JSON Pointer.",
    "items": {
      "type": "object",
      "required": ["op", "path"],
      "properties": {
        "op": { "type": "string", "enum": ["add", "remove", "replace", "move", "copy", "test"], "description": "The operation kind" },
        "path": { "type": "string", "description": "The target location (JSON Pointer). For example: /fields/price/en-US" },
        "value": { "description": "The value used by add/replace/test" },
        "from": { "type": "string", "description": "The source location for move/copy" }
      }
    },
    "example": [
      { "op": "replace", "path": "/fields/price/en-US", "value": 16500 }
    ]
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBUM8Ds0Xvw",
      "type": "Content",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "contentType": { "sys": { "id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY", "type": "Refer", "targetType": "ContentType" } },
      "publish": { "version": 3, "at": "2026-06-18T01:46:58.358Z", "firstAt": "2026-06-17T16:59:34.772Z", "counter": 3, "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } } },
      "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "createdAt": "2026-06-17T16:58:56.660Z",
      "updatedAt": "2026-06-18T01:46:58.358Z",
      "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "version": 4,
      "status": "Published"
    },
    "fields": {
      "price": { "en-US": 16500 },
      "description": { "en-US": "Double-wall vacuum insulation keeps drinks hot or cold for hours. A roomy 500ml." },
      "photo": {},
      "productName": { "en-US": "Stainless Tumbler 500ml" }
    },
    "metadata": { "tags": [] }
  }
}
```

```api-endpoint
{
  "title": "Delete Content",
  "method": "DELETE",
  "path": "/spaces/{spaceId}/content-types/{contentTypeId}/contents/{contentId}",
  "description": "Deletes a Content. On ACMA, deleting automatically unpublishes as well, so there is no need to unpublish first. On success it responds with 204 No Content and no response body.",
  "responseStatus": 204,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "contentTypeId": { "type": "string", "description": "The sys.id of the Content Type", "required": true },
    "contentId": { "type": "string", "description": "The sys.id of the Content", "required": true }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  }
}
```

## Media {#media}

*Media* is an uploaded file asset (an image, video, document, and so on). To create a *Media*, a member first uploads a file with the [Upload API](/api/reference/upload-api.md) to get an *Upload*, then puts that *Upload*'s `sys.id` into the *Media* create request. *Media*, too, is published automatically on creation on ACMA.

The following is the tumbler photo *Media* uploaded to a demo *Space*.

```json
{
  "sys": {
    "id": "3trmXRM3RqbgSnifyg7PBe7ehkOn8e",
    "type": "Media",
    "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
    "publish": {
      "version": 1,
      "at": "2026-06-17T17:07:13.400Z",
      "firstAt": "2026-06-17T17:07:13.400Z",
      "counter": 1,
      "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } }
    },
    "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
    "createdAt": "2026-06-17T17:07:13.154Z",
    "updatedAt": "2026-06-17T17:07:13.400Z",
    "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
    "version": 2,
    "status": "Published"
  },
  "fields": {
    "title": { "en-US": "Stainless Tumbler 500ml front shot" },
    "description": { "en-US": "Front product shot of the tumbler on a white background." },
    "file": {
      "en-US": {
        "fileName": "tumbler.png",
        "contentType": "image/png",
        "mimeGroups": ["Image"],
        "url": "https://weegloo-media.com/medias/tcq4V2Xb/n8e/3trmXRM3RqbgSnifyg7PBe7ehkOn8e/en-US/1/tumbler.png",
        "detail": { "size": 50847, "image": { "width": 900, "height": 900 } }
      }
    }
  },
  "metadata": { "tags": [] }
}
```
Key properties:

- `sys.id`: The unique identifier of the *Media*. It goes into `{mediaId}` in the single-read and delete paths, and it is the value a *Content* points to when it references a photo.
- `sys.status`: The publish status. *Media* created on ACMA is published immediately and comes back as `Published`.
- `fields.title`, `fields.description`: Hold the asset's title and description as a locale map (optional).
- `fields.file`: Per-locale file information (required). Once processing finishes, `url` (the delivery address), `mimeGroups`, and `detail` (size, image resolution, and so on) are filled in.

In the `fields.file` of a *Media* create request, you put an *Upload* reference in its pre-processing state. Each file entry includes all of `fileName`, `contentType`, `mimeGroups`, `state`, and `upload`, where `state` is always `"PENDING"` and `upload` holds the `sys.id` of the *Upload* obtained from the [Upload API](/api/reference/upload-api.md). Right after creation the platform processes the file, and once processing finishes, `url` and `detail` are filled in as in the response above.

```api-endpoint
{
  "title": "Create Media",
  "method": "POST",
  "path": "/spaces/{spaceId}/medias",
  "description": "Creates a new Media by referencing an Upload obtained from the Upload API. In each locale entry of fields.file, set state to PENDING and put the Upload's sys.id in upload. On ACMA it is published automatically on creation.",
  "responseStatus": 201,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  },
  "requestBodySchema": {
    "type": "object",
    "required": ["fields"],
    "properties": {
      "fields": {
        "type": "object",
        "required": ["file"],
        "properties": {
          "title": { "type": "object", "description": "Title locale map (optional). { locale: string }", "additionalProperties": { "type": "string" } },
          "description": { "type": "object", "description": "Description locale map (optional). { locale: string }", "additionalProperties": { "type": "string" } },
          "file": {
            "type": "object",
            "description": "Per-locale file information (required). { locale: UnprocessedUpload }",
            "additionalProperties": {
              "type": "object",
              "required": ["fileName", "contentType", "mimeGroups", "state", "upload"],
              "properties": {
                "fileName": { "type": "string", "description": "The file name" },
                "contentType": { "type": "string", "description": "The file's MIME type (for example, image/png)" },
                "mimeGroups": { "type": "array", "description": "A list of file type groups", "items": { "type": "string", "enum": ["Attachment", "Plaintext", "Image", "Audio", "Video", "RichText", "Presentation", "Spreadsheet", "PdfDocument", "Archive", "Code", "Markup"] } },
                "state": { "type": "string", "enum": ["PENDING", "PROCESSING", "FAILED"], "description": "Always send as PENDING" },
                "upload": { "type": "object", "description": "A reference to the Upload obtained from the Upload API" }
              }
            }
          }
        }
      },
      "metadata": {
        "type": "object",
        "description": "Additional information (optional)",
        "properties": {
          "tags": { "type": "array", "description": "A list of Tag references", "items": { "type": "object" } }
        }
      }
    },
    "example": {
      "fields": {
        "title": { "en-US": "Stainless Tumbler 500ml front shot" },
        "file": {
          "en-US": {
            "fileName": "tumbler.png",
            "contentType": "image/png",
            "mimeGroups": ["Image"],
            "state": "PENDING",
            "upload": { "sys": { "id": "4bgMfu7cFGYDRQn4jdqFICdQiCZ15W", "type": "Refer", "targetType": "Upload" } }
          }
        }
      }
    }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBe7ehkOn8e",
      "type": "Media",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "publish": { "version": 1, "at": "2026-06-17T17:07:13.400Z", "firstAt": "2026-06-17T17:07:13.400Z", "counter": 1, "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } } },
      "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "createdAt": "2026-06-17T17:07:13.154Z",
      "updatedAt": "2026-06-17T17:07:13.400Z",
      "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "version": 2,
      "status": "Published"
    },
    "fields": {
      "title": { "en-US": "Stainless Tumbler 500ml front shot" },
      "description": { "en-US": "Front product shot of the tumbler on a white background." },
      "file": {
        "en-US": {
          "fileName": "tumbler.png",
          "contentType": "image/png",
          "mimeGroups": ["Image"],
          "url": "https://weegloo-media.com/medias/tcq4V2Xb/n8e/3trmXRM3RqbgSnifyg7PBe7ehkOn8e/en-US/1/tumbler.png",
          "detail": { "size": 50847, "image": { "width": 900, "height": 900 } }
        }
      }
    },
    "metadata": { "tags": [] }
  }
}
```

```api-endpoint
{
  "title": "Read a single Media",
  "method": "GET",
  "path": "/spaces/{spaceId}/medias/{mediaId}",
  "description": "Reads one Media by sys.id.",
  "responseStatus": 200,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "mediaId": { "type": "string", "description": "The sys.id of the Media", "required": true }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  },
  "responseExample": {
    "sys": {
      "id": "3trmXRM3RqbgSnifyg7PBe7ehkOn8e",
      "type": "Media",
      "space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
      "publish": { "version": 1, "at": "2026-06-17T17:07:13.400Z", "firstAt": "2026-06-17T17:07:13.400Z", "counter": 1, "by": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } } },
      "createdBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "createdAt": "2026-06-17T17:07:13.154Z",
      "updatedAt": "2026-06-17T17:07:13.400Z",
      "updatedBy": { "sys": { "id": "3trmXRM3RqbgSnifyg7PSrUm9k2BaY", "type": "Refer", "targetType": "ServiceUser" } },
      "version": 2,
      "status": "Published"
    },
    "fields": {
      "title": { "en-US": "Stainless Tumbler 500ml front shot" },
      "description": { "en-US": "Front product shot of the tumbler on a white background." },
      "file": {
        "en-US": {
          "fileName": "tumbler.png",
          "contentType": "image/png",
          "mimeGroups": ["Image"],
          "url": "https://weegloo-media.com/medias/tcq4V2Xb/n8e/3trmXRM3RqbgSnifyg7PBe7ehkOn8e/en-US/1/tumbler.png",
          "detail": { "size": 50847, "image": { "width": 900, "height": 900 } }
        }
      }
    },
    "metadata": { "tags": [] }
  }
}
```

```api-endpoint
{
  "title": "Delete Media",
  "method": "DELETE",
  "path": "/spaces/{spaceId}/medias/{mediaId}",
  "description": "Deletes a Media. On ACMA, deleting automatically unpublishes as well. On success it responds with 204 No Content and no response body.",
  "responseStatus": 204,
  "baseUrl": "https://acma.weegloo.com/v1",
  "pathParameterSchema": {
    "spaceId": { "type": "string", "description": "The sys.id of the Space", "required": true },
    "mediaId": { "type": "string", "description": "The sys.id of the Media", "required": true }
  },
  "requestHeaderSchema": {
    "Authorization": { "type": "string", "description": "Bearer token (ACMA authentication, issued by ServiceLogin)" }
  }
}
```

## Related documents {#related-documents}

- [Auth API](/api/reference/auth-api.md): The OAuth flow for issuing the token used in ACMA calls.
- [ACDA](/api/reference/acda.md): The read API that delivers published content to members.
- [ServiceUser login (concept)](/getting-started/core-concepts/service-users/service-login.md): Configuring ServiceLogin and ServiceUserRole.
- [Upload API](/api/reference/upload-api.md): Uploading a file before creating a Media.
