Skip to main content
POST
/
applications
/
{applicationId}
/
attachments
Attach a file
curl --request POST \
  --url https://local.withsutro.com/applications/{applicationId}/attachments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-sutro-api-client: <api-key>' \
  --data '
{
  "projectLink": "<string>",
  "pat": "<string>",
  "type": "<string>"
}
'
{
  "attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Builder authentication and authorization

x-sutro-api-client
string
header
required

A unique identifier for the API Client making a request

Path Parameters

applicationId
string
required

Body

Sutro supports a wide range of attachments that can be used to help design and generate an application:

  • Figma project (via file key or URL)
  • LLM Prompts
  • OpenAPI documents
  • Other files

A URL pointing to a Figma project

Example:

"https://figma.example.com/12345"

pat
string
required

A Personal Access Token that has permission to access the given Figma project.

This will require the following scopes:

  • file_content:read
  • file_variables:read
  • file_metadata:read
Example:

"b08631ad-a4ec-4c27-9995-01287e83d565"

type
string
Allowed value: "figma"

Response

The ID of the generated attachment

attachmentId
string<uuid>
required
Example:

"b08631ad-a4ec-4c27-9995-01287e83d565"