# Projects

Project context management for content generation

## Get all projects for the authenticated user

> Retrieves all active projects owned by the authenticated user.\
> Projects are returned in descending order by last update time.<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Projects","description":"Project context management for content generation"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Project":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project (GUID)"},"name":{"type":"string","description":"Name of the project"},"description":{"type":"string","description":"Detailed description of the project"},"url":{"type":"string","description":"Optional URL associated with the project"},"token":{"type":"string","description":"Client token (owner of the project)"},"createdOn":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedOn":{"type":"string","format":"date-time","description":"Last update timestamp"},"active":{"type":"boolean","description":"Whether the project is active"},"imageUrl":{"type":"string","format":"uri","description":"Optional URL of the 200x50 brand image associated with the project"},"textColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"backgroundColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"brandColor":{"type":"string","nullable":true,"description":"Primary branding accent color applied to overlay shapes when branding is configured"},"accentColor":{"type":"string","nullable":true,"description":"Secondary accent color applied to overlay highlights and subtitles when branding is configured"}}}}},"paths":{"/projects":{"get":{"summary":"Get all projects for the authenticated user","description":"Retrieves all active projects owned by the authenticated user.\nProjects are returned in descending order by last update time.\n","tags":["Projects"],"responses":{"200":{"description":"List of user's projects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}},"401":{"description":"Unauthorized - valid API token required"},"500":{"description":"Internal server error"}}}}}}
```

## Create a new project

> Creates a new project for the authenticated user.\
> Projects can be referenced when generating tweets/threads to provide context.\
> \
> If a URL is provided without a description, the API will:\
> 1\. Fetch the website content\
> 2\. Use AI to generate a comprehensive project description in markdown format\
> \
> Either description or url must be provided.<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Projects","description":"Project context management for content generation"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateProjectRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the project (max 200 characters)"},"description":{"type":"string","description":"Detailed description of the project. Either description or url must be provided."},"url":{"type":"string","description":"Optional URL to fetch website content for auto-generating description. If provided without a description, AI will generate one."},"imageData":{"type":"string","description":"Optional base64 encoded PNG/JPG representing the project's brand image. Any dimensions are accepted—the API resizes it to 200x50 and flattens transparency onto a white background before storing the hosted copy as `imageUrl`."},"imageUrl":{"type":"string","format":"uri","description":"Optional HTTP/HTTPS URL to an existing PNG or JPG brand image. The API downloads the source, resizes it to 200x50, flattens transparency onto a white background, and hosts the optimized copy. Cannot be combined with `imageData`."},"textColor":{"type":"string","description":"Optional hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"},"backgroundColor":{"type":"string","description":"Optional hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"},"brandColor":{"type":"string","description":"Optional primary accent hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"},"accentColor":{"type":"string","description":"Optional secondary accent hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"}}},"Project":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project (GUID)"},"name":{"type":"string","description":"Name of the project"},"description":{"type":"string","description":"Detailed description of the project"},"url":{"type":"string","description":"Optional URL associated with the project"},"token":{"type":"string","description":"Client token (owner of the project)"},"createdOn":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedOn":{"type":"string","format":"date-time","description":"Last update timestamp"},"active":{"type":"boolean","description":"Whether the project is active"},"imageUrl":{"type":"string","format":"uri","description":"Optional URL of the 200x50 brand image associated with the project"},"textColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"backgroundColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"brandColor":{"type":"string","nullable":true,"description":"Primary branding accent color applied to overlay shapes when branding is configured"},"accentColor":{"type":"string","nullable":true,"description":"Secondary accent color applied to overlay highlights and subtitles when branding is configured"}}}}},"paths":{"/projects":{"post":{"summary":"Create a new project","description":"Creates a new project for the authenticated user.\nProjects can be referenced when generating tweets/threads to provide context.\n\nIf a URL is provided without a description, the API will:\n1. Fetch the website content\n2. Use AI to generate a comprehensive project description in markdown format\n\nEither description or url must be provided.\n","tags":["Projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"201":{"description":"Project created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"project":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Bad request - Missing required fields or validation error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized - valid API token required"},"500":{"description":"Internal server error"}}}}}}
```

## Get a specific project by ID

> Retrieves a specific project by its ID.\
> Only the project owner can access their projects.<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Projects","description":"Project context management for content generation"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Project":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project (GUID)"},"name":{"type":"string","description":"Name of the project"},"description":{"type":"string","description":"Detailed description of the project"},"url":{"type":"string","description":"Optional URL associated with the project"},"token":{"type":"string","description":"Client token (owner of the project)"},"createdOn":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedOn":{"type":"string","format":"date-time","description":"Last update timestamp"},"active":{"type":"boolean","description":"Whether the project is active"},"imageUrl":{"type":"string","format":"uri","description":"Optional URL of the 200x50 brand image associated with the project"},"textColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"backgroundColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"brandColor":{"type":"string","nullable":true,"description":"Primary branding accent color applied to overlay shapes when branding is configured"},"accentColor":{"type":"string","nullable":true,"description":"Secondary accent color applied to overlay highlights and subtitles when branding is configured"}}}}},"paths":{"/projects/{id}":{"get":{"summary":"Get a specific project by ID","description":"Retrieves a specific project by its ID.\nOnly the project owner can access their projects.\n","tags":["Projects"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Project ID (GUID)"}],"responses":{"200":{"description":"Project details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Bad request - Missing project ID"},"401":{"description":"Unauthorized - valid API token required"},"404":{"description":"Project not found"},"500":{"description":"Internal server error"}}}}}}
```

## Update a project

> Updates an existing project's name and description.\
> Only the project owner can update their projects.\
> \
> If a URL is provided without a description, the API will:\
> 1\. Fetch the website content\
> 2\. Use AI to generate a comprehensive project description in markdown format\
> \
> Either description or url must be provided.<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Projects","description":"Project context management for content generation"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpdateProjectRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Updated name of the project (max 200 characters)"},"description":{"type":"string","description":"Updated description of the project. Either description or url must be provided."},"url":{"type":"string","description":"Optional URL to fetch website content for auto-generating description. If provided without a description, AI will generate one."},"imageData":{"type":"string","nullable":true,"description":"Optional base64 encoded PNG/JPG. Provide `null` to remove the current brand image. Any size is accepted and will be resized to 200x50 and flattened onto a white background on upload."},"imageUrl":{"type":"string","nullable":true,"format":"uri","description":"Optional HTTP/HTTPS URL pointing to a PNG or JPG brand image. Provide `null` to remove the stored image. The API stores a 200x50 white-background version. Cannot be combined with `imageData`."},"textColor":{"type":"string","nullable":true,"description":"Optional hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"},"backgroundColor":{"type":"string","nullable":true,"description":"Optional hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"},"brandColor":{"type":"string","nullable":true,"description":"Optional primary accent hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"},"accentColor":{"type":"string","nullable":true,"description":"Optional secondary accent hex color (format","pattern":"^#[0-9A-Fa-f]{6}$"}}},"Project":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the project (GUID)"},"name":{"type":"string","description":"Name of the project"},"description":{"type":"string","description":"Detailed description of the project"},"url":{"type":"string","description":"Optional URL associated with the project"},"token":{"type":"string","description":"Client token (owner of the project)"},"createdOn":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedOn":{"type":"string","format":"date-time","description":"Last update timestamp"},"active":{"type":"boolean","description":"Whether the project is active"},"imageUrl":{"type":"string","format":"uri","description":"Optional URL of the 200x50 brand image associated with the project"},"textColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"backgroundColor":{"type":"string","nullable":true,"description":"Hex color (e.g."},"brandColor":{"type":"string","nullable":true,"description":"Primary branding accent color applied to overlay shapes when branding is configured"},"accentColor":{"type":"string","nullable":true,"description":"Secondary accent color applied to overlay highlights and subtitles when branding is configured"}}}}},"paths":{"/projects/{id}/update":{"post":{"summary":"Update a project","description":"Updates an existing project's name and description.\nOnly the project owner can update their projects.\n\nIf a URL is provided without a description, the API will:\n1. Fetch the website content\n2. Use AI to generate a comprehensive project description in markdown format\n\nEither description or url must be provided.\n","tags":["Projects"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Project ID (GUID)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Project updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"project":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Bad request - Missing required fields or validation error"},"401":{"description":"Unauthorized - valid API token required"},"404":{"description":"Project not found or unauthorized"},"500":{"description":"Internal server error"}}}}}}
```

## Delete a project

> Soft deletes a project (marks it as inactive).\
> Only the project owner can delete their projects.<br>

```json
{"openapi":"3.0.0","info":{"title":"Content API","version":"1.0.0"},"tags":[{"name":"Projects","description":"Project context management for content generation"}],"servers":[{"url":"https://api.autocontentapi.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/projects/{id}/delete":{"post":{"summary":"Delete a project","description":"Soft deletes a project (marks it as inactive).\nOnly the project owner can delete their projects.\n","tags":["Projects"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Project ID (GUID)"}],"responses":{"200":{"description":"Project deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request - Missing project ID"},"401":{"description":"Unauthorized - valid API token required"},"404":{"description":"Project not found or unauthorized"},"500":{"description":"Internal server error"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autocontentapi.com/readme/projects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
