Skip to main content
POST
/
generate
curl --request POST \
  --url https://{host}/api/sharesame/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "build me a CRM like Salesforce but call it ForceSale",
  "user_id": "acct_123",
  "project_id": "project_123"
}
'
{
  "job_id": "<string>",
  "error": "<string>",
  "search_score": 123,
  "sandbox_session": "<string>",
  "cached_files": [
    {
      "path": "<string>",
      "content": "<string>",
      "language": "text"
    }
  ]
}
{
"job_id": "<string>",
"error": "<string>",
"search_score": 123,
"sandbox_session": "<string>",
"cached_files": [
{
"path": "<string>",
"content": "<string>",
"language": "text"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
string
required

Plain-English request for the website or change you want

Required string length: 1 - 4000
files
object[]

Existing files to edit for a remix or follow-up change

source_url
string | null

Optional URL to fork

user_id
string | null

Your own user ID for tracking

project_id
string | null

Stable website ID so ShareSame can keep related edits together

Response

Job accepted

status
enum<string>
required
Available options:
building,
failed
job_id
string
error
string
source
enum<string>

How ShareSame started the job

Available options:
,
cache,
generated,
fork
search_score
number
sandbox_session
string
cached_files
object[]