Cinema Studio

Save a project's brief

Save a project's brief over the revision it was written from. A save from an older revision is refused revision_conflict with the current rev, so two tabs never overwrite each other unseen; once the brief is a shared document (POST /v1/studio/projects/{project}/brief/state), a save from the brief's current rev is written into it as a change and merges with what other members are writing: the blocks it changed (a paragraph, a heading, a list) take its version, and every block it left as it was keeps their edits; the windows open on the brief are told and load it. Takes a key holding studio:write — Account offers it unticked — or the desktop's own session key. Spends nothing.

POST
/v1/studio/projects/{project}/brief
POST
/v1/studio/projects/{project}/brief
Save a project's brief
Save a project's brief over the revision it was written from.
Authorizationstringrequired
Your API key. It is sent only when you press Send, to this request alone, and never stored.
projectstringrequired
Save a project's brief
curl --request POST \
  --url 'https://api.auray.ai/v1/studio/projects/{project}/brief' \
  --header 'Authorization: Bearer <api-key>'
  --header 'Content-Type: application/json' \
  --data '{
  
}'
{
  "object": "<string>",
  "project_id": "<string>",
  "doc": {
    "type": "<string>",
    "content": "<any[]>"
  },
  "rev": 123,
  "updated_at": "<string>",
  "request_id": "<string>"
}
Save a project's brief
curl -X POST https://api.auray.ai/v1/studio/projects/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d/brief \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "doc": {
    "type": "doc",
    "content": [
      {
        "type": "paragraph",
        "content": [
          {
            "type": "text",
            "text": "Night, rain, neon."
          }
        ]
      }
    ]
  },
  "base_rev": 0
}'
{
  "object": "<string>",
  "project_id": "<string>",
  "doc": {
    "type": "<string>",
    "content": "<any[]>"
  },
  "rev": 123,
  "updated_at": "<string>",
  "request_id": "<string>"
}

Authorizations

Authorizationstringheaderrequired

Bearer auray_sk_… — studio:write — Account offers it unticked; the desktop's session key holds it.

Path Parameters

projectstringrequired

Body

application/json
docobjectrequired
A rich-text document as an editor writes it (a ProseMirror document), at most 256 KB of JSON.
Show child attributes
typestringrequired
One of "doc".
contentany[]
base_revintegerrequired
The rev the brief was read at. 0 to ….

Response

application/json

OK.

objectstringrequired
One of "brief".
project_idstringrequired
docobjectrequired
A rich-text document as an editor writes it (a ProseMirror document), at most 256 KB of JSON.
Show child attributes
typestringrequired
One of "doc".
contentany[]
revintegerrequired
0 for a brief nobody has written. A save names the rev it was written from. 0 to ….
updated_atstringrequired
May be null.
request_idstring
Mirrored in the X-Request-Id header.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

Was this page helpful?

Save a project's brief
curl -X POST https://api.auray.ai/v1/studio/projects/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d/brief \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "doc": {
    "type": "doc",
    "content": [
      {
        "type": "paragraph",
        "content": [
          {
            "type": "text",
            "text": "Night, rain, neon."
          }
        ]
      }
    ]
  },
  "base_rev": 0
}'
{
  "object": "<string>",
  "project_id": "<string>",
  "doc": {
    "type": "<string>",
    "content": "<any[]>"
  },
  "rev": 123,
  "updated_at": "<string>",
  "request_id": "<string>"
}

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close search.