Projects

List projects

This endpoint makes an HTTP GET request to retrieve a list of projects based on the provided keyword, with a specified limit and cursor for pagination

Request

  • Method: GET

  • Endpoint: https://api.creatopy.com/v1beta/projects

  • Query Parameters:

    • keyword: The keyword to search for projects.

    • limit: The maximum number of projects to be returned.

    • cursor: A cursor for pagination.

curl --location 'https://api.creatopy.com/v1beta/projects?keyword=Levai&limit=10&cursor=eyJsaW1pdCI6MSwibGFzdElkIjozOTE3MzQzfQ%3D%3D' \
--header 'Authorization: Bearer eyJh...'

Response

Upon a successful execution, the response will have a status code of 200 and a JSON content type. The response body will contain the following structure:

JSON

{
  "response": {
    "totalCount": 0,
    "nodes": [
      {
        "id": 0,
        "name": "",
        "createdBy": 0,
        "color": null,
        "description": null,
        "brandKit": {
          "id": 0,
          "name": ""
        }
      }
    ],
    "pageInfo": {
      "hasNextPage": true,
      "endCursor": ""
    }
  }
}

The totalCount indicates the total number of projects found, while the nodes array contains the project details such as id, name, createdBy, color, description, and brandKit. The pageInfo object specifies if there are more pages available for pagination, along with the endCursor for the next page.

{
    "response": {
        "totalCount": 10,
        "nodes": [
            {
                "id": 3102440,
                "name": "api created user's project",
                "createdBy": 719026,
                "color": null,
                "description": null,
                "brandKit": {
                    "id": 1224286,
                    "name": "Lets tag this to project"
                }
            },
            {
                "id": 3102437,
                "name": "api created user's project",
                "createdBy": 719026,
                "color": null,
                "description": null,
                "brandKit": {
                    "id": 1224286,
                    "name": "Lets tag this to project"
                }
            },
            {
                "id": 2898068,
                "name": "Samuel Negru's project",
                "createdBy": 141,
                "color": null,
                "description": null,
                "brandKit": {
                    "id": 1224286,
                    "name": "Lets tag this to project"
                }
            },
           ...
            {
                "id": 2400300,
                "name": "Vridhi QA's project",
                "createdBy": 719026,
                "color": null,
                "description": null,
                "brandKit": {
                    "id": 1224286,
                    "name": "Lets tag this to project"
                }
            },
            {
                "id": 2313714,
                "name": "Tibi Orosz's project",
                "createdBy": 719026,
                "color": null,
                "description": null,
                "brandKit": {
                    "id": 1224286,
                    "name": "Lets tag this to project"
                }
            }
        ],
        "pageInfo": {
            "hasNextPage": true,
            "endCursor": "eyJsaW1pdCI6MTAsImxhc3RJZCI6MjMxMzcxNH0="
        }
    }
}

Create Project

This endpoint allows you to create a new project.

Request

  • Method: POST

  • Endpoint: https://api.creatopy.com/v1beta/projects

  • Body:

    • name (string, required): The name of the project.

    • brandKitId (integer, required): The ID of the brand kit associated with the project.

Response

The response of this request can be documented as a JSON schema:

JSON

{
  "type": "object",
  "properties": {
    "response": {
      "type": "object",
      "properties": {
        "project": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "teamId": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "createdBy": {
              "type": "integer"
            },
            "color": {
              "type": "string"
            },
            "description": {
              "type": ["string", "null"]
            },
            "brandKit": {
              "type": ["object", "null"]
            }
          }
        }
      }
    }
  }
}