Projects

Understand how to work with Projects through the Marq platform and utilize REST APIs to retrieve and manage Projects programmatically.

Marq Developer Portal Guide: Understanding Projects

Welcome to the Marq Developer Portal! In this guide, we’ll explore Marq Projects, which serve as containers for your documents and templates, providing a structured way to manage and organize your creative assets. This guide will help you

What Are Projects in Marq?

In Marq, a Project is a dedicated space that holds a collection of related documents, templates, and assets. Projects allow users to efficiently organize their work, making it easier to manage content across different campaigns, teams, or initiatives. By grouping documents within a Project, users can maintain a cohesive workflow and ensure that all team members have access to the relevant files.

Key Features of Marq Projects

  1. Organization: Projects help keep related documents together, making it easier to navigate and manage files.

  2. Collaboration: By organizing documents within Projects, team members can collaborate more effectively, accessing all necessary resources in one place.

  3. Sharing and Permissions: Projects allow for granular control over document sharing and permissions, ensuring that sensitive materials are only accessible to authorized users.

  4. Template Management: Users can create and store templates within a Project, streamlining the process of generating new documents based on established designs.

Managing Projects in Marq

Marq provides a user-friendly interface for managing Projects and documents. Here are some of the main functionalities available to users:

1. Creating and Organizing Projects

  • Users can create new Projects through the Marq platform and categorize them based on different criteria, such as campaigns, clients, or departments.
  • Within each Project, users can create subfolders to further organize documents, making it easy to find specific files.

2. Document Management

  • The My Documents Page allows users to view and manage all documents associated with their Projects.
  • Users can upload new documents, edit existing ones, and delete files no longer needed.

3. Sharing Projects and Documents

  • Marq makes it simple to share Projects or individual documents with team members or external stakeholders.
  • Users can set permissions to control who can view or edit documents, ensuring that sensitive materials are kept secure.

For more detailed information on managing Projects, refer to the following resources:

Example: Retrieving Projects

To retrieve a list of all Projects for a user or an account, you can call the List All Projects API. This will return a JSON array containing information about each Project, including Project names, IDs, and associated metadata.

GET /api/projects
Authorization: Bearer {your_access_token}

Creating Content from a Marq Template via API

Marq also allows you to automatically create content from a template using the Create Project API. This API can populate new documents with images and fields of data specified in the API payload, making it easy to generate customized content on the fly.

Create Project API

  • Create Project: This endpoint allows you to create a new Project and populate it with content from an existing template.

Example API Call

Here’s a sample request to create a new Project based on a template:

POST /api/projects
Authorization: Bearer {your_access_token}
Content-Type: application/json

{
  "template_id": "12345",  // ID of the template to use
  "name": "New Project Name", // Name of the new project
  "data": {
    "field_name_1": "Value 1",  // Replace with actual field names from the template
    "field_name_2": "Value 2",
    "image_url": "https://example.com/image.jpg" // Image URL to populate
  }
}

In this example:

  • The template_id specifies which template to base the new Project on.
  • The name field is the name of the new Project.
  • The data object contains key-value pairs that correspond to the fields in the template. This allows you to customize the content being generated.

Best Practices for Using the Create Project API

  1. Use Descriptive Template IDs: Ensure that you use the correct template ID when creating Projects to avoid errors.

  2. Test API Calls: Always test your API calls in a development environment before deploying them in production to verify that the expected content is generated.

  3. Handle Responses Gracefully: Implement error handling for your API calls to manage any issues that arise during Project creation, such as missing required fields or invalid template IDs.

Using Marq’s REST APIs for Projects

Marq offers a set of REST APIs that allow developers to programmatically manage and retrieve Project information. Below are the key API endpoints for working with Projects:

Key API Endpoints

  • The Project Object: This endpoint provides detailed information about a Project, including its attributes and structure.

  • List All Projects: Use this endpoint to retrieve a list of all Projects associated with a user or an account. This is useful for getting an overview of available Projects.

  • Retrieve a Project: This endpoint allows you to fetch details for a specific Project by providing its unique identifier.

  • Project Created Webhook: This webhook notifies you when a new Project is created, enabling real-time updates in your application.