Overview
The Gigs API allows freelancers to create, update, and manage their service offerings. A gig represents a service that can be purchased by clients, with multiple pricing packages (basic, standard, premium).Queries
doesOffersMultiplePackages
Check if a gig offers multiple package tiers. Input Parameters:Gig ID (CUID)
boolean indicating if the gig offers multiple packages.
Example:
getUserGigs
Retrieve all gigs belonging to a specific user. Input Parameters:User ID
Gig ID
Gig title
URL-friendly slug
Status: draft, published, paused, or deleted
Category details (id, name, parentId)
Package tiers: basic, standard, premium
Media files: images, videos, documents
Owner details (name, username)
Mutations
createDraft
Create a new draft gig for the authenticated user. Input Parameters: None (uses authenticated user from context) Response: Returns the created Gig object. Example:updateOverview
Update gig title, category, and tags. Input Parameters:Gig ID to update
Gig title
Parent category ID
Subcategory ID to connect
Array of tag objects with
id and text propertiesNOT_FOUND: Gig not found
createPackages
Create or update pricing packages for a gig. Supports basic (required), standard, and premium tiers. Input Parameters:Gig ID
Basic package details (always required)
Package name (5-20 characters)
Package description (5-100 characters)
Price in MAD (minimum 10)
Delivery time in days
Number of revisions (minimum 1)
Standard package (optional, same fields as basic)
Premium package (optional, same fields as basic)
Created/updated basic package
Created/updated standard package (if provided)
Created/updated premium package (if provided)
udpateOffersMultiplePackages
Set whether the gig offers multiple package tiers. Input Parameters:Gig ID
Whether to offer multiple packages
updateDescriptionFaq
Update the gig description and FAQ section. Input Parameters:Gig ID
EditorJS OutputData object with description content
Array of FAQ objects
FAQ question
FAQ answer
Operation success status
Updated description
Number of FAQ items created
UNAUTHORIZED: Gig not found or not owned by user
updateGallery
Update gig images, videos, and documents. Input Parameters:Gig ID
Array of image URLs (at least one required)
Array of video URLs
Array of document URLs
Operation success status
Array of created attachment objects
publish
Publish a draft gig, making it visible to clients. Generates a unique slug. Input Parameters:Gig ID to publish
Gig ID
Generated URL slug
Owner details (name, username)
NOT_FOUND: Gig not foundUNPROCESSABLE_CONTENT: Title not set
delete
Delete a gig owned by the authenticated user. Input Parameters:Gig ID to delete
NOT_FOUND: Gig not found or not owned by user